BookmarkSubscribeRSS Feed
MadalinS
Calcite | Level 5
Hello,

I have used proc mapimport to build a dataset based on UK postcode regions shp file. The choropleth map created using the dataset resulted from proc mapimport had various random lines which where not existing in the original shape file. The data is in the British National Grid projection. I have used the SAS v9.1. Does anybody know what to do to remove the random lines?

Thank you,

Madalin
1 REPLY 1
Darrell_sas
SAS Employee
These lines are generally caused by GMAP when you specify an ID variable that isn't unique for the polygons. The stray lines are caused by trying to connect these separate polygons. This problem exists with the Census ZCTA files (which approximate ZIP Code polygons) because the shapefile isn't organized by the variable you want to use. You probably have the same issue. We added an ID statement to MAPIMPORT in SAS 9.2 to solve this. It causes the map polygons to be re-sorted by the ID value you specify. There isn't really a fix that you can apply without 9.2 because the problem is in the data in the shapefile. You can look to see if there is another variable in the dataset that is unique, but it may not be a variable that is useful.

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
  • 1 reply
  • 1010 views
  • 0 likes
  • 2 in conversation