fix(tippecanoe): fix empty terenuri/cladiri export — remove ST_Simplify from ogr2ogr
ogr2ogr doesn't auto-detect geometry from ST_SimplifyPreserveTopology(). Export raw geometry instead, let tippecanoe handle simplification (--simplification=10). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -55,20 +55,17 @@ ogr2ogr -f FlatGeobuf -s_srs EPSG:3844 -t_srs EPSG:4326 \
|
||||
administrativ.fgb "$PG_CONN" \
|
||||
-sql "SELECT object_id, siruta, layer_id, cadastral_ref, geom FROM gis_administrativ WHERE geom IS NOT NULL" &
|
||||
|
||||
# Terenuri simplified for overview (ST_SimplifyPreserveTopology 5m tolerance — good for z10-z14)
|
||||
# Only essential properties for overview display
|
||||
# Terenuri for overview — let tippecanoe handle simplification
|
||||
ogr2ogr -f FlatGeobuf -s_srs EPSG:3844 -t_srs EPSG:4326 \
|
||||
terenuri_overview.fgb "$PG_CONN" \
|
||||
-sql "SELECT object_id, siruta, cadastral_ref, area_value, layer_id,
|
||||
ST_SimplifyPreserveTopology(geom, 5) AS geom
|
||||
FROM gis_terenuri WHERE geom IS NOT NULL" &
|
||||
-sql "SELECT object_id, siruta, cadastral_ref, area_value, layer_id, geom
|
||||
FROM gis_terenuri WHERE geom IS NOT NULL" &
|
||||
|
||||
# Cladiri simplified for overview (3m tolerance — buildings are smaller)
|
||||
# Cladiri for overview — let tippecanoe handle simplification
|
||||
ogr2ogr -f FlatGeobuf -s_srs EPSG:3844 -t_srs EPSG:4326 \
|
||||
cladiri_overview.fgb "$PG_CONN" \
|
||||
-sql "SELECT object_id, siruta, cadastral_ref, area_value, layer_id,
|
||||
ST_SimplifyPreserveTopology(geom, 3) AS geom
|
||||
FROM gis_cladiri WHERE geom IS NOT NULL" &
|
||||
-sql "SELECT object_id, siruta, cadastral_ref, area_value, layer_id, geom
|
||||
FROM gis_cladiri WHERE geom IS NOT NULL" &
|
||||
|
||||
wait
|
||||
echo "[$(date -Iseconds)] Export complete."
|
||||
@@ -90,6 +87,7 @@ tippecanoe \
|
||||
--base-zoom=14 \
|
||||
--drop-densest-as-needed \
|
||||
--detect-shared-borders \
|
||||
--simplification=10 \
|
||||
--hilbert \
|
||||
--force
|
||||
|
||||
|
||||
Reference in New Issue
Block a user