BookmarkSubscribeRSS Feed
Calcite | Level 5

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,

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.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2 in conversation