-
Notifications
You must be signed in to change notification settings - Fork 0
Source datasets
The source datasets consist in a file for each of the 20 Italian regions and one for each of the countries that share a border with Italy (France, Switzerland, Austria, Slovenia, San Marino and Vatican City). You have to download them on your local drive and perform some operations, though most of the procedures are automated via Bash scripts. The default dataset location is in the subdirectory data of the working directory.
You can download the dataset files for Italian regions using the script wizard_regions.sh. Because of the Overpass server quota system, you cannot download too much data in a short amount of time, so the script will pause for a while (default: 90 seconds) between downloads. Since there are 20 regions, it could take some time to complete, but you can uncheck the ones you have previously downloaded or that you don't need.
Using the previous method for the foreign countries is difficult because the data would show the maritime boundaries instead of the coastline. A manual approach is shown below.
First, create the subdirectory states in the dataset directory, then go to this site (you must authenticate with an OpenStreetMap account).
For each of the following nations:
- France
- Switzerland
- Austria
- Slovenia
- San Marino
- Vatican City
select the corresponding item in the list (for France, use the sub-item Metropolitan France) and click Download.
In the dialog that opens, set the options as below:
- Based on Selection
- Admin level min: 2, max: 2 (set both to 3 for France)
- Land only
- All tags Exclude
- Simplify No
then click Download. Save the files with the following names:
- France:
fr.geojson - Switzerland:
ch.geojson - Austria:
at.geojson - Slovenia:
sl.geojson - San Marino:
sm.geojson - Vatican City:
va.geojson
Extract the GeoJSON file from the archive, then run the script fix_countries.sh in order to make the dataset coherent with the previous ones.
Alternatively, for each country file use the following command, then rename the file out.geojson to the original file name:
mapshaper -i file.geojson -each 'admin_level=admin_level.toString();id=osm_id.toString()' -o out.geojsonNow you can optionally improve the final appearance of the generated maps, as described in this page.