Does anyone know a CPAN module for defining and operating on geographical bounding boxes?
Defining a bbox is straight forward: specify 2 opposite corners as (lat,lon) each. However, I need functionality like:
- create a bounding box centred at (lat,lon) of so-and-so width and height
- bbox1 encloses/equals bbox2
- trim a bbox, expand a bbox
- find area, find centre
- convert to different formats, e.g. OpenStreetMap bbox, trivial but convenient
I found some functionality (e.g. centred-at) in Geo::Calc but ideally I would like a single module that does all these before creating my own and risking a lot of pitfalls.