Spatial Functions

Version:
2019.3

A spatial function builds spatial objects, analyze spatial data, and returns metrics from spatial fields. A spatial function can only be used with Spatial data types.

Spatial Functions are consistent with the Open GIS Consortium, Inc. For more information, visit http://portal.opengeospatial.org/files/?artifact_id=829.

Spatial objects in formulas can use operators: plus +; minus -; equals ==; not equal !=

`ST_Area(object, units)`: Returns the area in the specified units of the spatial object. (numeric data value)

`ST_Boundary(object)`: Returns the boundary of the spatial object. (polyline spatial object indicating the boundary of the input polygon)

`ST_BoundingRectangle(object, ...)`: Returns the bounding rectangle of the spatial object. (polygon spatial object)

Example

`ST_Centroid(object)`: Returns the centroid of the spatial object. (point spatial object)

`ST_CentroidX(object)`: Returns the longitude of the centroid of the spatial object (numeric data value)

`ST_CentroidY(object)`: Returns the latitude of the centroid of the spatial object (numeric data value)

`ST_Combine(object1, object2,...)`: Combines the spatial objects. (spatial object)

Example

`ST_Contains(object1,object2)`: Returns True if object1 contains object2. (Boolean value)

`ST_ConvexHull(object1,...)`: Returns the convex hull of the object(s). (spatial object)

Example

`ST_CreateLine(point1, point2...)`: Creates a line by connecting the specified points and lines in a sequence. (spatial object)

`ST_CreatePoint(x,y)`: Returns a spatial object containing the specified longitude and latitude coordinates. (spatial object)

`ST_CreatePolygon(obj1, obj2...)`: Creates a polygon by connecting the specified points and lines in a sequence. (spatial object)

`ST_Cut(object1,object2)`: Returns the result of cutting object1 from object 2. (spatial object)

Example

`ST_Dimension(object)`: Returns the dimension of the spatial object. The spatial dimension is the minimum number of coordinates needed to specify every point that makes up the spatial object. Point objects return a value of 0, Line objects return a value of 1, and Polygon objects return a value of 2. (numeric data value)

`ST_Distance(object1, object2, units)`: Returns the distance in specified units from object1 to object2. Supported units are Miles (Mi), Kilometers (KM), Meters, Feet. (numeric data value)

`ST_EndPoint(object)`: Returns the last point of the spatial object. (point spatial object)

`ST_Intersection(object1, object2,...)`: Returns the intersection of the specified spatial objects. (spatial object)

`ST_Intersects(object1, object2...)`: Returns True if the spatial objects intersect. (Boolean value)

`ST_InverseIntersection(object1, object2...)`: Returns the inverse intersection of the specified spatial objects. (spatial object)

`ST_Length(object, units)`: Returns the linear length of the spatial object. (numeric data value)

`ST_MaxX(object)`: Returns the maximum longitude of the spatial object. (numeric data value)

`ST_MaxY(object)`: Returns the maximum latitude of the spatial object. (numeric data value)

`ST_MinX(object)`: Returns the minimum longitude of the spatial object. (numeric data value)

`ST_MinY(object)`: Returns the minimum latitude of the spatial object. (numeric data value)

`ST_NumParts(object)`: Returns the number of parts in the spatial object. (numeric data value)

`ST_NumPoints(object)`: Returns the number of points in the spatial object. (numeric data value)

`ST_ObjectType(object)`: Returns the spatial object type as a string value. (string data value)

`ST_PointN(object, n)`: Returns the Nth point in the spatial object. (point spatial object)

`ST_RandomPoint(object)`: Returns a random point within the spatial object. (point spatial object)

`ST_Relate(object1,object2,relation)`: Returns True if the objects satisfy the provided DE-9IM relation. (Boolean value)

`ST_StartPoint(object)`: Returns the first point in the spatial object. (spatial object)

`ST_Touches(object1, object2)`: Returns True if object 1 touches object 2. (Boolean value)

`ST_TouchesOrIntersects(object1, object2)`: Returns True if object 1 touches or Intersects object 2. (Boolean value)

`ST_Within(object1, object2)`: Returns True if object 1 is contained by object 2. (Boolean value)

Need something else? Visit the Alteryx Community or contact support.