Announcement

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

  • How do I apply projection file?

    Total beginner in maps here.I have a subnational shapefile. I managed to import it and now want to use projections to fix the proportions. The tutorials I've seen use

    Code:
    geo2xy _Y _X, proj (mercator) replace
    but when I do this I get the error

    Code:
    latitude _Y must be between -90 and 90
    In the folder where the shapefile is, there is also .prj file which I guess is the projection file. Should I apply this instead? And if yes, how?

  • #2
    Your shapefile may already contain projected coordinates rather than latitude and longitude values. As the helpfile for geo2xy notes, you can check if this is the case by viewing the contents of your .prj file (emphasis mine):

    "shp2dta does not import the shapefile's metadata but files with a ".prj" or ".xml" extension are in plain text format and can be viewed easily with a text editor or by using Stata's type command to list the file's content. Look at the content of the file with a ".prj" extension to find out if the shapefile contains geographic coordinates (lat/lon) or projected coordinates. If the content starts with GEOGCS, the shapefile contains lat/lon coordinates. If the content starts with PROJCS, the shapefile contains projected coordinates."

    Comment


    • #3
      Thank you, that was it!

      Comment

      Working...
      X