mbari-org / SeafloorMappingDB

Make MBARI seafloor mapping datasets more accessible and useful
GNU General Public License v3.0
3 stars 6 forks source link

Add surveyed_area to Mission table #151

Open jbpaduan opened 2 years ago

MBARIMike commented 2 years ago

The Geopandas package has a .area() method that we could use:

https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoSeries.area.html#geopandas.GeoSeries.area

It would require generating a Polygon representing the boundary of the irregular area surveyed.

Here's another example implementation: https://stackoverflow.com/a/69220519/1281657

MBARIMike commented 2 years ago

Looking at gdal utilities… Looks like dgal_translate can be used to convert a geotiff to cylindrical equidistant, e.g.:

gdal_translate -a_srs EPSG:4087 <src.tif> <dst.tif>

And then gdal_polygonize.py can be used to generate Polygons representing the area where ther's valid data in a grid.