One-step converter: OpenStreetMap → GNG KML format
No intermediate files. Just query OSM and get GNG-ready output.
python osm_to_gng_direct.py CYHZ --name "Halifax" --fir CZQMCreates: CYHZ_gng.kml ready for GNG import.
python batch_process.pyProcesses all airports defined in the script:
- CYHZ (Halifax)
- CYYT (St Johns)
- CYQM (Greater Moncton)
- CYSJ (Saint John)
- CYFC (Fredericton)
Output files in output/ directory.
OpenStreetMap
↓
[osm_to_gng_direct.py] ← ONE SCRIPT
↓
GNG KML (ready to import)
↓
[Google Earth Pro] - Optional review
↓
[GNG Import]
↓
[GNG Export to EuroScope]
↓
Done!
python osm_to_gng_direct.py <ICAO> --name "<Airport Name>" [options]--name(required): Airport name for folder structure--fir: FIR code (default: CZQM)--output/-o: Output filename (default:<ICAO>_gng.kml)
# Halifax (CZQM)
python osm_to_gng_direct.py CYHZ --name "Halifax"
# St Johns (CZQX)
python osm_to_gng_direct.py CYYT --name "St Johns" --fir CZQX
# Custom output location
python osm_to_gng_direct.py CYQM --name "Greater Moncton" -o custom/moncton.kml-
Queries OpenStreetMap via Overpass API for:
- Runways →
RunwayBorder - Taxiways →
TaxiwayYellow - Taxilanes →
TaxiwayGrey - Aprons →
Apron - Parking positions/gates/stands →
ParkPos
- Runways →
-
Converts to GNG format with:
- Correct folder hierarchy:
SCT Entries > FIR > ICAO > Groundlayout > Airport - LineString geometry (not Polygons)
- Color descriptions WITHOUT
COLOR_prefix - GNG style definitions
- Correct folder hierarchy:
-
Outputs ready-to-import KML that GNG can directly import
mapbuilder/
├── osm_to_gng_direct.py ← Main script
├── batch_process.py ← Batch processor
└── output/ ← Output directory
├── CYHZ_gng.kml
├── CYYT_gng.kml
└── ...
✅ Simpler: One command instead of two
✅ Faster: No intermediate file I/O
✅ Cleaner: No leftover OSM KML files
✅ Less confusion: Clear input → output
Edit batch_process.py:
AIRPORTS = [
{'icao': 'CYHZ', 'name': 'Halifax', 'fir': 'CZQM'},
{'icao': 'CYYY', 'name': 'Your Airport', 'fir': 'CZQM'}, # Add here
]Edit osm_to_gng_direct.py:
FEATURE_COLOR_MAP = {
'runway': 'RunwayBorder',
'taxiway': 'TaxiwayYellow', # Change to 'TaxiwayGrey' etc.
# ...
}- Check ICAO code is correct
- Airport might not be mapped in OSM
- Try viewing raw OSM data: https://www.openstreetmap.org/
- Verify KML structure in Google Earth first
- Check folder names match GNG expectations
- Ensure LineStrings (not Polygons) are used
- Overpass API may be busy
- Wait 30 seconds and retry
- Script has 60-second timeout
Coordinate Order: Longitude, Latitude, Altitude (KML standard)
Geometry: LineStrings with tessellate=1 and altitudeMode=clampToGround
Description Field: Contains ONLY color name (e.g., TaxiwayGrey), NOT COLOR_TaxiwayGrey. GNG adds the COLOR_ prefix when exporting to EuroScope.
Folder Hierarchy: Must exactly match:
SCT Entries
└── FIR (e.g., CZQM)
└── ICAO (e.g., CYHZ)
└── Groundlayout
└── Airport Name (e.g., Halifax)
└── Placemarks
- Optional: Open
<ICAO>_gng.kmlin Google Earth to review - Import to GNG: Load the KML file
- Export from GNG: Save as EuroScope
.txtformat - Integrate: Add to your sector file release
- Python 3.6+
requestslibrary:pip install requests- Internet connection (for OSM queries)
This script was designed specifically for CZQM/CZQX vACC workflow based on analysis of actual GNG exports and EuroScope format requirements.
Tested with: CYHZ reference export matching exact GNG structure.