How to calculate cumulative length of a linestring, or the truck tonnage that accumulates across a set of roads

This articles describes how to compute the cumulative length of a single linestring, or the total tonnage that crosses a set road segments.

Oracle Spatial Vector Acceleration: Flick the Switch

Introduction A lot has been written, positive and negative, about the speed of Oracle Spatial over the years, a lot of ill informed (I mean if you don’t use it, how can you criticize it?). But since Oracle Database 12c (12.1) there is no longer any doubt as to the speed of the product. Why?Read More

CheckRadii: Identifying Tight Radius Curves sections within LineString geometry data

Sometimes it is a data quality requirement for linear data (roads, pipelines, transmission lines) that curves within the lines must have a radius greater than a particular amount. Recently a customer asked me to write some TSQL functions to help them run data quality checks over linear data loaded into a SQL Server 2008 geometryRead More

Overlaying Polygons in SQL Server Spatial

Introduction The OGC operators for geometry processing only support two polygon inputs. Additionally the Microsoft aggregate operators only include geometry union processing geometry::UnionAggregate and not overlay processing etc. UnionAggregate returns for all input polygons as the single Union (see above) does. Concept: Resolving all overlapping areas, without dissolving boundaries, is called “planar enforcing”. Planar enforcementRead More

Space Filling Curve Functions For TSQL

Introduction Warning: This article is long mainly because it includes the source code of the Hilbert, Morton and Peano key/curves. I would assert that space filling curves have always been overlooked in their use within GIS. Their existence was/is rarely taught at Universities, though at least in my day. Perhaps today it is different (butRead More

Geocoding Points Against a Grid of Cells/Tiles With/out Spatial Operators

This article shows how to geocode points objects against grid cells without using spatial operators. The article also shows how to use space curve values such as generated by a Morton key algorithm as grid cell ids and thus geocodes.