pyrosm
pyrosm copied to clipboard
[ENH] create the data source for Italy
Pyrosm currently uses data from Italy from geofabrik. Geofabrik presents the data from Italy up to the macro-regions (= territorial aggregations - without administrative value - with which the national statics institute of Italy creates 4 territorial areas).
Istead the Italian administrative subdivision is made according to this hierarchical order regions -> provinces -> municipalities
Wikimedia Italy has created the service "OSMit Estratti" that offers - in various formats (including pbf) - the extractions for these administrative levels. This data is stored on a machine of WMI and elaborated every day with an extraction from Geofabrik.
If you move here: https://osmit-estratti.wmcloud.org/dati/poly/
you can find the pbf files for: regions, provinces and municipalities
The list of the names of each resource can be also extracted by reading these geojson files https://github.com/GISdevio/estratti_OSM_Italia/tree/main/webapp/public/static/boundaries
@HTenkanen I created the code on my fork
You can visit the difference here
I created the file osmitaly.py and modified the file _init_.py both in the path pyrosm/data
the code loads the (topo) json files on initialization with the information on the names of the regions and provinces (so if anything changes everything is automated) and then offers the data sources.
I believe the resource could be improved by integrating with the code in geofabrik.py
Let me know if it's ok so I can proceed with the pull request
Great! Please go ahead and do a pull request so I can review the code in the coming days. 👍🏻