epochgeo/pyhoot

Please add a wrapper for WayGeneralizeVisitor

Closed this issue · 3 comments

Please add a wrapper for this:

https://github.com/ngageoint/hootenanny/blob/master/hoot-core/src/main/cpp/hoot/core/visitors/WayGeneralizeVisitor.h

I would like to try using this to generalize political boundaries.

Thanks!

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")

@jasonsurratt I just tested this from the C2S TDP conflate instance. You can access it there, or I can process any files you have.

Fantastic! Thanks @bwitham !