Given a way geometry (from OSM), I would like to convert them to "circles" - a center point + radius guaranteed to contain the whole object. Plus I would need a set of functions to perform various union operations:
- calculate centroid (already done using shapely)
- calculate smallest radius that encloses the whole way
- be able to combine two circles, produce a new center+radius circle that contains both.
- be able to combine one circle with one point (find a new center + radius that contain previous circle and the node)
- (simple case) combine two nodes into a circle
Is there a (preferably Python) library to do this? Ideally the library should calculate surface distance rather than direct distance for the radius.