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

Integrate DOI-based retrieval functions for selected data repositories #100

Closed nuest closed 3 years ago

nuest commented 3 years ago

Zenodo, OSF, Figshare, Pangaea, ...

We need those functions for the survey anyway #57

nuest commented 3 years ago

Extract the DOI to download functions from repo2docker into own lib and then base both tools on that.

nuest commented 3 years ago

Contentproviders: https://github.com/jupyterhub/repo2docker/tree/master/repo2docker/contentproviders

DOI to URL: https://github.com/jupyterhub/repo2docker/blob/master/repo2docker/contentproviders/zenodo.py#L46

Fetch code for Zenodo: https://github.com/jupyterhub/repo2docker/blob/master/repo2docker/contentproviders/zenodo.py#L53


# first
geoextent -b -t --output path/to/my.gpkg \
    https://zenodo.org/record/3528062

# second
geoextent -b -t --output path/to/my.gpkg \
    https://doi.org/10.5281/zenodo.3528062

# bonus
geoextent -b -t --output path/to/my.gpkg \
    10.5281/zenodo.3528062 \
    10.5281/zenodo.1234567
nuest commented 3 years ago

DOI check function: https://github.com/jupyterhub/repo2docker/blob/a0606f2b570914e6bb9b38c001ed4a9282c4928c/repo2docker/utils.py#L446

nuest commented 3 years ago

125 implements this for Zenodo. Other content providers are added to the development queue at #126 #127 #128 #129 #130 #131