Docs
Contents

Your first download

Three requests: find the layer, ask for the URL, verify what arrived.

1. Find the layer

export GEOVIS_API_KEY="your-key"
curl -s -H "x-api-key: $GEOVIS_API_KEY" \
"https://datos.geovis.es/v1/data/datasets?pais=ee&tema=ambiente" | jq '.datasets[].id'
"ee_ambiente_conservacion"
"ee_ambiente_monumentos"
"ee_ambiente_natura_zec"
...

2. Ask for the signed URL

curl -s -H "x-api-key: $GEOVIS_API_KEY" \
https://datos.geovis.es/v1/data/datasets/ee_ambiente_conservacion/download > download.json
jq '{bytes, sha256, filas, licencia}' download.json
{
"bytes": 5162246,
"sha256": "9635cc37e798d44a...",
"filas": 306,
"licencia": "CC-BY-4.0"
}

Note that the sha256 arrives before the file does. That is what makes the next step worth anything.

3. Download and verify

curl -s -o conservation.parquet "$(jq -r .url download.json)"
# Linux: sha256sum · macOS: shasum -a 256
shasum -a 256 conservation.parquet
jq -r .sha256 download.json

Both values must be identical.

4. Open it

import geopandas as gpd
gdf = gpd.read_parquet("conservation.parquet")
print(len(gdf), gdf.crs) # 306, EPSG:4326
print(gdf.columns.tolist())

What next

You rarely need the whole file: query it without downloading.