This module contains functions that compute geometric constructions, or alter geometry size or shape.
ST_BUFFER
ST_BUFFER(geog, radius, units, steps)
Description
Calculates a Geography buffer for input features for a given radius, i.e. the area within the given distance of the input. Units supported are miles, kilometers, and degrees.
geog: GEOGRAPHY input to be buffered.
radius: FLOAT64 distance to draw the buffer (negative values are allowed).
units: STRING|NULL units of length, the supported options are: miles, kilometers, and degrees. If NULLthe default value kilometers is used.
steps: INT64|NULL number of segments used to approximate a quarter circle. If NULL the default value 8 is used.
Takes a FeatureCollection of points and computes the median center. The median center is understood as the point that requires the least total travel from all other points.
geog: GEOGRAPHY feature for which to compute the center.
Return type
GEOGRAPHY
Example
ST_CENTEROFMASS
Description
Takes any Feature or a FeatureCollection and returns its center of mass (also known as centroid).
geog: GEOGRAPHY feature to be centered.
Return type
GEOGRAPHY
Example
ST_CONCAVEHULL
Description
Takes a set of points and returns a concave hull Polygon or MultiPolygon. In case that a single or a couple of points are passed as input, the function will return that point or a segment respectively.
geog: ARRAY<GEOGRAPHY> input points.
maxEdge: FLOAT64|NULL the maximum length allowed for an edge of the concave hull. Higher maxEdge values will produce more convex-like hulls. If NULL, the default value infinity is used and it would be equivalent to a Convex Hull.
units: STRING|NULL units of length, the supported options are: miles, kilometers, degrees or radians. If NULLthe default value kilometers is used.
Return type
GEOGRAPHY
Example
ST_DESTINATION
Description
Takes a Point and calculates the location of a destination point given a distance in degrees, radians, miles, or kilometers; and a bearing in degrees. This uses the Haversine formula to account for global curvature.
origin: GEOGRAPHY starting point.
distance: FLOAT64 distance from the origin point in the units specified.
bearing: FLOAT64 ranging from -180 to 180 (e.g. 0 is North, 90 is East, 180 is South, -90 is West).
units: STRING|NULL units of length, the supported options are: miles, kilometers, degrees or radians. If NULLthe default value kilometers is used.
Return type
GEOGRAPHY
Example
ST_GREATCIRCLE
Description
Calculate great circle routes as LineString or MultiLineString. If the start and end points span the antimeridian, the resulting feature will be split into a MultiLineString.
startPoint: GEOGRAPHY source point feature.
endPoint: GEOGRAPHY destination point feature.
npoints: INT64|NULL number of points. If NULL the default value 100 is used.