-
Notifications
You must be signed in to change notification settings - Fork 2
Editing Sector Files for VAT Spy
Nelis-V edited this page Oct 21, 2021
·
9 revisions
- Use vatspy-geojson to create GeoJSON files of the VATSIM FIRBoundaries.
- Load, view and edit the polygons in QGIS
- Save for use in VAT-Spy
- Download QGIS
- If you're not familiar with GIS applications, i can recommend this 30 minute tutorial by Karl Karlsson
- Download the Alpha 2 version of vatspy-geojson
- Fork and download the wip (next month) branch of the vatspy-data-project
- Download a background raster map, Natural Earth 1:50 is a good choice.
Install the application and open QGIS Desktop (Non-GRASS version).
- First make sure the right tools are enabled: right click anywhere in the toolbar and activate the Digitizing, Advanced Digitizing and Snapping toolbars.
- Click on the Projection Properties button in the bottom right .
- Select the EPSG:4326 Projection.
- Extract the Natural Earth background map and drag the .tif file in the QGIS window. A geo-referenced map is displayed.
To load the FIR Boundaries file in QGIS, it first needs to be converted to a supported format. In this case GeoJSON.
- Extract the two remaining archives.
- Open the VAT-Spy GeoJSON folder and run the executable.
- On the first tab, load your fork's firboundaries.dat and select a save location.
- Click the parse button
- Drag the created .geojson file in the QGIS window.
To make sure the geometry is displayed correctly on all zoom levels and simplify editing, save it as an ESRI Shapefile.
- Right Click on the layer.
- Click Export -> Save Feature As.
- Set the Format to ESRI Shapefile.
- Click the browse button and set a file name.
- Click OK: A third layer (Shapefile) is added to your workspace. This is the file you will use to do edits in.
- Right Click -> Remove the older layer used to create the Shapefile with to avoid confusion.
- Double click on the layer and navigate to the Symbology tab.
- Click on Simple Fill and set the Fill color's opacity to 20%.
- In the top right, click the Add Symbol Layer button.
- Set this new layers type to Outline: Marker Line with Markers on every vertex.
- Click Apply.
- Click the Labels tab and select Single Labels.
- In the Value field select the ICAO property.
- In the Placement: Data Defined menu, set the X coordinate to CenterLon and the Y coordinate to CenterLat. This ensures it's using the label positions stored in the data.
- Click Apply.
- Save your QGIS Project.
- Select the shapefile layer and turn on editing .
- Enable the Vertex Tool .
- Enable Vertex Snapping .
- By pointing, dragging and clicking, edit the polygons to your liking. New polygons can also be created using the Add Polygon Feature button .
- After updating the geometry, some of it's properties still need to be updated. Right click on the layer to open its attribute table.
- To narrow down the list, only display edited and new features.
- Using the expression field and update selected button; update the following fields for the polygons you've made significant changes to:
Field | Expression | |
---|---|---|
Min_lat | round(y_min($geometry),6) | |
Min_lon | round(x_min($geometry),6) | |
Max_lat | round(y_max($geometry),6) | |
Max_lon | round(x_max($geometry),6) | |
CenterLat | round(y(centroid($geometry)),6) | A custom coordinate can also be used |
CenterLon | round(x(centroid($geometry)),6) | A custom coordinate can also be used |
- When you're done, click the save button , and close the attribute table.
- Right click the shapefile layer.
- Click Export -> Save Features As.
- Save the layer as GeoJSON, make sure to use a name that indicates this file contains your edits.
- Reopen the VAT-Spy GeoJSON executable.
- On the second tab, load the GeoJSON you just saved.
- Select a save location for the FIRBoundaries.dat file.
- Click Parse
Use the changed sectors from your new FIRBoundaries.dat file and replace them in the version downloaded from the github and push them.
- Use the snapping tool to make sure all polygons align.
- The topology checker in the vector menu can be used to check for gaps.
- Filter layers using rule based layers in the symbology menu if you're encountering issues with layered geometry.