Wrapper required for handling the geoalchemy.base.DBSpatialElement.
This adds the necessary casts so that a geoalchemy.base.DBSpatialElement is recognised as a spatial element by the SQL Server. The reason for this is that in SQL Server the geometry data is a subclass of VARBINARY and the sub-classing information gets lost between queries. The cast provided by this function guarantees that SQL Server knows the data is a geometry.
Comparator class used for MS SQL Server 2008
Represents a Geometry as loaded from an MS SQL Server 2008 database.
The SpatialDialect for accessing MS SQL Server 2008 spatial data.
For the standard OGC functions there are a few differences in the SQL Server 2008 implementation that need to be taken into account:
Some standard functions are not available:
For SQL Server 2008 specific functions see ms_functions.
There is a bug causing errors when trying to insert None values into nullable columns. Use this constant instead.
Compiler function to handle VARBINARY(max).
Should be removed when SQLAlchemy supports this natively.
MS SQL Server specific geometry functions.
g.BufferWithTolerance(distance, tolerance, relative)
Creates a buffer with the given tolerance values.
g1.Filter(g2)
An index-only intersection query. Can return false positives. If no index is defined then behaves like g1.intersection(g2).
g.AsGML()
GML representation of the geometry. Does not include the SRS.
g.InstanceOf(geometry_type_name)
Tests whether the geometry is of the given geometry type.
p.M
Returns the M value for the given Point. Only valid for Point geometries.
g.MakeValid()
Converts an invalid Geometry into a valid one. This can return a different type of Geometry.
g.Reduce(tolerance)
Returns an approximation of the Geometry using the Douglas-Peucker algorithm.
p.AsTextZM()
The Point WKT representation augmented with Z and M values. Only valid for Point geometries.
g.ToString()
Equivalent to text_zm except that for NULL geometries it will return the string ‘NULL’.
p.Z
Returns the M value for the given Point. Only valid for Point geometries.