Hi,

Although I wrote to Brett directly that extending the polygon to 181°
works I have observed that is works only for osm input but not for pbf
input.

osmosis --read-pbf file=180.osm.pbf --bounding-polygon file=asia.poly
--write-xml file=filtered.osm
throws an exception:

SCHWERWIEGEND: Thread for task 1-read-pbf failed
> [...snip...]
> So the pbf parser should be changed.

I don't think this is a problem in the PBF parser. It just shows up in the stack trace because in your pipeline, the PBF reader and the poly filter are in the same thread. The relevant portion of the stack trace is:

java.lang.IllegalArgumentException: Bound coordinates outside of valid range
        at 
org.openstreetmap.osmosis.core.domain.v0_6.Bound.<init>(Bound.java:72)
        at org.openstreetmap.osmosis.areafilter.v0_6.PolygonFilter.simpleBoundIn
tersect(PolygonFilter.java:118)
        at org.openstreetmap.osmosis.areafilter.v0_6.PolygonFilter.process(Polyg
onFilter.java:71)

The Bound class does not or should not really care at this point whether the data is from PBF or XML or wherever. So if there's a bug, it's actually in the Bound which has some incorrect argument validation code or in the PolygonFilter which passes incorrect arguments to the Bound, not in the PBF reader.

Could you post your extended polygon with 181° here so I can test this? Because if it works with XML but not with PBF it gets really interesting ;)

Bye
Igor

_______________________________________________
osmosis-dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/osmosis-dev

Reply via email to