Skip to main content

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/*

Metadata

Release files for CatastroInspireDownloader 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CatastroInspireDownloader 0.3.2
File Size Uploaded
catastroinspiredownloader-0.3.2.tar.gz 17.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CatastroInspireDownloader 0.3.2
File Interpreter ABI Platform
catastroinspiredownloader-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 23.5 kB

Release files / catastroinspiredownloader-0.3.2.tar.gz

Download URL catastroinspiredownloader-0.3.2.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3431e31a55dbc644ca73196355383b90b0d5ac306b877fb2fa9938333b3fe024
BLAKE2b-256 checksum
How to use checksums
e4cc2973d3dad915172fbdfb6a2b09edfdb1b2877a6b14493a92c2cbb2d11773
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release files / catastroinspiredownloader-0.3.2-py3-none-any.whl

Download URL catastroinspiredownloader-0.3.2-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e18be2115528df97995201ba63d4f1a64e18848718dd41e74847363a33ebb6b8
BLAKE2b-256 checksum
How to use checksums
f3d5841f1fc06c948a55f13f9e57517e962a691083644d05b24a48e118f31347
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

1 release file

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page