Loose Matching Summary
Geometry matching function in PostGIS are currently biased toward exact matches. However, spatial data is often “logically equivalent but physically disjoint” – the machine representations are close but not exact even though the geometries represent the same features.
In order to test approximate equality a number of functions are useful:
- ST_Equals(geometry GEOMETRY1, geometry GEOMETRY2, double TOLERANCE, [boolean COMMUTATIVE]), tests that geometries are the same within a buffer tolerance. However, one small divergence beyond tolerance will cause a non-equal condition.
- ST_AverageDistance(geometry GEOMETRY1, geometry GEOMETRY2, [boolean COMMUTATIVE]), calculates the average distance by sampling distances along the length of the pairing. Testing for an average tolerance allows for spikes beyond the tolerance, as long as the average is within bounds.
- Commutativity. It's possible for A to be similar to B, but B to be dissimilar to A. For example, if B is long and A is short, but the entirety of A's length is close to B. A common case is a long line split into many smaller lines. Turning off commutativity would allow these cases to be caught as similar geometries.
- ST_MaxDistance(geometry GEOMETRY1, geometry GEOMETRY2), calculates the maximum distance between two geometries.
Funding
This roadmap item is currently unfunded.
Get a quote now!
Get a quote or read more about core development to add your support to a road-map item.
Other Roadmap Items
Business Intelligence Utilities
Functions to aggregate collections of records in useful ways for reporting, such as heat maps, influence polygons and clustering.
For GIS data, spatial partitioning indexes (quadtree, kd-tree) have been shown to be significantly faster than more general balanced indexes (r-tree). PostGIS currently uses an r-tree index. Adding SP-GiST (a generic API for partitioned indexes) to PostgreSQL will allow much faster spatial searching in PostGIS.
A POINTPATCH type, and associated index and functions, for handling the management of multi-terrabyte collections of LIDAR point data.