Data visualization with SAS programming

proc mapimport and gmap in SAS 9.1

Posts: 1

proc mapimport and gmap in SAS 9.1


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
Posts: 170

Re: proc mapimport and gmap in SAS 9.1

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.
Post a Question
Discussion Stats
  • 1 reply
  • 2 in conversation