[OSM-dev] (Multi)Polygon handling

nimix melchiormoos at gmail.com
Fri Jul 13 14:06:18 BST 2012

Peter Wendorff wrote
>> My following of web standards has convinced me it is necessary to define
>> the
>> expected output in every case, including invalid ones, or you will have
>> differing implementations. I've been giving it some thought as to what
>> needs
>> to be tested, and I don't think it's excessive. I'd estimate 25-50 small
>> tests would cover everything.
> +1
> But it should be possible to reject false polygon models.
> So to say:
> - any application "must" deal with correct tagging in the same way 
> (which is defined by the corresponding test cases)
> - if an application interprets wrong polygons, it "must" do it in the 
> way which is defined by the corresponding test cases
> - but(!) every application is allowed to reject these polygons because 
> of errors
> - any application is encouraged to report wrong polygons detected to 
> users who may be able to fix that in the database.

That sounds reasonable. But we need to agree on what is valid and what is
treated as invalid. In the testsuite of closed ways that I commited to
github I defined an output for every case, but I'm not sure if the inputs
are valid. My guess would be:
1) Definitely valid
2) valid
3-5 not sure
6) invalid
7) valid
8) not sure
9) invalid
10) valid
11,12) invalid

For everybody not willing to look on github: 
I'm talking about the polygons in [1] from bottom to top.
[1] https://dl.dropbox.com/u/58628/polygontest.osm

Best regards,

View this message in context: http://gis.19327.n5.nabble.com/New-OGR-driver-to-read-OpenStreetMap-osm-pbf-files-tp5715906p5716469.html
Sent from the Developer Discussion mailing list archive at Nabble.com.

More information about the dev mailing list