[OSM-talk] Splitting Long Ways/Polygons

marcus.wolschon at googlemail.com marcus.wolschon at googlemail.com
Tue Feb 17 11:01:50 GMT 2009


On Mon, 16 Feb 2009 19:50:07 +0100, Frederik Ramm <frederik at remote.org>
wrote:
> For long waterways, it is absoutely usual to split them into a number of 
> ways of manageable size (think not only of the API limit but of someone 
> downloading an area touched by the river in JOSM!).
> 
> Optionally, use a relation to group the parts.

What is the correct relation to use here?
I am only aware of relations tagged "type=street"
to group long streets.
I use them when combining long streets for low
zoom levels and would like to do the same for
long waterways and coastlines.


> The same is true for large areas, with the exception that you *must* use 
> a relation (see 
> http://wiki.openstreetmap.org/wiki/Talk:Relation:multipolygon, under 
> "advanced multipolygons").

When polygons and roads are split, I am currently relying in my
API0.6-code on the correct order of elements (relations are ordered
with api 0.6). If one way does not fit where the last ended a new
polygon/polyline is started.

Does anyone have an algorithm to combine these that can work
recursively starting with a single way and using no global searches
(e.g. only getWaysForNode(), never getAllWays(Bounds)).

Marcus




More information about the talk mailing list