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

Folder/ZIP files details #116

Closed SbastianGarzon closed 3 years ago

SbastianGarzon commented 3 years ago

This pull request implements the '--details' argument (CLI and API). This option allows the users to explore the geoextent bbox or/and tbox of individual files inside a folder or ZIP file. Additionally, individual files return the geoextent handler (e.g handleVector) used to extract bbox or/and tbox.

Documentation and test updated.

Fixes #115

SbastianGarzon commented 3 years ago
  1. Can you please post a full example of using the option in a comment? that helps me understand the user perspective. Thanks!

Regular usage:

geoextent -b -t tests/testdata/folders/folder_two_files/

{'format': 'folder', 'crs': '4326', 'bbox': [2.052333387639205, 41.31703852240476, 7.647256851196289, 51.974624029877454], 'tbox': ['2018-11-14', '2019-09-11']}

Details:

geoextent -b -t --details tests/testdata/folders/folder_two_files/

{'format': 'folder', 'crs': '4326', 'bbox': [2.052333387639205, 41.31703852240476, 7.647256851196289, 51.974624029877454], 'tbox': ['2018-11-14', '2019-09-11'],'details': {'muenster_ring_zeit.geojson': {'format': 'geojson', 'geoextent_handler': 'handleVector', 'bbox': [7.6016807556152335, 51.94881477206191, 7.647256851196289, 51.974624029877454], 'crs': '4326', 'tbox': ['2018-11-14', '2018-11-14']}, 'districtes.geojson': {'format': 'geojson', 'geoextent_handler': 'handleVector', 'bbox': [2.052333387639205, 41.31703852240476, 2.228044995904277, 41.46829759051035], 'crs': '4326', 'tbox': ['2019-09-11', '2019-09-11']}}}

nuest commented 3 years ago

Thanks - good job! Just one minor change @SbastianGarzon: It's always good to try to keep the tests very focused, otherwise you have 10 failing tests although only one feature is broken. You already did that for the CLI one!

Sidenote: let's get rid of Travis soon...