more useful options | |
PerlMonks |
Re^3: Geo bounding box module?by swl (Parson) |
on May 08, 2019 at 21:31 UTC ( [id://1233476]=note: print w/replies, xml ) | Need Help?? |
I did not realise you needed geodesic calculations. The options below need code, so do not address your original criterion of being pre-packaged, but maybe they will help. One option is to use Geo::Proj to project your coordinates into a projected coordinate system, perhaps varying the system by location and extent to minimise distortions. Or hand roll such a system yourself. This should in many cases involve updating an existing system with your own central meridian and perhaps parallel(s) of latitude, and this can be done using the proj string. Coordinate systems can be downloaded from http://spatialreference.org/. Which is best depends on the spatial extent of your bounding boxes. You might also have some luck with GDAL via Geo::GDAL::FFI. I have not checked if its centroid method handles data in geographic coordinates, but it's not a new problem so I would not be surprised if it does. The issue with this approach is that GDAL is a big beast, so it will take a while to install Alien::gdal and its dependencies if they are not already on your system. Edit: I just re-read your initial requirements, and GDAL has operations for all the criteria you listed.
In Section
Seekers of Perl Wisdom
|
|