fix: 补全楼宇图层工程坐标系和数据元信息

This commit is contained in:
nixevol
2026-09-21 15:28:39 +08:00
parent a0edcbae2e
commit 8533814df6
3 changed files with 31 additions and 2 deletions
+8 -1
View File
@@ -153,7 +153,14 @@ def add_nr_buildings_layer(root, result, fallback_extent):
for tag, value in (("id", layer_id), ("datasource", datasource), ("layername", "NRBuildingsData")):
ET.SubElement(layer, tag).text = value
spatial_ref = ET.SubElement(ET.SubElement(layer, "srs"), "spatialrefsys", nativeFormat="Wkt")
for tag, value in (("srid", "4326"), ("authid", "EPSG:4326"), ("description", "WGS 84")):
from .nrdata import CRS84
for tag, value in (
("wkt", CRS84[4]),
("proj4", "+proj=longlat +datum=WGS84 +no_defs"),
("authid", "OGC:CRS84"), ("description", "WGS 84 (CRS84)"),
("projectionacronym", "longlat"), ("ellipsoidacronym", "EPSG:7030"),
("geographicflag", "true"),
):
ET.SubElement(spatial_ref, tag).text = value
ET.SubElement(layer, "provider", encoding="UTF-8").text = "ogr"
ET.SubElement(layer, "displayfield").text = "building_id"