Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re^2: Geo bounding box module?
in thread Geo bounding box module?

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1233476]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-24 00:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found