Skip to content

Commit 4c26a1b

Browse files
chore(admin-express): use keep-shapes option to simplify
1 parent d77bf6d commit 4c26a1b

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

fetch-polynesia.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ mapshaper "$TMPDIR/shapefiles/Com.shp" \
3434
-each 'INSEE_DEP = "987", NOM_M = NOM.toUpperCase()' \
3535
-filter-fields INSEE_COM,INSEE_DEP,NOM,NOM_M,POPULATION \
3636
-proj wgs84 \
37-
-simplify "80%" \
37+
-simplify "90%" keep-shapes \
3838
-o "$POLYNESIA_DIR/COMMUNE.shp"
3939

4040
# Generate departement
4141
# Simplify geometry in the process
4242
mapshaper "$POLYNESIA_DIR/COMMUNE.shp" \
4343
-dissolve copy-fields="" calc='NOM = "Polynésie française", NOM_M = "POLYNÉSIE FRANÇAISE", INSEE_DEP = "987"' \
44-
-simplify "50%" \
44+
-simplify "50%" keep-shapes \
4545
-o "$POLYNESIA_DIR/DEPARTEMENT.shp"
4646

4747
# Merge with admin-express

generate-admin-express-pays.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ mapshaper -i "$ADMIN_EXPRESS_DIRNAME/PAYS_tmp.shp" "$POLYNESIA_DIR/DEPARTEMENT.s
1717
-drop 'fields=*' \
1818
-merge-layers \
1919
-dissolve copy-fields="" \
20+
-simplify "50%" keep-shapes \
2021
-o "$ADMIN_EXPRESS_DIRNAME/PAYS.shp"
2122

2223
rm "$ADMIN_EXPRESS_DIRNAME/PAYS_tmp.shp"

0 commit comments

Comments
 (0)