perf(geoportal): zoom-dependent UAT simplification + Martin config + tile cache
PostGIS: - gis_uats view: ST_SimplifyPreserveTopology(geom, 50) + only name/county/siruta - gis_uats_simple view: ST_SimplifyPreserveTopology(geom, 500) for z0-z9 Martin config (martin.yaml): - Explicit source definitions (auto_publish: false) - gis_uats_simple (z0-9): only name+siruta, 500m simplified geometry - gis_uats (z0-14): name+siruta+county, 50m simplified - gis_terenuri (z10-18): object_id+siruta+cadastral_ref+area_value+layer_id - gis_cladiri (z12-18): same properties - 24h cache headers on all tiles MapViewer: - Dual UAT sources: simplified (z0-9) + detailed (z9+) with seamless handoff - Zoom-interpolated paint: thin lines at z5, thicker at z12 - UAT labels only z9+, fill opacity z-interpolated (0.03→0.08) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -158,20 +158,29 @@ WHERE geometry IS NOT NULL AND geom IS NULL;
|
||||
CREATE INDEX IF NOT EXISTS gis_uat_geom_idx
|
||||
ON "GisUat" USING GIST (geom);
|
||||
|
||||
-- 8. Martin/QGIS-friendly view
|
||||
-- 8. Martin/QGIS-friendly view (moderate simplification — 50m tolerance)
|
||||
CREATE OR REPLACE VIEW gis_uats AS
|
||||
SELECT
|
||||
siruta,
|
||||
name,
|
||||
county,
|
||||
"workspacePk" AS workspace_pk,
|
||||
"areaValue" AS area_value,
|
||||
geom
|
||||
ST_SimplifyPreserveTopology(geom, 50) AS geom
|
||||
FROM "GisUat"
|
||||
WHERE geom IS NOT NULL;
|
||||
|
||||
-- 9. Simplified view for low zoom levels (z5-z9) — 500m tolerance
|
||||
CREATE OR REPLACE VIEW gis_uats_simple AS
|
||||
SELECT
|
||||
siruta,
|
||||
name,
|
||||
ST_SimplifyPreserveTopology(geom, 500) AS geom
|
||||
FROM "GisUat"
|
||||
WHERE geom IS NOT NULL;
|
||||
|
||||
-- =============================================================================
|
||||
-- Done! Martin will auto-discover gis_uats at http://localhost:3010/gis_uats
|
||||
-- Done! Martin serves these views as vector tiles:
|
||||
-- - gis_uats (moderate detail, z9+)
|
||||
-- - gis_uats_simple (coarse overview, z5-z9)
|
||||
-- QGIS: PostgreSQL -> 10.10.10.166:5432 / architools_db -> gis_uats view
|
||||
-- SRID: 3844 (Stereo70)
|
||||
-- =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user