Announcement

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

  • Geoinpoly

    I'm trying to join point data that are in NAD 83 (x y) to a shapefile of polygons that are also projected in NAD 83. When I try and join to the new STATA database I get the following error message.

    geoinpoly xcoord ycoord using "nycoord.dta"
    latitude xcoord must be between -90 and 90

    I realize from the underlying code that the file is looking for lat and lon degree coordinates. Can anyone tell me of a program covert x y back to lat lon in STATA?

    Best,
    John

  • #2
    If the points and shapefile are both in NAD83, then you can use the noprojection option to skip the conversion to x,y. So the command should look like

    Code:
    geoinpoly ycoord xcoord using "nycoord.dta", noprojection
    Note the order of the coordinates, latitude (ycoord) comes first, then longitude (xcoord).

    Comment


    • #3
      Thank you that worked perfectly! This is a million times faster than spatial join in ArcMap.

      Comment

      Working...
      X