Reader of Cadastre ATOM GML files.
Bases: object
Class to download and read Cadastre ATOM GML files.
Download the file for a Cadastre layername.
layername (str) – Short name of the Cadastre layer. Any of “building”, “cadastralzoning”, “address”
Try to download the ZIP file for self.zip_code.
Given the url of a Cadastre ATOM service.
Get handler for gml_path (if exist) or for zip_path.
Return gml layer from zip if exists and is valid or none.
Detect if the file is empty.
Cadastre empty files (usually otherconstruction) comes with a null feature and results in a non valid layer in QGIS.
Create a QGIS vector layer for a Cadastre layername.
Derive the GML filename from layername. Downloads the file if not is present. First try to read the ZIP file, if fails try with the GML file.
layername (str) – Short name of the Cadastre layer. Any of “building”, “buildingpart”, “otherconstruction”, “cadastralparcel”, “cadastralzoning”, “address”, “thoroughfarename”, “postaldescriptor”, “adminunitname”
allow_empty (bool) – If False (default), raise a exception for empty layer, else returns None
force_zip (bool) – Force to use ZIP file.
Vector layer.
QgsVectorLayer