Skip to content

Commit 964e4c1

Browse files
committed
[FIX] Chart: Update geojson data
Update geojson data following Europe geodata. See https://ec.europa.eu/eurostat/web/gisco/geodata/administrative-units/countries closes #8143 Task: 5224009 X-original-commit: f541294 Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com> Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
1 parent 5ee7853 commit 964e4c1

File tree

6 files changed

+5457
-4195
lines changed

6 files changed

+5457
-4195
lines changed

demo/geo_json/HOWTO.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## How to regenate the topo json data
2+
3+
1. Find a source of geoJSON data (for instance https://www.naturalearthdata.com/downloads/110m-cultural-vectors/) that covers the whole earth
4+
2. convert it as topoJSON files (for instance https://jeffpaine.github.io/geojson-topojson/)
5+
3. split the topoJSON file by regions. Example:
6+
7+
```bash
8+
# CROP world topojson to region:
9+
10+
# requires mapshaper CLI https://github.com/mbloch/mapshaper
11+
12+
# use `mapshaper -clip` with a specifing bounding box to delimitate continent or geographic regions, see https://github.com/mbloch/mapshaper/wiki/Command-Reference#-clip
13+
14+
# europe:
15+
mapshaper world.topo.json -clip bbox=-25,30,38,75 -o europe.topo.json
16+
#Asia:
17+
mapshaper world.topo.json -clip bbox=17,-10,170,80 -o asia.topo.json
18+
#Oceania:
19+
mapshaper world.topo.json -clip bbox=100,-50,230,0 -o oceania.topo.json
20+
# Africa:
21+
mapshaper world.topo.json -clip bbox=-25,-40,60,40 -o africa.topo.json
22+
# North America:
23+
mapshaper world.topo.json -clip bbox=-180,5,-10,120 -o na.json
24+
mapshaper na.json -filter '!["RU", "MR", "GW", "SN", "ML", "LR", "GN", "SL", "EH", "MA", "IS", "VE", "CO", "GY", "GM"].includes(this.properties.FID)' -o north_america.topo.json
25+
# South America:
26+
mapshaper world.topo.json -clip bbox=-150,-120,-30,12 -o south_america.topo.json
27+
```

0 commit comments

Comments
 (0)