GML – Support added to the SDK
There are now further methods added to the GeoMapElement business objects to assist in the output to GML. But first, what is GML? The explanation on WikipediA is…
>> The Geography Markup Language (GML) is the XML grammar defined by the Open Geospatial Consortium (OGC) to express geographical features. GML serves as a modeling language for geographic systems as well as an open interchange format for geographic transactions on the Internet. Key to GML’s utility is its ability to integrate all forms of geographic information, including not only conventional “vector” or discrete objects.<<
This year, some development time has been looking at ways to “transfer” aviation data from the SDK into other geographical systems like CAD or GIS. Initially, supported was added for database geography spatial types but this requires a database; GML allows the export/import via a data file in XML format.
GML support is add through the GeoMapElements to return the geographic coordinate data in the format expected by the GML dictionary. The current support types are:
- GeoPoint to GML Point
GeoLine to GML LineString
GeoLineString to GML LineString
GeoPolygon to GML Polygon
There is a lot more to the structure and other non-graphical data that is needed for a GML file so to make this easier, a GML Helper is now available in the SDK to make this much easier to create. Below is a code example to create a GeoPoint and export to GML:
GmlHelper gmlHelper = new GmlHelper(); GeoPoint geoPoint = new GeoPoint(new GeoCoordinate(0, 41)); gmlHelper.AddFeatureMemberGeoMapElement("GeoPoint", geoPoint, GmlDimension.Output2D); gmlHelper.CompleteXml(); gmlHelper.Save(GmlHelperFilename);
and the GML XML file will contain:
<?xml version="1.0" encoding="UTF-8"?> <!--Created by FPAssistant SDK - FPAssistant.com - CADology Limited--> <FPAssistantObjects xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml/3.2" gml:id="bFeatureCollection"> <FeatureMember> <GeoPoint gml:id="e3534545-6ec8-4205-8bbd-0a8ad006fee5"> <geometryProperty> <gml:Point xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" gml:id="f3586aa1-ac93-42b7-9ea3-ac8d8736648f" srsName="urn:ogc:def:crs:EPSG::4326"> <gml:pos>0 41</gml:pos> </gml:Point> </geometryProperty> </GeoPoint> </FeatureMember> </FPAssistantObjects>
Displaying the GML in QGIS
Hence using the SDK, an ARINC 424 data file can be opened, the Enroute Airways can be retrieved and using the GML feature saved out to be used in a GIS package like QGIS. The image below is a screen shot from QGIS showing the airway routes which have been added a newly created “Layer” in the project which is pointing to the GML file.