Sunday 30 December 2018

QGIS plugin: PointByPolarCoord



In this post I will create QGIS plugin that allows you to easily create point which is defined in 'polar coordinates' way, that means: by distance and bearing against reference point with known coordinates and magnetic variation. This is also the first post of post series that are related to 'local coordinates' issue', quite common used in aviation data publication


Saturday 29 December 2018

aviation_gis_tools: Point given at offset against polar coordinates

Another way of giving location of point of interest in aviation (e. g. obstacles) is providing information about:
  • reference point (aerodrome referenc epoint, navaid, runway threshold)
  • bearing of reference line (note: it can be given directly or as 'extende line of center line of rwy XX'
  • side on which point is located (left, right) against reference line
  • offset against reference line

Wednesday 26 December 2018

aviation_gis_tools: Polar coordinates

First, we need import classes that will be useful:


from aviation_ellipsoid_calc_tools import vincenty_direct_solution
from aviation_bearing_tools import MagVar, Bearing
from aviation_coordinate_tools import CoordinatesPair

Constructor of LocalOriginPoint class:

class LocalOriginPoint(CoordinatesPair):
    def __init__(self, src_lat, src_lon, src_mag_var, origin_id='', origin_name=''):
        CoordinatesPair.__init__(self, src_lat, src_lon)
        self.mag_var = MagVar(src_mag_var)
        self.origin_id = origin_id
        self.origin_name = origin_name
        self.check_init_data()

Monday 17 December 2018

QGIS: customized attribute dialog

The skill to customize the attribute dialog box to current need can be very useful when you want to safe time and avoid mistakes in attribute entry during digitization.

Sunday 16 December 2018

If you use plugins from series of post about 'circle based plugins' (CreateCircle, CreateCircleSector, CreateCircleSegment etc.) or you look at source code - you will spot some drawbacks:
  • new features (polygons) might be added to layer that is in Layer Panel
  • duplication of code:
    • creating inner and outer arc - it can be done in function
    • calculation points (start and end of arc) can be done simpler (function, class)
  • lack of some precondition checking:
    • missing validation if radius is greater then 0, 
    • missing validation if outer radius is greater then inner radius 
    • missing validation if bearings from and to are not equal
  •  if we have to create a lot of such polygons it would be convenient to create them in one layer and using one plugins, in which we could choose what kind of polygon we need

Saturday 15 December 2018

QGIS Plugin: Circle ring sector

This plugins creates polygon that is sector of circle ring as name suggests. But how can it be use in aviation? Sometimes lateral limit of airspace is defined as arcs between bearings (clockwise and anti-clockwise), strait lines between between bearings at given radius.

Thursday 13 December 2018

Challenge: Circle segment polygon (QGIS plugin)

If airspace has shape of circle segment (circular segment), e. g.:
"From point at bearing 75 degrees, clockwise arc radius 7.5 NM at center 244521N0935318E to point of bearing 305 from center of arc, then strait line to start point"
to avoid of calculating two points, we can create plugin that creates polygon defined in such way.

Monday 10 December 2018

QGIS Plugin: Circle sector polygon

This plugins creates circle sector polygon. Input data is: center of circle coordinates, bearing from and baring to values and radius of circle.

Saturday 8 December 2018

Airspaces - grouping by shape

In terms of GIS - airspace is a polygon with certain atributes. Polygon shape, as we know, is described by pairs of coordinates (lon, lat). Let's look at some description of airspace, which you can find i aeronautical publications:

Friday 7 December 2018

Challenge: QGIS plugin to create circle - center defined by bearing and distance


Sometimes airspace has circle shape with center defined by bearing (true or magnetic) and distance.
We can solve this problem in (obvious) steps:

Tuesday 4 December 2018

Coordinates (5): coordinate_tool module

So far we know how to deal with coordinates: how to check if the input is valid - and if it is - how to convert input into decimal degrees format. We have wrote a few functions, but use them might be not as convenient as we expect. Because latitude and longitude input will be very often use while dealing with aviation content, and some data such as: original input from source, information if input is valid coordinate, DD equivalent if input is valid or information about what is wrong with input, etc. will be useful in further processing a good idea is to write class which will deal with all the stuff I mention above.

Sunday 2 December 2018

QGIS Plugin to convert DOF (Digital Obstacle File) data


To use FAA DOF in GIS systems  effectively, we need to store them in format wchich is more friemdly for GIS purposes such as: