o2r-project / geoextent

Python library for extrating geospatial extent of files and directories with multiple data formats
https://o2r.info/geoextent/
MIT License
1 stars 4 forks source link

Raster and Vector support (GDAL/OGR) #99

Closed SbastianGarzon closed 3 years ago

SbastianGarzon commented 3 years ago

Fixes #28 Fixes #25 Fixes #92 Fixes #26 Fixes #16

This pull request modify the handle of vector and raster files (including format detection #28 and time extraction #16). The driver detection is performed by osgeo (GDAL/OGR) package. Extraction of geographical extent (BBOX + CRS) is performed using osgeo which allows to support multiple raster and vector file types (e.g #25 , #92, #26).

nuest commented 3 years ago

The tests on Travis fail: https://travis-ci.org/github/o2r-project/geoextent/jobs/748422447

There seem to be mismatches between the coordinate order and the number of decimals that are extracted. Could this be due to different versions of GDAL used?

I see two directions here for you to investigate:

  1. change the tests to not compare strings, but to parse the output and compare numbers with a specified precision (accepting some numberial differences)
  2. make the number of decimals in the output configurable

Any other idea how to approach this?

SbastianGarzon commented 3 years ago

MacOs Tests are using GDAL 3.2.0 Ubuntu test are using GDAL 3.1.3. Relevant changes: https://github.com/OSGeo/gdal/blob/v3.2.0/gdal/NEWS#L740 Issue: https://github.com/OSGeo/gdal/issues/2195