DATA Step, Macro, Functions and more

Easiest way to import geography boundary files?

Reply
Frequent Contributor
Posts: 76

Easiest way to import geography boundary files?

I have access to three formats, wondering which is the easiest to import and use to make a map in SAS:

 

-ArcGS (.shp)

-Geography markup (.gml)

-MapInfo (.tab)

Super User
Posts: 17,828

Re: Easiest way to import geography boundary files?

SHP files are supported by default and the easiest.

 

 

Frequent Contributor
Posts: 76

Re: Easiest way to import geography boundary files?

Thanks, it's now saying "SHX file is not found or is invalid".

 

The SHP also came with an SHX, is it trying to call out for that or something?

Community Manager
Posts: 2,761

Re: Easiest way to import geography boundary files?

Here's an example of using MAPIMPORT with 3rd party shape files.

 

More information from @MikeZdebhttp://www.lexjansen.com/nesug/nesug11/gr/gr11.pdf, including some details about SHX.

 

 

 

Frequent Contributor
Posts: 76

Re: Easiest way to import geography boundary files?

Thanks I was actually just reading this and it helped solve my problem!

Super User
Posts: 17,828

Re: Easiest way to import geography boundary files?

A SHP file isn't a single file, it has 3 other files at least that have supporting information. 

 

If you downloaded the SHP file from somewhere all the files should be included.

 

By chance are you working with the Statistics Canada Boundaries? You'll also need to project them if you do. 

If this is the case, message me with your email address and I'll send you the code that walks through using the StatCan boundaries (CSD I think in the example). 

Ask a Question
Discussion stats
  • 5 replies
  • 111 views
  • 4 likes
  • 3 in conversation