BookmarkSubscribeRSS Feed
marygc
Fluorite | Level 6

I am a novice with GIS files, and was given my first SHAPE file as one of my inputs for my analysis investigation. The first thing I like to do is to get convert/input data to SAS format.  So I ran Proc Mapimport and now Have over a million records describing the boundaries and shapes for my 53K properties of interest. 

 

My SAS file contains data given to me describing one county in the US -which ought to match what I'd pull myself from SAS's Tiger Shape files from the census - but I wish to start with what my client sent me.    my SAS file shows me Parcel ID's with  x and y values.  But i do not know what sort of projection system SAS proc mapimport used to produce their geographic coordinate system

 

Mapping systems are complicated -- as I understand that one location on the ground will have many different latitude-longitude values depending on which geographic coordinate system is used.   does SAS have code to run to produce the geographic (datum) transformations to reconcile the x and y's to lat/longs

 

  I am not clear on the dimension or unit of measurement that i starting with.  Found a conversion macro UTM2latlong  but when i input the x an y from proc mapimport,  the macro gave me values not in in the proper part of the US -- so i must not have started with X and Y (in meters).  when I look on the  ArcGIS website I see there are ways to export a raster to a netCDF file.    is that what I have ?  Raster cell values are exported as a netCDF variable? 

 

geez - this area is new to me - i am struggling simply to pose my question to this forum!  yikes!

 

3 REPLIES 3
PGStats
Opal | Level 21

First thing to try is to chose another UTM zone

 

%UTM2latLong(dsn,y=Y,x=X,zone=16N);

PG
Darrell_sas
SAS Employee

First, Proc MAPIMPORT just takes the same coordinates that was in the shapefile.  It just converts the shapefile into a SAS Date set.  (Note, you may need to use the ID statement.  See the doc and examples).

Second, If you are using MAPS for your map it is likely in Radians.  If you are using the newer MAPSGFK maps, then it is in Degrees.  The shapefile is probably in Degrees.

Third, you need to know what projection your shapefile is in.  It may be unprojected.  In that case, you would need to take your MAPS or your MAPSGFK data as unprojected too (MAPS must be converted to degrees).  Use Proc GPROJECT to project your data.  You need to combine both the maps and the coordinates together.

 

 

marygc
Fluorite | Level 6

UTM zone -- yes that was one of my questions when i found the macro.

OK  - after googling what a UTM zone is -- and finding the 2 digit numeric that matches the county and state I am interested in,

I put that code in the macro and

and getting closer.     my latitudes are now in the right ballpark -- but the longitudes are still off.

 

does the alph in the third position of the UTM code refer to the positioning system.  I see N and S and others to verify...

 

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1870 views
  • 1 like
  • 3 in conversation