On Tue, Jun 16, 2009 at 10:04 AM, Frederik Ramm<[email protected]> wrote: > Andreas Kalsch wrote: >> Conclusion: Make a >> robot change all multipolygon relations to fit into the new model - so >> the software built on top of OSM (starting with the Map renderers) >> doesn't need to care any more of different representations. > > I don't think the new model mandates proper ordering of elements. It may > *suggest* it, but not require it. My take is that if you edit > multipolygons you should try to order the elements properly but if you > read the data you should not assume they are ordered. Because even if we > ran a robot that ordered things, this still does not guarantee that > everything is always correct.
as you say, the new model merely allows ordering and it can safely be ignored in most cases - including multipolygons. the outer/inner roles should probably be considered hints, but nothing more. > Maybe a relatively fast algorithm can be devised that tries to process > things as-is but if that fails (e.g. if there is a gap in a ring) then > switches back to the more computationally expensive method. indeed. but i'd be very surprised if JTS/GEOS's algorithms aren't already fast enough (e.g: http://www.vividsolutions.com/jts/javadoc/com/vividsolutions/jts/operation/polygonize/Polygonizer.html or http://download.osgeo.org/geos/doxygen/classgeos_1_1operation_1_1polygonize_1_1Polygonizer.html ). cheers, matt _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

