BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
dsmall2112
Obsidian | Level 7

I do not have sufficient training or experience with GPROJECT to solve this problem, and hoping someone out there might suggest an approach to solving.

 

I would like to create a custom map that combines distinct counties (from MAPS.USCOUNTY) into custom groupings so that I can view images of US with lines drawn around those custom segments. I prefer the MAPS.USCOUNTY data as it is a rounded view of US that throws in Alaska and Hawaii in the lower left in an efficient reflection of US geography.

 

Custom segments --> basically I am replicating the MSA (metro and metro division only) areas but for non-metro areas (i.e. Micropolitan and rural) I want to combine into a single "rest of state" area (for that state; e.g. Florida Rest of State).  Rather than seeing lines for the parsed counties (3000+ segments) I want to see ~450 segments (~400 metro and metro div areas + ~50 "rest of state" areas).

 

I believe the exercise is to take MAPS.USCOUNTY, assign the custom segments using STATE and COUNTY, then use GPROJECT to recast the lat/long coordinates into the new CUSTOM_GEO (created from STATE and COUNTY building blocks) however I get an error when I try GPROJECT operations on MAPS.USCOUNTY.  Possibly, my workflow may be completely incorrect as well.

 

NOTE: PARALLEL1 = -5.462565701.

NOTE: PARALLEL2 = 7.86153257.

ERROR: Standard parallels lie on opposite sides of the equator.

ERROR: Equator is too close to the median latitude of the map

data set for default parallel calculation. Try specifying PARALLEL1 and PARALLEL2 values explicitly.

 

A second part to this problem is how to export the new projection coordinate into a "shape" file that other DV apps would understand.  Perhaps that's as simple as exporting the GPROJECT results but thought I'd throw that out there too.

 

Thanks to all who respond!

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

What is your source for the MSA boundaries you are using? Is that what you are trying to project?

GREMOVE is the procedure to remove boundary segments within an area, not GPROJECT. GPROJECT changes spherical coordinates to Cartesian for GMAP to use. The MAPS.County has already been projected for mapping.

View solution in original post

2 REPLIES 2
ballardw
Super User

What is your source for the MSA boundaries you are using? Is that what you are trying to project?

GREMOVE is the procedure to remove boundary segments within an area, not GPROJECT. GPROJECT changes spherical coordinates to Cartesian for GMAP to use. The MAPS.County has already been projected for mapping.

dsmall2112
Obsidian | Level 7

ah, that appears to be crux of my dillemna (I need GREMOVE, not GPROJECT).  

 

I am starting with MAPS.USCOUNTY (US county map, excludes PR) which has the projection I want, I just need lines drawn differently (for custom geography).  The primary keys are STATE and COUNTY.  I've defined a new geography (lets call it GEO_NEW) on the data and simply want to create a new dataset using GEO_NEW as the key.

 

The code below worked.  Thanks again.

 

proc gremove data=uscounty out=uscounty2;

* GEO_NEW is the new identification variable *;

by geo_new;

* STATE and COUNTY were the original identification variables *;

id state county;

run;quit;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 1011 views
  • 0 likes
  • 2 in conversation