[OSM-dev] (Multi)Polygon handling

Paul Norman penorman at mac.com
Fri Jul 13 09:13:42 BST 2012

> From: nimix [mailto:melchiormoos at gmail.com]
> Sent: Friday, July 13, 2012 12:58 AM
> To: dev at openstreetmap.org
> Subject: [OSM-dev] (Multi)Polygon handling
> Frederik Ramm wrote
> >
> >
> > If we can't get everyone to use the same code base, then it would at
> > least be great to reach some kind of agreement here, or maybe at least
> > produce a test suite that everyone runs their code against.
> >
> >
> I created a testsuite for that with some more cases that need special
> treatment. Unfortunately I only stored the WKB representation in Google
> mercator projection, so it is not very human readable. The testcase
> contains a LINESTRING and a MULTIPOLYGON for simple closed ways and for
> relations a MULTILINESTRING and a MULTIPOLYGON ([1]).
> I would volunteer to bring it in an other format so that it is useful
> for everyone writing converters and I would like to discuss what is the
> best way to do it. I would suggest an .osm file and a Wiki Page
> containing the expected results in WKT/WKB and some explanation for each
> case. Any other ideas?
> Best regards,
> Melchior

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.

More information about the dev mailing list