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

Bing Maps Tile System Functions for TSQL

This blog presents functions for Bing Maps Tile System for TSQL. This support includes converting Latitude/Longitude pairs to Bing Maps QuadKeys. The source for the functions is over at the Mircosoft site – an article by James Schwartz. They are donated to the public domain. Some tests include: I hope this is of use toRead More

Identifying Quadrilateral Polygon Geometries in SQL Server Spatial

In some situations Quadrilateral polygon geometries in SQL Server Spatial can affect processing results. The best example of this is the identification of CircularStrings in polygon geometries. If quadrilateral objects are not identified, they end up being incorrectly converted. This function helps identify such polygon objects.

STLineToCurve. A Function that Converts a LineString to a CircularString, CompoundCurve or CurvePolygon.

The STLineToCurve function analyses a LineString looking for CircularString elements among its vertices (often LineStrings are created from curve elements by “stroking” especially where the processing software does not support CircularStrings). Any constructed CircularStrings are combined with other LineStrings to create CompoundCurves or CurvePolygons.

STInsertN: Insert single vertex into a geometry

SQL Server Spatial, unlike spatial database type systems such as PostGIS, does not provide coordinate editing functions: STAddPoint STUpdatePoint STDeletePoint These functions are not a part of either the SQL or OGC standards. In fact neither provide an API for the SQL editing of geometry objects. If one wishes to do so, one must programRead More

STUpdateN: Update (replace) a single vertex within a geometry object.

SQL Server Spatial, unlike spatial database type systems such as PostGIS, does not provide coordinate editing functions: STAddPoint STUpdatePoint STDeletePoint These functions are not a part of either the SQL or OGC standards. In fact neither provide an API for the SQL editing of geometry objects. If one wishes to do so, one must programRead More

STUpdate: Replace all points equal to the supplied point with replacement point.

SQL Server Spatial, unlike spatial database type systems such as PostGIS, does not provide coordinate editing functions: STAddPoint STUpdatePoint STDeletePoint These functions are not a part of either the SQL or OGC standards. In fact neither provide an API for the SQL editing of geometry objects. If one wishes to do so, one must programRead More

STDeleteN: Delete single vertex from geometry

SQL Server Spatial, unlike spatial database type systems such as PostGIS, does not provide coordinate editing functions: STAddPoint STUpdatePoint STDeletePoint These functions are not a part of either the SQL or OGC standards. In fact neither provide an API for the SQL editing of geometry objects. If one wishes to do so, one must programRead More