A CLI tool to download data from Spanish Cadastre Atom Service
Project description
Catastro Inspire Downloader
Herramienta para descargar datos del servicio ATOM Inspire de Catastro y convertirlo en GeoPackage.
Necesita disponer de GDAL >= 2.3.3. y Python 3
Usar la CLI
Para instalar:
pip install CatastroInspireDownloader
Para ejecutar:
$ cidownloader --help
Usage: cidownloader [OPTIONS]
Catastro Inspire Downloader.
Utilidad que permite descargar cartografía del servicio inspire de la
Dirección General de Catastro.
Genera un fichero GeoPackage.
Options:
-p, --provincia INTEGER Código Gerencia Catastro. Si no se indica descarga todas las provincias.
-m, --municipio INTEGER Código Municipio Catastro. Si no se indica descarga todos los municipios.
--srs INTEGER Código EPSG final. Si no se indica, se mantendrá el de origen.
--tipo [all|parcels|buildings|addresses] Tipo Cartografía a descargar. Default: 'all'
--filename TEXT Nombre Geopackage sin la extensión
-s, --separar_salida Separar salida a un GeoPackage por Provincia
--version Show the version and exit.
--help Show this message and exit.
Si se ejecuta sin opciones descarga todos los municipios de España y genera un GeoPackage llamado buildings.gpkg de unos 25 Gb.
Un ejemplo de uso sería
cidownloader -p 36 -m 62 --srs 25829
Generar MVTs desde el GeoPackage
Se puede generar un fichero mbtiles de Mapbox Vector Tiles con las construcciones de catastro:
ogr2ogr -f "MVT" -dsco MINZOOM=14 -dsco MAXZOOM=16 -lco "NAME=buildingparts" -sql "SELECT localID AS id, substr(localid, 0, 15) as parcel, numberOfFloorsAboveGround AS floors, geom FROM BuildingPart WHERE numberOfFloorsAboveGround > 0" buildings.mbtiles buildings.gpkg
Build
python3 -m pip install --upgrade build
python3 -m build
Publish
python3 -m pip install --upgrade twine
python3 -m twine upload dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file catastroinspiredownloader-0.3.1.tar.gz.
File metadata
- Download URL: catastroinspiredownloader-0.3.1.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b1af32d2085a4bd661e31236e158193d1753b837c046df9ba52562b0f5dd8da
|
|
| MD5 |
622fa060a79fec6648759eb011f22f94
|
|
| BLAKE2b-256 |
e9269d9f37679dfdac05ab1ee47eab0773cede3a61ca618602293e1ba887a7b4
|
File details
Details for the file catastroinspiredownloader-0.3.1-py3-none-any.whl.
File metadata
- Download URL: catastroinspiredownloader-0.3.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c72638d57ccbae5bd182431f9963d037eb234f9d41f9dd0907ced11005cdee7
|
|
| MD5 |
df0a21219e6f9730bd044710ae21cfaa
|
|
| BLAKE2b-256 |
e13e58826a767c133023499c5fa4ba7d6dc95763467531a017e533b572fadacd
|