-
Notifications
You must be signed in to change notification settings - Fork 1k
Edit world geometries
All geometries are stored in the world.geojson. Each feature of the geojson file contains a property "zoneName" to map it the correct zone. The geometries shown on the map is an automatically generated topojson file based on the geojson file.
All edits to geometries should be done directly to the world.geojson file.
To publish a new version of the world.geojson file, run yarn && yarn update-world
(in the web
folder) which will validate and generate a new topojson file to be shown on the map.
The following sections contain examples of how to perform the most common edits to the world.geojson file. In these examples, the free tool QGIS is used.
- Import world.geojson in QGIS. Ideally select XYZ tiles > OpenStreetMap and then drag the file into the view.
- Toggle editing on the file. Right click the layer and select "Toggle editing"
- Select Vertex Tool. You can now drag around the vertices of the polygons to modify the polygon.
- When you are done editing, select "Toggle editing" again and save the new file.
- You can now run
yarn update-world
.
Note that the validation script does not allow overlaps or gaps. This means that when modifying borders, make sure to also modify the neighboring polygons to ensure that there are no overlaps or gaps between them.
This video also shows the basics of the vertex tool.
- Import world.geojson in QGIS. Ideally select XYZ tiles > OpenStreetMap and then drag the file into the view.
- Toggle editing on the file. Right click the layer and select "Toggle editing"
- Select the "Add Polygon Feature" tool. You can now draw a new polygon. Close the polygon by right-clicking.
- A dialogue box appears asking you to input "zoneName", "countryKey", "countryName". Fill in the correct information. For example for France, the input would be "FR", "FR", "France".
- When you are done editing, select "Toggle editing" again and save the new file.
- You can now run
yarn update-world
.
- Import world.geojson in QGIS. Ideally select XYZ tiles > OpenStreetMap and then drag the file into the view.
- Toggle editing on the file. Right click the layer and select "Toggle editing"
- Select the "Select Feature By Area or Single Click" tool. You can now select a polygon.
- When a polygon has been selected, you can hit the delete button to remove the polygon.
- When you are done editing, select "Toggle editing" again and save the new file.
- You can now run
yarn update-world
.
Most edits can be done by a combination of the above sections. If you are stuck on an editing problem, please create a new discussion and provide screenshots of what you want to achieve.
You can create bounding boxes for new or existing zones in config/zones.json
:
- Update the zone you want to update in
config/zones.json
with"bounding_box": null
- Run:
node web/geo/generate-zone-bounding-boxes.js
Do you have a question or an idea for improvements? Open a new discussion here