4

I'm currently going through my first project with OpenStreetMap data and I'm struggling to see how certain features can be made to look anywhere near as good as in OpenStreetMap.org.

I downloaded a pre-built Shp from Cloudmade for Ontario and many of the big lakes in the south are terrible - a polygon might cover a fraction of a lake's actual area and makes for poor visualisation. I think this is a result of OSM data only containing points and lines, and someone having to build polygons from these lines. Furthermore, I looked at the administrative boundaries lines layer and there were 100,000s of line features for all kinds of administrative entities but apparently no attributes that could help me build a single polygon for the province's full border.

Now, I know that the Cloudmade Shps have been through some post-processing to whittle the many feature types in the .osm XML down to 7 or 8 layers, so perhaps the way they collate administrative boundaries is not perfect for my area. Also, as the Ontario Shps don't cover the US states that also border the big lakes perhaps this explains why the lake polygons were not well formed, but if I have to download the .osm XML for such a large area and process it all myself this causes other issues - it will take a lot of time and many iterations and I don't know if the end result will be worth the effort (e.g. what if the lines that make up a lake's border don't properly meet up, and snapping introduces unwanted artifacts - or maybe none of the lakes are actually 'closed' because they all have rivers connected to them, so building a polygon is just impossible?)

I'm guessing that to make the map in OpenStreetMap.org someone must have processed all the data to build polygons where necessary. Presumably all country / state / province borders were created as polygons and shaded, and either the same was done for all lakes / oceans or the map simply has a blue background and everything else is layered on top? If this polygon data was created for the OpenStreetMap.org map, why can't I access it anywhere? It seems like there should be an additional resource between the raw XML and the state / province-specific Shps that have been processed according a particular rule-set

If anyone has come across similar issues and has any kind of advice I'd really appreciate it!

3 Answers 3

2

I've come across this issue as well while working on a lakefront city (Cleveland) in the Great Lakes.

There is polygon data that contains of all large bodies of water in the world (includes the Great Lakes) called 'coastline' at http://wiki.openstreetmap.org/wiki/Coastline#Rendering

They are already available as shapefiles:

http://tile.openstreetmap.org/processed_p.tar.bz2 and http://tile.openstreetmap.org/shoreline_300.tar.bz2

or a mirror:

http://tilemill-data.s3.amazonaws.com/osm/shoreline_300.zip http://tilemill-data.s3.amazonaws.com/osm/processed_p.zip

(one of them, processed_p, if I remember correctly, is for low zoom levels - 1-9, the other has better resolution and should be used for zoom 10+).

In my experience, state/province extracts (though ones I've used were in .OSM) include rivers and any other waterways that reach the any of the great lakes or oceans (as long as they have added to osm, in the first place).

1

There are two separate issues here:

  1. The OSM data itself: it's not perfect, especially when it comes to borders and how they are tagged. There are regional variations on how things are tagged and there are also variations on tagging between individual OSM contributors.
  2. OSM data to shapefiles conversion: shapefiles as a format are far from being perfect themselves, especially when it comes to maintaining topology of the original OSM data.

From my experience, in order to get the data into a state that would be useful for cartography or geospatial processing, there needs to be done a fair amount of post-processing done (and done using original data, not shapefiles). My approach is to do this programmatically (but then again, I'm a programmer).

2
  • I have already worked through a lot of post-processing on the OSM XML data, but I prefer to use FME where possible as so much development effort has already gone into this tool and it's (almost) always preferable to writing your own process. It's not free software, but if you spend a lot of time writing your own processes for different datasets you will quickly burn more $ in time than the cost of purchase
    – tomfumb
    Commented Mar 28, 2012 at 0:34
  • Well if FME allows you to do processing on OSM data directly, then I don't see a problem.
    – Igor Brejc
    Commented Mar 28, 2012 at 6:03
0

I am working on an iOS app which solves this coastline to polygon issue and will post the code I used to do it when it’s ready.

1
  • 1
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Jan 15 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.