Position is a bubble, not a point

As a Software engineer you will often come across positional coordinates, typically latitude, longitude & altitude. There are a number of coordinate systems, but we typically convert them into Decimal Degrees, which we handle as doubles. Typically the focus is on holding all data supplied for example if we received the following numbers we would store the entire value:

Field Value
Latitude 52.452383475328974532
Longitude 120.38794932875423

The issue is a latitude/longitude isn't a point in space, it represents an area. The way we measure a position we have a certain amount of uncertainty this is commonly known as circle error probable (CEP).

If we have a device with a GPS receiver it might have a CEP of 10 metres, this means rather than the point we provide in the left image the actual position could be any point within the circle on the right. The circle centre position is no more likely to be the device position than any other position within the circle.

Devices like SatNav's cheat, they know a car will be on a road and so they look for where the CEP intercepts a known road and place a point on the road. You'll notice your device becomes confused for a short time if you take the wrong junction at a roundabout. The CEP covers the correct junction and it isn't until the CEP no longer intersects the expected road that the Satnav realises it needs to recalculate where you are.

This brings us to the main point of this blog, each decimal place represents a reduction in the area the coordinate represents. The following table explains the area defined when using decimal degrees.

Decimal Places Area
0 111 km
1 11.1 km
2 1.11 km
3 111 k
4 11.1 m
5 1.11 m
6 11.1 cm
7 1.11 cm
8 1.11 mm

If you are storing GPS received coordinates and the receiver has a CEP of 10m, then storing more than 5 decimal places is simply storing noise. You could argue you should limit it to 4 decimal places. This directly impacts the storage and memory requirements of a system, a Float typically holds 6-7 decimal places and is usually half the size of a double.

I mention this because I started my career in situational awareness and mission planning and the assumption was to use doubles and to never discard data, no one talked about data accuracy. Similarly in a recent Geo analytics role the view was to process the data as it is provided. Which looking back I find odd, all the systems we interfaced to had defined CEP's (like a SatNav from our example) but we never used that to limit the number of decimal places.

More recently I started looking at specific data sets and I realised the commercial data operators often limit the number of decimal points they provide, commercial data formats often provide a CEP with this information. One of the problems in fusing data and providing it to analysts is they will often take points as fact. A great example can be seen with MaxMind, when Maxmind was uncertain of a position but knew it was within a specific country they used the central position of the country rounded to 0 decimal places.

This tells us the way we visualise this information should change, if you used circles instead of points and used the number of decimal places within the decimal degrees data to define that circle, then analysts would have been presented with a circle with a radius of 55.6km. This might have resulted in less raids by the FBI.

Comments

Popular posts from this blog

Why you should always check your requirements

Continuous Integration is an organisation problem

How tools have their own workflow