This project addresses the need to select a limited number of UAS zones starting from the file distributed by the National Civil Aviation Authority.
The project contains two Python programs:
filter_geojson.py: starting from the complete JSON file, selects the UAS zones that are located near a given point and within a specified radius. It creates a file containing the filtered UAS zones.map_geojson.py: displays the result of the selection operation on a map. It creates a map.htm file thatcan be browsedfilter_map_geojson.py: starting from the complete JSON file, selects the UAS zones that are located near a given point and within a specified radius. It creates a file containing the filtered UAS zones and a map.htm file that can be browsed.interactive_uas_filter.py: allows to select on an interactive map the area to be extracted.compare.py: compares two files containing UAS zones, showing the differences.
- Set up a Python environment.
- Install the dependencies listed in
requirements.txt. - Run the scripts.
This script requires as input:
- the name of the file distributed by the national authority,
- the coordinates of the reference point,
- the search radius (in kilometers).
python filter_geojson.py ita_zones.json "45 27 55N" "9 11 20E" 30This command selects the UAS zones within 30 km of the center of Milan.
The output file generated is:
filtered.json
This script plots the zones included in filtered.json on an interactive map, generating the file:
map.html
This script requires as input:
- the name of the file distributed by the national authority,
- the coordinates of the reference point,
- the search radius (in kilometers).
It generates two output files:
filtered.json
and
map.html
python filter_map_geojson.py ita_zones.json "45 27 55N" "9 11 20E" 30This command selects the UAS zones within 30 km of the center of Milan and generates the filterend json output and the map file.
This script requires as input:
- the name of the file distributed by the national authority
python interactive_uas_filter.py ita_zones.jsonIt opens a browser showing an interactive map of all the UAS zones included into the JSON file. A button on the left side allows to start drawing a circle, selecting a point and drawing the radius. After drawing the circle, the button Save creates the filtered.json file with the UAS zones intersecting the circle. The map is updated, showing these zones. The Reset button allows to relaoad the initial map and to draw a different circle. The Quit button closes the browser and the script.
The output file generated is:
filtered.json
This script requires as input:
- the name of two json files containing UAS zones
python compare.py ita_zones.json filtered.jsonit show the difference between the files: the features included in one file and missing in the other one.