Posted 23 November 2010 - 12:52 PM

I'm working on a few 'pro-bono' projects for a non-profit organization.

Open Street Map data seems complete enough for my needs... How do you guys work with the data? I'd love to just drop it straight into Illustrator.

I've been thinking about purchasing a MaPublisher license, has anyone had experience working with geo-referenced OSM data in MaPublisher?

You can not just import OSM data into MAPublisher atleast not yet. Your going to need to use (assuming you don't have FME or not sure if ArcGIS 10 can import that data) the newer versions of QGis. Assuming you going to extract the data into separate layers using MAPublisher your going to have to use the spatial tool (MAP Selections) & the "Split Layer" tool.

Step by Step Solution:

1. Import (prefer advanced over simple) the data. eg. 45352_ln.shp

several optional steps such as set projection, map size, etc.

2.Open up "Map Attributes" & lets take a look at the columns:

In an OpenStreet file there should be:

- timestamp- user (responsible for data collection)- tags (very important because you are going to need to extract some data using this column)- name (community, city, town, etc.)- place- highway (I think you get this one but note I would likely select by attributes which do not contain an empty space)- landuse (is it industrial, residential?)- waterway (not waterbodies but think of rivers, canals, etc.)- amenity (schools, parking, etc.)- tourism (museums, information etc.) - learning

Showing two examples:

3. Open up "Map Selections" 4. Create new map selection5. Name is optional, keep attribute filter on & select that pencil at the bottom of that pop up6. In the expression builder we are going to create an expression for our roads selection:So in the Objects screen scroll down & select from the list: RoadsIn the top of the expression builder popup select the equals sign (=)Scroll back down again to highway, (no double clicking). Notice on the right at the bottom of the description form a link called "display by value". Single click that & select an attribute. If you need to make more then one selection your going to be required to use "Or" from the top of the popup.

However if you need to extract lakes from the database but there is no field that allows you to just simply extract them like the previous method. Then try a "LIKE" expression from the pull down list:

eg. lets say you need to extract waterbodies from a polygon file:

And the only column that you can use to extract these features from is the "Tags" field & you get something like this:"natural"="water" Natural could be a number of things so to extract all double line water features, & lakes you will need to use: LIKE(column, "expression") or LIKE(tags, "water")

Whew that's just an example of a step by step procedure used to work on OpenStreetMap data.

"There is much beauty that we fail to see through our own eyes teeming with life forms that give us that perception of our reality. Leaves on the trees blowing gently in the wind, or scarily, the waves pounding through high surf, or lightly on a warm summer’s day; that opportunity to sit or swim in the water on a white beach. That comfort to shout, “The universal conscious do you hear me? I am alive, guide me dear logos towards the path of rightnesses.” Earned what has been kept, no longer to be absorbed into a life filled with cold damn winds and that stubborn fog clouding my vision with nothing but darkness."

Hans van der Maarel

Posted 23 November 2010 - 01:47 PM

I have a tutorial with screenshots for the Qgis -> Shapefile -> MAPublisher route that I've been meaning to translate and publish. Will try to give that a shot in the next few days.

The problem with OSM (well, one of them anyway), is that the Cloudmade and Geofabrik shapefile downloads that have been mentioned here, as well as the QGis shapefiles and my own FME process, have different data models...

Nick H

Posted 23 November 2010 - 02:23 PM

Nick H

Legendary Contributor

Validated Member

307 posts

Gender:Male

Location:Caversham, Reading, England.

United Kingdom

I had no idea Qgis even existed! Installing now. Amazing!

I hope you enjoy QGIS, it's getting better by the day (literally; a new development version arrives almost every day). To add to the very helpful advice that Hasdrubal gave above, I'd mention that QGIS has a tool that will import data in OSM format directly to PostGIS (osm2pgsql). Once in the database selecting exactly what you need and bringing it into QGIS is very easy (even for me, and I don't know much about Postgres and PostGIS).

On the other topic, if I remember rightly, the SVG exported from OSM won't load into Illustrator. But you can also export Mapnik-rendered maps from the OSM web site as PDFs and I wonder if these will load into Illustrator? I'm not in a position to check this.

Posted 24 November 2010 - 03:44 PM

Run an Apple Hardware Test & if you find out that you have bad RAM then you better send a report to Apple. In this case it's not the software. But you should also look up the error on the internet for further information. Also you could alsways post a link for us to download that OSM file for us to check it out.

"There is much beauty that we fail to see through our own eyes teeming with life forms that give us that perception of our reality. Leaves on the trees blowing gently in the wind, or scarily, the waves pounding through high surf, or lightly on a warm summer’s day; that opportunity to sit or swim in the water on a white beach. That comfort to shout, “The universal conscious do you hear me? I am alive, guide me dear logos towards the path of rightnesses.” Earned what has been kept, no longer to be absorbed into a life filled with cold damn winds and that stubborn fog clouding my vision with nothing but darkness."

When I export with the XML method, i have to rename the file from map.osm.xml to just map.osm

Could this be part of the issue? I dont get any options when I click the export button on Open Street Maps though, so I'm not sure how I'd get around this.

Okay I have tried using the same method & had no problem bringing in a portion of Ottawa into QGis 1.5.

First thing when I hit the export button I checked the extension which read map.osm. Where the .xml came from is beyond me at the moment. But what I can tell you it appears that you have two extensions to your file which should not exist, so yea it could be a partial reason. What I would do is re download the area & if you encounter the same problem try using the "download OSM file" tool (down blue arrow) & try these coordinates as an experiement:

Lat: 44.25 to 45.5Lon: -76.25 to -74.5

Keep in mind you can only download every 0.25° & the data must contain no more then 5000 nodes.

It should work & if not I recommend uninstalling QGis & then reinstall to see what happens. If your still having problems after all of that can you please let us download the files to see or fix the problem. I will do the work myself & let you know if I encountered any problems.

"There is much beauty that we fail to see through our own eyes teeming with life forms that give us that perception of our reality. Leaves on the trees blowing gently in the wind, or scarily, the waves pounding through high surf, or lightly on a warm summer’s day; that opportunity to sit or swim in the water on a white beach. That comfort to shout, “The universal conscious do you hear me? I am alive, guide me dear logos towards the path of rightnesses.” Earned what has been kept, no longer to be absorbed into a life filled with cold damn winds and that stubborn fog clouding my vision with nothing but darkness."

Nick H

Posted 25 November 2010 - 07:33 AM

I'm having an issue with the OSM plugin. my Qgis crashes when I try to open the .osm file (I chose a very small chunk of Ottawa, and tried importing fewer layers) Could my QGis be corrupt?

Sorry to here about your problems with QGIS. I guess that you installed 'Qgis 1.5.0-3 (standalone) for Snow Leopard', is this right?

In QGIS it might be worth uninstalling the OpenStreetMap plugin (Plugins -> Fetch Python Plugins...), reinstalling it and then restarting QGIS. You'll know this anyway, but the plugin you need is the OpenStreetMap plugin (not the OSM Tools plugin!).

The problem is that having downloaded an *.osm file when you try to load it by going Plugins -> OpenStreetMap -> Load OSM from file, this crashes QGIS. I don't know why this is happening, all I can say is that the plugin works perfectly on my system (Vista, QGIS 1.6 and QGIS 1.7). But this doesn't help you much.

As a work-around, if you'd care to post the extents of your area of interest, plus how you would like the data projected (OSM files are WGS84 lat/lon) I could make the shapefiles (this would be about a minute's work).

I do hope your problems won't cause you to walk away from QGIS, it is really is worth persevering with.

Nick H

Posted 25 November 2010 - 11:57 AM

Nick H

Legendary Contributor

Validated Member

307 posts

Gender:Male

Location:Caversham, Reading, England.

United Kingdom

Looks good, click the 'OpenStreetMap XML Data' radio button, then click 'Export'. Then wait, it can take some time. The file you download will have the extension *.osm and should load into QGIS using the OpenStreetMap plugin.