[OSM-dev] Osmosis: Extracting by polygon

Brett Henderson brett at bretth.com
Tue Feb 3 12:18:14 GMT 2009


Rolf Bode-Meyer wrote:
> Hello!
>
> I'm on my first steps with osmosis.
> I managed to create a polygon file from the outer way on a
> multipolygon in the OSM data. So osmosis now should extract exactly
> the area bounded by that way. And indeed it mostly does, but some
> nodes of the way of the multipolygon are not in the output data.
>
> I checked the nodes in the polygon to exactly have the same
> coordinates, decimal place for decimal place. Is this some sort of
> rounding problem when java reads in the string with the coordinate? Is
> this a known problem?
>   
I think this is expected behaviour.  Osmosis is using the standard java 
2D support, in particular implementations of this interface:
http://java.sun.com/javase/6/docs/api/java/awt/Shape.html

Check the definition of "insideness" in the above link, just because a 
point lies on the boundary doesn't necessarily mean it will be 
considered "inside" the shape.
> Related to extracting data: usage of the option clipIncompleteEntities
> to --bp is answered by exception:
> "com.bretth.osmosis.core.OsmosisRuntimeException: Argument
> clipIncompleteEntities for task 2-bp was not recognised."
> [[Osmosis/DetailedUsage]] lists this option. Other options to this command work.
>   
That option only applies to 0.6 versions of the task.  I'll fix the 
wiki, apparently I forgot to specify that when documenting it.

Brett





More information about the dev mailing list