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

Hi Igor,

attached you find the modified poly file.
I have to add that I tried the XML reader with my test file whereas the PBF reader was tested with the pbf planet dump (ftp://ftp5.gwdg.de/pub/misc/openstreetmap/planet.openstreetmap.org/pbf-experimental/planet-latest.osm.pbf which I think is dated from June 10th). Maybe that makes a difference?

PBF reading failed with the given exception. XML reading was successful and the 180° longitude node was successfully transferred to the filtered file.

WanMil



asia
1
   2.617000E+01 8.452666E+01
   1.810000E+02 8.438487E+01
   1.810000E+02 -6.047430E+00
   1.549109E+02 -1.706773E+01
   1.423600E+02 -1.028527E+01
   1.305624E+02 -1.026417E+01
   1.180968E+02 -1.325060E+01
   1.027800E+02 -1.197537E+01
   6.162511E+01 -9.103512E+00
   5.422892E+01 1.260610E+01
   4.420775E+01 1.167860E+01
   3.978016E+01 1.656855E+01
   3.160401E+01 3.158641E+01
   3.586444E+01 3.629862E+01
   3.655970E+01 3.766439E+01
   4.410530E+01 3.798438E+01
   4.301638E+01 4.127191E+01
   4.128304E+01 4.141274E+01
   3.625000E+01 4.513920E+01
   3.860000E+01 4.899000E+01
   3.170000E+01 5.204300E+01
   2.617000E+01 5.614300E+01
   2.617000E+01 8.452666E+01
END
2
   -1.682500E+02   7.770000E+01
   -1.810000E+02   7.770000E+01
   -1.810000E+02   5.810000E+01
   -1.682500E+02   5.810000E+01
   -1.682500E+02   7.770000E+01
END
END
_______________________________________________
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev

Reply via email to