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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1466 views
  • 0 likes
  • 2 in conversation