Data visualization with SAS programming

Open Street Maps how do I import an OSM file?

Reply
Frequent Contributor
Posts: 75

Open Street Maps how do I import an OSM file?

[ Edited ]

I have been reading that Open Street Map OSM files are XML files. I can parse these out into SAS datasets importing as text files and then formatting the latitude and longitude readings, if I get the file converted to GEOJSON first.

 

I would like to find a way to import large 50 GB OSM files. I just need the building data. Here is something talking about an XML schema for OSM format https://wiki.openstreetmap.org/wiki/OSM_XML.

 

I am reading on the community here that SAS may have used Open Street Maps in the past. I wonder if someone here knows how to import an OSM file and say subset it for only building nodes. Is there some quick XML syntax I could use with The new PROC JSON Parser or another XML procedure.

 

I have spend a few days trying different things I have results I can use for GEOJSON files but now want to work from the OSM files.

 

I have SAS 9.2, SAS9.3 SAS 9.4 M4 and JMP and SASEG 7.1 to use.

 

Thanks in advance.

Respected Advisor
Posts: 2,903

Re: Open Street Maps how do I import an OSM file?

Did you know that SAS Visual Analytics uses Open Street Maps? You could layer your GEOJSN data directly onto a SAS VA map without any programming required.

Frequent Contributor
Posts: 75

Re: Open Street Maps how do I import an OSM file?

I will see if I can get that SAS VA software installed for this project. Mapping is only one aspect of this. I also need to build a database.

SAS Employee
Posts: 170

Re: Open Street Maps how do I import an OSM file?

We also use OSM in Proc GMAP.  See the paper:

http://support.sas.com/rnd/papers/#2013

Google-like Maps in SAS

There is a paper and the examples there.  We just use the rendered image of the map.  So, we return an image to SAS and VA.

The Planet File from OSM is huge!

 

Frequent Contributor
Posts: 75

Re: Open Street Maps how do I import an OSM file?

[ Edited ]

To clarify I am not using this data for a map or visual display at this time. I want to extract only the buildings' footprints ( a polygon) into a database. I want a SAS dataset with the buildings/nodes OSMID value (name of building too and type) and the value of the latitude and longitude points of the footprint's way points.

SAS Employee
Posts: 170

Re: Open Street Maps how do I import an OSM file?

It seems you want to read the Planet File.  

As I said, it is huge.  I believe that it is between 50 and 60 GB compressed and over 700 GB uncompressed.

I haven't tried to read the individual components from it or do what you want to do.  

The Planet File is at: https://planet.openstreetmap.org/

And information in: http://wiki.openstreetmap.org/wiki/Planet.osm

 

Good luck.  Tell us about your experience reading it.

Post a Question
Discussion Stats
  • 5 replies
  • 190 views
  • 0 likes
  • 3 in conversation