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.

STDensify: Densify LineString or Polygon geometry objects

Requirement The ability to densify a lineString or polygon ring is a common requirement across database platforms. Some, like PostGIS, has such functionality “out of the box”. Others, such as Oracle Locator/Spatial do not which is why a function is available with the PL/SQL (Package and Object) code that is available for download from thisRead More


STAsEWKT — Implements an method to create Extended Well Known Text (EWKT) strings from the input @p_geometry. Introduction/Description The Open Geospatial Consortium’s, Simple Features Specifications (SFS) 1.1 and 1.2, as well as the SQL/MM standard, define a Well Known Text (WKT) format for use in interchanging or processing geometry data. These specifications are 2D inRead More


STMulti — Function that returns @p_geometry as a MULTI* geometry Function Specification Description In situations where a geometry column is constrained to hold only the multi version of a base geometry, storage of a single geometry eg LineString requires that geometry to be wrapped as a multi geometry eg MultiLineString. ALTER TABLE [dbo].[Colony] WITH CHECKRead More


STRound — Function which rounds the ordinates of the supplied geometry. Function Specification Description The result of many geoprocessing operations in any spatial type can be geometries whose ordinates (X, Y etc) have far more decimal digits of precision than the initial geometry. Additionally, some input GIS formats, such as shapefiles (which has no associatedRead More

Snap Point to SQL Server Spatial geometry using TSQL

This function uses the SQL Server Spatial ShortestLineTo function to compute a point on the boundary of the supplied geometry nearest to the supplied point. If the snap distance is < the user supplied @p_snap_within distance, the computed point is returned. However, if the distance is > the user supplied @p_snap_within distance the original point is returned.


STLocateBetweenElevations — Computes and returns elements that intersect the specified Z range. Function Specification Description Is implementation of PostGIS: Processes the supplied (3D, 3DM) (multi)linestring returning the elements that intersect the specified range of elevations inclusively. May return points and/or linestrings in the appropriate geometry type. Where a new xy position is to be computed,Read More