Please add a wrapper for WayGeneralizeVisitor
Closed this issue · 3 comments
jasonsurratt commented
Please add a wrapper for this:
I would like to try using this to generalize political boundaries.
Thanks!
bwitham commented
Done. Will be in next release. Example code:
osm_map = IoUtils.read_osm_xml("tmp/in.osm")
vis = hoot.WayGeneralizeVisitor()
vis.set_epsilon(5.0)
vis.set_remove_nodes_shared_by_ways(True)
osm_map.visit_rw(vis)
IoUtils.write_osm_xml(osm_map, "tmp/out.osm")
bwitham commented
@jasonsurratt I just tested this from the C2S TDP conflate instance. You can access it there, or I can process any files you have.
jasonsurratt commented
Fantastic! Thanks @bwitham !