Nice work on the script! Frederik Ramm wrote: > A better way to do this would be using the algorithms I nicked from > GPSBabel and implemented in the "simplify way" code for JOSM but I'm > not in a mood to perlify them atm. > Would it be simpler to add the polygon simplification into the polygon loader in osmosis itself? Already being java it might be simpler than rewriting in perl. There is a single class named PolygonFileReader which parses a polygon file into a java.awt.geom.Area instance. It has a method named loadSectionPolygon which reads a single polygon from the file and converts into an Area class which is subsequently added to or subtracted from the result Area. Presumably this loadSectionPolygon method could be modified to call a "simplification" method that accepts a complex set of coordinates and returns a simplified set of coordinates.
Would this be hard to do? I'm not volunteering to do it just yet but if it sounds straightforward I can add it to the future features list ... Brett _______________________________________________ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev