API: Spatial Types (Geography) for use with databases (SQL Server & PostGIS)

Spatial data can be found in most parts of aviation and represents information about a physical location defined by different geometric shapes. The physical location is normally held in a WGS-84 geographical coordinate Latitude and Longitude; this is a round-earth coordinate system in fact an ellipsoid. Some countries do use their own country based projection and use WGS-84 coordinates as well.

Most databases today allows us to store this data in spatial types rather than as simply text, the major benefit of storing this as geodetic is the ability to perform spatial based queries.

FPAssistant SDK allows for simple geometries like GeoLine, GeoPolygon, GeoCircle and GeoPoint and can then be used to be inserted into a database. Below is an example of a ICAO Basic ILS surface drawn as polygons(shaded) and as 3D lines; this screen shots comes from a simple query using Microsoft SQL Server.

Using the FPAssistant SDK you can easily create geometries and add them to a spatial database with ease.

A GeoCircle is defined as a series of lines and the resolution (number of lines to make up the circle) is set in the API.

public string AsGeography(int resolution)

Here is an example of a geodetic circle drawn at 51, -3 (Lat, Long) with different resolutions.

Projections: In the image above, the GeoCircles have the appearance of being ellipsoid (no, the image is not squashed!) and this is because the projection in Equirectangular whereas the image below show the GeoCircle on a Mercator projection.


SQL Server – Microsoft have added spatial data types since version 2008

PostGIS – PostGIS is spatialdatabase extender for PostgeSQL

2020-03-11T18:57:11+00:00March 11th, 2020|FPAssistant SDK/API News|