I have a shapefile I've downloaded online. I ran the PROC MAPIMPORT statement, no id variable because there isn't one. The dataset has a X Y variable but they are NOT in degrees. Values are in the hundreds of thousands, so I have no idea what projection they are using. Any idea on what options I should enter in the GPROJECT statement to get this converted to degrees? Here is a snapshot of what the resulting dataset looks like after running PROC MAPIMPORT:
I might guess that SEGMENT could be used as an ID variable though it doesn't have much meaning as shown.
If you look at your data the first record for Segment=1 has the same coordinates as the last (Obs=5??) which would close a map polygon. Segment=2 does the same. Unless the Segment variable appears with the same values and different X,Y coordinates elsewhere in the data it looks like the Id variable.
Maps do not always have anything resembling latitude or longitude degree or other angular measurements.
For instance you might have a shape file for a single building and in the grand scheme of things the X,Y coordinates would be all that is needed as lat/long would not add much for many purposes.
Did that source have any of the associated information files like DBF or SHX that would provide additional information?
Calling @GraphGuy
You might be able to look in the .prj file (of the shapefile) and determine what projection was used, and then that might tell you what from= to use with proc gproject so that you can get regular unprojected lat/long values. See an example in my old blog: https://blogs.sas.com/content/sastraining/2017/10/17/rdu-airport-vs-surrounding-parks-and-nature/
Or ... it almost looks like those x/y values are long/lat values that have been multiplied by 10,000.
Looks like the people hosting that page don't host it anymore (see some discussion here: https://gis.stackexchange.com/questions/372381/is-there-an-alternative-to-prj2epsg-org)
A Google search turned up this page. I haven't tried it, and of course "your mileage may vary" 🙂
https://prj2epsg.azimap.com/search
That's the coordinate system that most of the SAS maps (and most other maps you'll be working with) use.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.