Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Plotting coordinates on a map

    Hi all,

    Looking for some help with the shp2dta command.

    I am trying to plot coordinates within a map of Sierra Leone obtained here (Administrative boundaries, Latitude and longitude coordinates, ESRI shape file format): http://maplibrary.org/library/stacks...eone/index.htm

    Example of coordinates to be plotted:

    Click image for larger version

Name:	Screenshot 2018-06-22 11.05.33.png
Views:	1
Size:	50.5 KB
ID:	1450198
    Command used:

    shp2dta using "SIL_boundaries.shp", data("sle_data")coor("sle_coordinates ")
    tmap dot, ycoord(latitude)xcoord(longitude) map("sle_coordinates.dta")

    While the plots work, the graph that is produced includes additional lines superimposed on the original map. I've tried different maps, so I don't think that the problem is the underlying shp data, though I am at a loss as to what I am doing wrong!

    Click image for larger version

Name:	Screenshot 2018-06-22 11.08.42.png
Views:	1
Size:	167.7 KB
ID:	1450199

    Any insight would be greatly appreciated!

    Many thanks in advance,

    Vanessa
    Last edited by Vanessa Vandenboogaard; 22 Jun 2018, 09:19.

  • #2
    First tmp has been replace by spmap (or grmap). The helpfile in the SIL_boundaries_SHP.zip file does state that the files are in "Map Maker" DRA format. Perhap this is causing the problem.

    If you use the administrative areas ERSI data set it appears to produce the correct map:

    Code:
    unzipfile sil_admin_shp.zip
    shp2dta using sil, data("sil_data")  coor("sil_coordinates") gencent(coor) genid(cent) replace
    use sil_data,clear
    spmap  using "sil_coordinates.dta", id(ID)

    Comment

    Working...
    X