constructors
This module contains functions that create new geographies from coordinates or already existing geographies.
ST_BEZIERSPLINE
Description
Takes a line and returns a curved version of it by applying a Bezier spline algorithm. Note that the resulting geography will be a LineString with additional points inserted.
geog
:GEOGRAPHY
input LineString.resolution
(optional):INT
total time in milliseconds assigned to the line. By defaultresolution
is10000
. Internal curve vertices are generated in 10 ms increments, so the maximum number of resulting points will beresolution/10
(close points may be merged resulting in less points). A higher number will increase the accuracy of the result but will increase the computation time and number of points.sharpness
(optional):DOUBLE
a measure of how curvy the path should be between splines. By defaultsharpness
is0.85
.
Return type
GEOGRAPHY
Examples
ST_MAKEELLIPSE
Description
Takes a Point and calculates the ellipse polygon given two semi-axes expressed in variable units and steps for precision.
center
:GEOGRAPHY
center point.xSemiAxis
:DOUBLE
semi (major) axis of the ellipse along the x-axis.ySemiAxis
:DOUBLE
semi (minor) axis of the ellipse along the y-axis.angle
(optional):DOUBLE
angle of rotation (along the horizontal axis), from East in decimal degrees, positive clockwise. By defaultangle
is0
.units
(optional):STRING
units of length, the supported options are: miles, kilometers, and degrees. By defaultunits
iskilometers
.steps
(optional):INT
number of steps. By defaultsteps
is64
.
Return type
GEOGRAPHY
Examples
Additional examples
ST_MAKEENVELOPE
Description Creates a rectangular Polygon from the minimum and maximum values for X and Y.
xmin
:DOUBLE
minimum value for X.ymin
:DOUBLE
minimum value for Y.xmax
:DOUBLE
maximum value for X.ymax
:DOUBLE
maximum value for Y.
Return type
GEOGRAPHY
Example
ST_TILEENVELOPE
Description Returns the boundary polygon of a tile given its zoom level and its X and Y indices.
zoomLevel
:INT
zoom level of the tile.xTile
:INT
X index of the tile.yTile
:INT
Y index of the tile.
Return type
GEOGRAPHY
Example
Last updated