enrouteServer documentation
OFMX
Tools to interpret ofmx files
- OFMX.readAirspace(aseNode, shapeRoot, cat, nam, numCoordDigits)
Generate GeoJSON for airspace
This method reads information about a given airspace from aseNode, finds the approriate geometry in the shape file and generates a GeoJSON feature. This is a generic method that is used by the more specialized methods readFeature_*.
- Parameters:
aseNode – An ElementTree xml node pointing to an airspace ‘Ase’ node
shapeRoot – Root of the xml shape file
cat – Category of the airspace, for inclusion in the GeoJSON ‘CAT’ field
nam – Name of the airspace, for inclusion in the GeoJSON ‘NAM’ field.
numCoordDigits – Numer of digits for coordinate pairs
- Returns:
A feature dictionary, ready for inclusion in GeoJSON
- OFMX.readCoordinate(xmlNode, numCoordDigits)
Read coordinate from children of the given XML Node
Takes an XML node, looks for children with name ‘geoLat’ and ‘geoLong’, reads and interprets coordinates, rounds them to the number of decimal places and returns an array with latitude and longitude as floats
In case of error, this method will fail siliently and return undefined results.
- Parameters:
xmlNode – An ElementTree xml node
- Returns:
A float with two elements, containing latitude and longitude as floats.
- OFMX.readFeatures_FISSectors(root, shapeRoot, numCoordDigits)
Generate GeoJSON for airspaces: Flight Information Sectors
This method reads information about FIS-airspaces from an OFMX file, finds the approriate geometries in the shape file and generates GeoJSON features.
- Parameters:
root – Root of the OFMX file
shapeRoot – Root of the OFMX shape file
numCoordDigits – Numer of digits for coordinate pairs
- Returns:
An array of feature dictionaries, ready for inclusion in GeoJSON
- OFMX.readFeatures_NRA(root, shapeRoot, numCoordDigits)
Generate GeoJSON for airspaces: Nature Reserve Areas
This method reads information about NRA-airspaces from an OFMX file, finds the approriate geometries in the shape file and generates GeoJSON features.
- Parameters:
root – Root of the OFMX file
shapeRoot – Root of the OFMX shape file
numCoordDigits – Numer of digits for coordinate pairs
- Returns:
An array of feature dictionaries, ready for inclusion in GeoJSON
- OFMX.readFeatures_Procedures(root, numCoordDigits)
Generate GeoJSON for airspaces: Procedures
This method reads information about procedures from an OFMX file, and generates GeoJSON features.
- Parameters:
root – Root of the OFMX file
numCoordDigits – Numer of digits for coordinate pairs
- Returns:
An array of feature dictionaries, ready for inclusion in GeoJSON
- OFMX.readFeatures_RP(root, numCoordDigits)
Generate GeoJSON for airspaces: Reporting Points
This method reads information about reporting points from an OFMX file, finds the approriate geometries in the shape file and generates GeoJSON features.
- Parameters:
root – Root of the OFMX file
numCoordDigits – Numer of digits for coordinate pairs
- Returns:
An array of feature dictionaries, ready for inclusion in GeoJSON
- OFMX.readHeight(xmlNode, ending, short=False)
Read height information from XML Node and return as human-readable string
In OFMX, height information for property X in an xmlNode is usually specified by three subnodes that are named as follows.
codeDistVerX: Type altitude information (flight level, above ground, above MSL)
uomDistVerX: Unit of measurement
valDistVerX: Numerical value
This method looks for these subnodes and interprets their content. If all goes well, it returns a human-readable string such as “GND”, “100 ft GND”, “2300 ft” or “FL 95”. If the data is not found or cannot be interpreted, this method fails silently and an empty string is returned.
- Parameters:
xmlNode – An ElementTree xml node
ending – Name of the property. This is the string ‘X’ described above.
short – If set to ‘True’, the method will create slightly shorter strings, of the form “GND”, “100 AGL”, “2300” or “FL 95”
- Returns:
A string describing altitude, or an empty string in case of error
- OFMX.readMinMaxHeight(xmlNode)
Read height information - height bands
In OFMX, height bands for VFR procedure for X in usually specified by six subnodes, called “codeDistVerLower”, “uomDistVerLower”, “valDistVerLower”, “codeDistVerUpper”, “uomDistVerUpper” and “valDistVerUpper”. This method looks for these subnodes and interprets their content. If all goes well, it returns a string such as “MIN. 100 ft GND”, “MIN. 2500 ft · MAX 4500 ft MSL”. If the data is not found or cannot be interpreted, an empty string is returned.
- Parameters:
xmlNode – An ElementTree xml node
- Returns:
A string describing minimal and maximal altitude, or an empty string in case of error
openAIP2
Toolset to read aviation data from the openAIP2 web site and to transform the data into the GeoJSON format described here: https://github.com/Akaflieg-Freiburg/enrouteServer/wiki/GeoJSON-files-used-in-enroute-flight-navigation
- openAIP2.downloadOpenAIPData(typeName)
Read data from the openAIP2 API.
- Parameters:
typeName – Name data (“navaids”)
- Returns:
array with data items
- openAIP2.readOpenAIP()
Read complete database from the openAIP2 API.
- Returns:
GeoJSON feature array, in the format described here: https://github.com/Akaflieg-Freiburg/enrouteServer/wiki/GeoJSON-files-used-in-enroute-flight-navigation
- openAIP2.readOpenAIPAirports(airportData)
Read airspaces from the openAIP2 API.
- Parameters:
airportData – Data about airports, as downloaded from openAIP
- Returns:
GeoJSON feature array, in the format described here: https://github.com/Akaflieg-Freiburg/enrouteServer/wiki/GeoJSON-files-used-in-enroute-flight-navigation
- openAIP2.readOpenAIPAirspaces()
Read airspaces from the openAIP2 API.
- Returns:
GeoJSON feature array, in the format described here: https://github.com/Akaflieg-Freiburg/enrouteServer/wiki/GeoJSON-files-used-in-enroute-flight-navigation
Read navaids from the openAIP2 API.
- Returns:
GeoJSON feature array, in the format described here: https://github.com/Akaflieg-Freiburg/enrouteServer/wiki/GeoJSON-files-used-in-enroute-flight-navigation
- openAIP2.readOpenAIPReportingPoints(airportData)
Read reporting points from the openAIP2 API.
- Parameters:
airportData – Data about airports, as downloaded from openAIP
- Returns:
GeoJSON feature array, in the format described here: https://github.com/Akaflieg-Freiburg/enrouteServer/wiki/GeoJSON-files-used-in-enroute-flight-navigation