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,19 +55,16 @@ ogr2ogr -f FlatGeobuf -s_srs EPSG:3844 -t_srs EPSG:4326 \
|
|||||||
administrativ.fgb "$PG_CONN" \
|
administrativ.fgb "$PG_CONN" \
|
||||||
-sql "SELECT object_id, siruta, layer_id, cadastral_ref, geom FROM gis_administrativ WHERE geom IS NOT NULL" &
|
-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)
|
# Terenuri for overview — let tippecanoe handle simplification
|
||||||
# Only essential properties for overview display
|
|
||||||
ogr2ogr -f FlatGeobuf -s_srs EPSG:3844 -t_srs EPSG:4326 \
|
ogr2ogr -f FlatGeobuf -s_srs EPSG:3844 -t_srs EPSG:4326 \
|
||||||
terenuri_overview.fgb "$PG_CONN" \
|
terenuri_overview.fgb "$PG_CONN" \
|
||||||
-sql "SELECT object_id, siruta, cadastral_ref, area_value, layer_id,
|
-sql "SELECT object_id, siruta, cadastral_ref, area_value, layer_id, geom
|
||||||
ST_SimplifyPreserveTopology(geom, 5) AS geom
|
|
||||||
FROM gis_terenuri WHERE geom IS NOT NULL" &
|
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 \
|
ogr2ogr -f FlatGeobuf -s_srs EPSG:3844 -t_srs EPSG:4326 \
|
||||||
cladiri_overview.fgb "$PG_CONN" \
|
cladiri_overview.fgb "$PG_CONN" \
|
||||||
-sql "SELECT object_id, siruta, cadastral_ref, area_value, layer_id,
|
-sql "SELECT object_id, siruta, cadastral_ref, area_value, layer_id, geom
|
||||||
ST_SimplifyPreserveTopology(geom, 3) AS geom
|
|
||||||
FROM gis_cladiri WHERE geom IS NOT NULL" &
|
FROM gis_cladiri WHERE geom IS NOT NULL" &
|
||||||
|
|
||||||
wait
|
wait
|
||||||
@@ -90,6 +87,7 @@ tippecanoe \
|
|||||||
--base-zoom=14 \
|
--base-zoom=14 \
|
||||||
--drop-densest-as-needed \
|
--drop-densest-as-needed \
|
||||||
--detect-shared-borders \
|
--detect-shared-borders \
|
||||||
|
--simplification=10 \
|
||||||
--hilbert \
|
--hilbert \
|
||||||
--force
|
--force
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user