| Title: | Apache SedonaDB Function Definitions and Documentation |
|---|---|
| Description: | Provides function definitions and documentation for use in 'SedonaDB'. |
| Authors: | Dewey Dunnington [aut, cre] |
| Maintainer: | Dewey Dunnington <[email protected]> |
| License: | Apache License (>= 2) |
| Version: | 0.3.0.9000 |
| Built: | 2026-06-04 03:01:34 UTC |
| Source: | https://github.com/apache/sedona-db |
Returns the nodata value of the specified band as a double. Returns null if the band has no nodata value defined.
rs_bandnodatavalue(rast = sd_missing_arg(), band = sd_missing_arg())rs_bandnodatavalue(rast = sd_missing_arg(), band = sd_missing_arg())
rast |
(raster): Input raster |
band |
(int): Band index (1-based). Defaults to 1 if not specified. |
(float64)
SedonaDB SQL documentation for RS_BANDNODATAVALUE
Primarily used with out-db rasters, where only raster path and geo-referencing metadata are stored in the database.
rs_bandpath(rast = sd_missing_arg())rs_bandpath(rast = sd_missing_arg())
rast |
(raster): Input raster |
(utf8)
SedonaDB SQL documentation for RS_BANDPATH
Returns the pixel data type of the specified band as a string.
rs_bandpixeltype(rast = sd_missing_arg(), band = sd_missing_arg())rs_bandpixeltype(rast = sd_missing_arg(), band = sd_missing_arg())
rast |
(raster): Input raster |
band |
(int): Band index (1-based). Defaults to 1 if not specified. |
(utf8)
SedonaDB SQL documentation for RS_BANDPIXELTYPE
Returns true if the convex hull of the first argument completely contains
the second argument. Both rasters and geometries are accepted in either
argument position. When two rasters are provided, their convex hulls are
compared. If the arguments have different CRSes, the geometry is transformed
into the raster's CRS before evaluating the predicate. For two rasters, the
second raster's extent is transformed into the first raster's CRS. If the
preferred transformation fails, the extent of both sides are transformed to
WGS 84 as a fallback. If either argument has no CRS set, the comparison is
performed directly without CRS transformation.
rs_contains(...)rs_contains(...)
... |
Supported combinations:
|
(boolean)
SedonaDB SQL documentation for RS_CONTAINS
Returns the convex hull geometry of a raster.
rs_convexhull(rast = sd_missing_arg())rs_convexhull(rast = sd_missing_arg())
rast |
(raster): Input raster |
(geometry)
SedonaDB SQL documentation for RS_CONVEXHULL
Returns the CRS string for a raster.
rs_crs(rast = sd_missing_arg())rs_crs(rast = sd_missing_arg())
rast |
(raster): Input raster |
(string)
SedonaDB SQL documentation for RS_CRS
Returns the envelope (bounding box) of a raster as a geometry.
rs_envelope(rast = sd_missing_arg())rs_envelope(rast = sd_missing_arg())
rast |
(raster): Input raster |
(geometry)
SedonaDB SQL documentation for RS_ENVELOPE
Creates a simple example raster for testing and demos.
rs_example()rs_example()
(raster)
SedonaDB SQL documentation for RS_EXAMPLE
Loads raster metadata from the file at path and returns a raster whose
bands reference the source file as out-db bands. This is useful when you want
to work with rasters stored on disk without copying their pixel data into the
raster value itself.
rs_frompath(path = sd_missing_arg())rs_frompath(path = sd_missing_arg())
path |
(string): Input string |
(raster)
SedonaDB SQL documentation for RS_FROMPATH
Returns the georeference metadata of raster as a string in GDAL or ESRI format as commonly seen in a world file. Default is GDAL if not specified. Both formats output six lines: scalex, skewy, skewx, scaley, upperleftx, upperlefty. In GDAL format the upper-left coordinates refer to the corner of the upper-left pixel, while in ESRI format they are shifted to the center of the upper-left pixel.
rs_georeference(rast = sd_missing_arg(), format = sd_missing_arg())rs_georeference(rast = sd_missing_arg(), format = sd_missing_arg())
rast |
(raster): Input raster |
format |
(utf8): Output format, either 'GDAL' (default) or 'ESRI'. GDAL reports the upper-left corner of the upper-left pixel; ESRI shifts the coordinates to the center of the upper-left pixel. |
(utf8)
SedonaDB SQL documentation for RS_GEOREFERENCE
Returns the height of a raster in pixels.
rs_height(rast = sd_missing_arg())rs_height(rast = sd_missing_arg())
rast |
(raster): Input raster |
(bigint)
SedonaDB SQL documentation for RS_HEIGHT
Returns true if the convex hull of the first argument intersects the second
argument. Both rasters and geometries are accepted in either argument
position. When two rasters are provided, their convex hulls are compared. If
the arguments have different CRSes, the geometry is transformed into the
raster's CRS before evaluating the predicate. For two rasters, the second
raster's extent is transformed into the first raster's CRS. If the preferred
transformation fails, the extent of both sides are transformed to WGS 84 as a
fallback. If either argument has no CRS set, the comparison is performed
directly without CRS transformation.
rs_intersects(...)rs_intersects(...)
... |
Supported combinations:
|
(boolean)
SedonaDB SQL documentation for RS_INTERSECTS
Returns the number of bands in the raster.
rs_numbands(rast = sd_missing_arg())rs_numbands(rast = sd_missing_arg())
rast |
(raster): Input raster |
(uint32)
SedonaDB SQL documentation for RS_NUMBANDS
Returns the centroid of the specified pixel as a Point geometry.
rs_pixelascentroid( rast = sd_missing_arg(), colX = sd_missing_arg(), rowY = sd_missing_arg() )rs_pixelascentroid( rast = sd_missing_arg(), colX = sd_missing_arg(), rowY = sd_missing_arg() )
rast |
(raster): Input raster |
colX |
(integer): Input integer |
rowY |
(integer): Input integer |
(geometry)
SedonaDB SQL documentation for RS_PIXELASCENTROID
Returns the upper-left corner of the specified pixel as a Point geometry.
rs_pixelaspoint( rast = sd_missing_arg(), colX = sd_missing_arg(), rowY = sd_missing_arg() )rs_pixelaspoint( rast = sd_missing_arg(), colX = sd_missing_arg(), rowY = sd_missing_arg() )
rast |
(raster): Input raster |
colX |
(integer): Input integer |
rowY |
(integer): Input integer |
(geometry)
SedonaDB SQL documentation for RS_PIXELASPOINT
Returns the bounding polygon of the specified pixel.
rs_pixelaspolygon( rast = sd_missing_arg(), colX = sd_missing_arg(), rowY = sd_missing_arg() )rs_pixelaspolygon( rast = sd_missing_arg(), colX = sd_missing_arg(), rowY = sd_missing_arg() )
rast |
(raster): Input raster |
colX |
(integer): Input integer |
rowY |
(integer): Input integer |
(geometry)
SedonaDB SQL documentation for RS_PIXELASPOLYGON
Converts raster pixel coordinates to world coordinates as a point.
rs_rastertoworldcoord( rast = sd_missing_arg(), x = sd_missing_arg(), y = sd_missing_arg() )rs_rastertoworldcoord( rast = sd_missing_arg(), x = sd_missing_arg(), y = sd_missing_arg() )
rast |
(raster): Input raster |
x |
(integer): Input integer |
y |
(integer): Input integer |
(geometry)
SedonaDB SQL documentation for RS_RASTERTOWORLDCOORD
Converts raster pixel coordinates to world X coordinate.
rs_rastertoworldcoordx( rast = sd_missing_arg(), x = sd_missing_arg(), y = sd_missing_arg() )rs_rastertoworldcoordx( rast = sd_missing_arg(), x = sd_missing_arg(), y = sd_missing_arg() )
rast |
(raster): Input raster |
x |
(integer): Input integer |
y |
(integer): Input integer |
(double)
SedonaDB SQL documentation for RS_RASTERTOWORLDCOORDX
Converts raster pixel coordinates to world Y coordinate.
rs_rastertoworldcoordy( rast = sd_missing_arg(), x = sd_missing_arg(), y = sd_missing_arg() )rs_rastertoworldcoordy( rast = sd_missing_arg(), x = sd_missing_arg(), y = sd_missing_arg() )
rast |
(raster): Input raster |
x |
(integer): Input integer |
y |
(integer): Input integer |
(double)
SedonaDB SQL documentation for RS_RASTERTOWORLDCOORDY
Returns the raster rotation in radians based on skew parameters.
rs_rotation(rast = sd_missing_arg())rs_rotation(rast = sd_missing_arg())
rast |
(raster): Input raster |
(double)
SedonaDB SQL documentation for RS_ROTATION
Returns the pixel width (scale X) of a raster.
rs_scalex(rast = sd_missing_arg())rs_scalex(rast = sd_missing_arg())
rast |
(raster): Input raster |
(double)
SedonaDB SQL documentation for RS_SCALEX
Returns the pixel height (scale Y) of a raster.
rs_scaley(rast = sd_missing_arg())rs_scaley(rast = sd_missing_arg())
rast |
(raster): Input raster |
(double)
SedonaDB SQL documentation for RS_SCALEY
Sets a CRS on a raster. This is metadata-only: raster cell values and geotransform are not transformed.
rs_setcrs(rast = sd_missing_arg(), target_crs = sd_missing_arg())rs_setcrs(rast = sd_missing_arg(), target_crs = sd_missing_arg())
rast |
(raster): Input raster |
target_crs |
(string): Input string |
(raster)
SedonaDB SQL documentation for RS_SETCRS
Sets the SRID of a raster. This is metadata-only: raster cell values and geotransform are not transformed.
rs_setsrid(rast = sd_missing_arg(), srid = sd_missing_arg())rs_setsrid(rast = sd_missing_arg(), srid = sd_missing_arg())
rast |
(raster): Input raster |
srid |
(integer): Input integer |
(raster)
SedonaDB SQL documentation for RS_SETSRID
Returns the X skew (rotation) parameter of a raster.
rs_skewx(rast = sd_missing_arg())rs_skewx(rast = sd_missing_arg())
rast |
(raster): Input raster |
(double)
SedonaDB SQL documentation for RS_SKEWX
Returns the Y skew (rotation) parameter of a raster.
rs_skewy(rast = sd_missing_arg())rs_skewy(rast = sd_missing_arg())
rast |
(raster): Input raster |
(double)
SedonaDB SQL documentation for RS_SKEWY
Returns the SRID of a raster.
rs_srid(rast = sd_missing_arg())rs_srid(rast = sd_missing_arg())
rast |
(raster): Input raster |
(integer)
SedonaDB SQL documentation for RS_SRID
Returns the upper-left X coordinate of a raster.
rs_upperleftx(rast = sd_missing_arg())rs_upperleftx(rast = sd_missing_arg())
rast |
(raster): Input raster |
(double)
SedonaDB SQL documentation for RS_UPPERLEFTX
Returns the upper-left Y coordinate of a raster.
rs_upperlefty(rast = sd_missing_arg())rs_upperlefty(rast = sd_missing_arg())
rast |
(raster): Input raster |
(double)
SedonaDB SQL documentation for RS_UPPERLEFTY
Returns the width of a raster in pixels.
rs_width(rast = sd_missing_arg())rs_width(rast = sd_missing_arg())
rast |
(raster): Input raster |
(bigint)
SedonaDB SQL documentation for RS_WIDTH
Returns true if the convex hull of the first argument is completely within
the second argument. This is the inverse of RS_Contains: RS_Within(A, B)
is equivalent to RS_Contains(B, A). Both rasters and geometries are
accepted in either argument position. When two rasters are provided, their
convex hulls are compared. If the arguments have different CRSes, the
geometry is transformed into the raster's CRS before evaluating the
predicate. For two rasters, the second raster's extent is transformed into
the first raster's CRS. If the preferred transformation fails, the extent of
both sides are transformed to WGS 84 as a fallback. If either argument has no
CRS set, the comparison is performed directly without CRS transformation.
rs_within(...)rs_within(...)
... |
Supported combinations:
|
(boolean)
SedonaDB SQL documentation for RS_WITHIN
Converts world coordinates to raster coordinates as a point.
rs_worldtorastercoord( rast = sd_missing_arg(), x = sd_missing_arg(), y = sd_missing_arg() )rs_worldtorastercoord( rast = sd_missing_arg(), x = sd_missing_arg(), y = sd_missing_arg() )
rast |
(raster): Input raster |
x |
(double): Input double |
y |
(double): Input double |
(geometry)
SedonaDB SQL documentation for RS_WORLDTORASTERCOORD
Converts world coordinates to raster X coordinate.
rs_worldtorastercoordx( rast = sd_missing_arg(), x = sd_missing_arg(), y = sd_missing_arg() )rs_worldtorastercoordx( rast = sd_missing_arg(), x = sd_missing_arg(), y = sd_missing_arg() )
rast |
(raster): Input raster |
x |
(double): Input double |
y |
(double): Input double |
(integer)
SedonaDB SQL documentation for RS_WORLDTORASTERCOORDX
Converts world coordinates to raster Y coordinate.
rs_worldtorastercoordy( rast = sd_missing_arg(), x = sd_missing_arg(), y = sd_missing_arg() )rs_worldtorastercoordy( rast = sd_missing_arg(), x = sd_missing_arg(), y = sd_missing_arg() )
rast |
(raster): Input raster |
x |
(double): Input double |
y |
(double): Input double |
(integer)
SedonaDB SQL documentation for RS_WORLDTORASTERCOORDY
Applies an affine transformation to a geometry.
sd_affine(...)sd_affine(...)
... |
Supported combinations:
|
(geometry)
SedonaDB SQL documentation for ST_AFFINE
ST_Analyze_Agg() provides a high-level summary of its input geometries. The
fields of its struct return type are: - count: Number of input geometries -
minx, miny, maxx, maxy: Minimum bounding rectangle (envelope). For
geography, this represents geographical bounds such that minx may be greater
than maxx where this represents more compact bounds (e.g., a small feature
crossing the antimeridian). - mean_size_in_bytes -
mean_points_per_geometry - puntal_count: Number of point or multipoint
geometries - lineal_count: Number of line or multilinestring geometries -
polygonal_count: Number of polygon or multipolygon geometries -
geometrycollection_count: Number of geometrycollection geometries -
mean_envelope_width - mean_envelope_height - mean_envelope_area
sd_analyze_agg(geom = sd_missing_arg())sd_analyze_agg(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(struct)
SedonaDB SQL documentation for ST_ANALYZE_AGG
ST_Area() Returns the area of a polygon or multi-polygon. For geometry,
returns the area in the units of the coordinate reference system (squared);
for geography, returns the area in square meters, calculated on a spherical
Earth model.
sd_area(geom = sd_missing_arg())sd_area(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_AREA
ST_AsBinary() Returns the Well-Known Binary representation of a geometry or
geography. This function also has the alias ST_AsWKB. ST_AsBinary() may
preserve the underlying Arrow storage type of the input geometry. For
example, when the input geometry is backed by Arrow BinaryView storage, the
WKB output may also use BinaryView storage. If a downstream consumer
requires simpler Arrow storage such as Binary, wrap the result with
sd_simplifystorage().
sd_asbinary(geom = sd_missing_arg())sd_asbinary(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(binary)
SedonaDB SQL documentation for ST_ASBINARY
EWKB extends WKB to include SRID information in the binary header and is useful for PostGIS compatibility. This function preserves item-level CRSes or will repeat a type-level CRS for all elements if present.
sd_asewkb(geom = sd_missing_arg())sd_asewkb(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(binary)
SedonaDB SQL documentation for ST_ASEWKB
Returns the GeoJSON representation of a geometry.
sd_asgeojson(geom = sd_missing_arg())sd_asgeojson(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(string)
SedonaDB SQL documentation for ST_ASGEOJSON
Alias: ST_AsWKT.
sd_astext(geom = sd_missing_arg())sd_astext(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(string)
SedonaDB SQL documentation for ST_ASTEXT
Returns the azimuth (angle) from the first point to the second point, measured in radians clockwise from north. Returns NULL if either input is not a point.
sd_azimuth(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_azimuth(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_AZIMUTH
For a polygon, the boundary is the exterior and interior rings; for a linestring it is the endpoints.
sd_boundary(geom = sd_missing_arg())sd_boundary(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_BOUNDARY
For geography, the distance is specified in meters. The buffer is computed on the sphere, producing a result that considers polar regions and the antimeridian. Negative distances are supported for polygon inputs to shrink the polygon.
sd_buffer(...)sd_buffer(...)
... |
Supported combinations:
|
(geometry)
SedonaDB SQL documentation for ST_BUFFER
For geography, the centroid is calculated using spherical geometry.
sd_centroid(geom = sd_missing_arg())sd_centroid(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_CENTROID
Returns the 2-dimensional point on geom1 that is closest to geom2.
sd_closestpoint(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_closestpoint(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_CLOSESTPOINT
An aggregate function that collects multiple geometries into a single GeometryCollection or the appropriate Multi-type if all inputs share the same geometry type.
sd_collect_agg(geom = sd_missing_arg())sd_collect_agg(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_COLLECT_AGG
Returns a concave hull enclosing the input geometry. The pct_convex
parameter controls how "tight" the hull is: 1.0 produces the convex hull,
while smaller values produce tighter, more concave shapes.
sd_concavehull(geom = sd_missing_arg(), pct_convex = sd_missing_arg())sd_concavehull(geom = sd_missing_arg(), pct_convex = sd_missing_arg())
geom |
(geometry): Input geometry |
pct_convex |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_CONCAVEHULL
Returns true if no points of B lie outside A and at least one point of B
lies inside A.
sd_contains(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_contains(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_CONTAINS
Returns the smallest convex polygon that encloses all points in the input geometry.
sd_convexhull(geom = sd_missing_arg())sd_convexhull(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_CONVEXHULL
Returns true if no point in geometry A is outside geometry B. Inverse of
ST_Covers: ST_CoveredBy(A, B) is equivalent to ST_Covers(B, A).
sd_coveredby(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_coveredby(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_COVEREDBY
Returns true if no point in geometry B is outside geometry A. Similar to
ST_Contains but does not require interior intersection.
sd_covers(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_covers(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_COVERS
Returns true if the two geometries have some (but not all) interior points
in common and the dimension of the intersection is less than that of either
input.
sd_crosses(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_crosses(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_CROSSES
Returns the CRS (Coordinate Reference System) string associated with a
geometry or geography. This is abbreviated as an authority/code if possible
(e.g., 'EPSG:3857').
sd_crs(geom = sd_missing_arg())sd_crs(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(string)
SedonaDB SQL documentation for ST_CRS
Returns the part of geometry A that does not intersect with geometry B.
sd_difference(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_difference(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_DIFFERENCE
Returns the inherent dimension of the geometry: - 0 for points or multipoints
1 for linestring or multilinestrings - 2 for polygons or multipolygons For geometry collections, returns the largest dimension among the components.
sd_dimension(geom = sd_missing_arg())sd_dimension(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(integer)
SedonaDB SQL documentation for ST_DIMENSION
Returns true if the two geometries do not share any points. This is the
inverse of ST_Intersects.
sd_disjoint(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_disjoint(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_DISJOINT
For geometry, returns the 2D Cartesian (planar) distance between two geometries, in the units of the coordinate reference system. For geography, returns the spherical approximation of the geodesic distance between two geographies in meters.
sd_distance(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_distance(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_DISTANCE
If the geometry is simple it returns the geometry itself, if the geometry is collection or multi it returns record for each of collection components.
sd_dump(geom = sd_missing_arg())sd_dump(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(struct)
SedonaDB SQL documentation for ST_DUMP
For geography, the distance is specified in meters and represents the spherical approximation of the geodesic distance between the two geographies.
sd_dwithin( geom_a = sd_missing_arg(), geom_b = sd_missing_arg(), distance = sd_missing_arg() )sd_dwithin( geom_a = sd_missing_arg(), geom_b = sd_missing_arg(), distance = sd_missing_arg() )
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
distance |
(double): Input double |
(boolean)
SedonaDB SQL documentation for ST_DWITHIN
Returns last point of a linestring.
sd_endpoint(geom = sd_missing_arg())sd_endpoint(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_ENDPOINT
Returns the minimum axis-aligned bounding box of a geometry. This is usually a polygon but can be a linestring for perfectly vertical or horizontal input and is a point if the input is also a point. For geography, the return value is still a rectangular polygon geometry that represents the latitude and longitude range of the input. For geographies that span the antimeridian, a multipolygon is returned (one on each side of the antimeridian). Because of slight numerical inaccuracy of geographical calculations, the bounds are expanded slightly compared to the corresponding geometry envelope.
sd_envelope(geom = sd_missing_arg())sd_envelope(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_ENVELOPE
An aggregate function that computes the collective bounding box (envelope) of all geometries in a group.
sd_envelope_agg(geom = sd_missing_arg())sd_envelope_agg(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_ENVELOPE_AGG
Returns true if the two geometries are topologically equal (i.e., they
represent the same point set, regardless of vertex order).
sd_equals(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_equals(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_EQUALS
Returns a new geometry with the X and Y coordinates of each vertex swapped.
sd_flipcoordinates(geom = sd_missing_arg())sd_flipcoordinates(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_FLIPCOORDINATES
Discards any Z and M values present (if any).
sd_force2d(geom = sd_missing_arg())sd_force2d(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_FORCE2D
If the geometry already has Z values they are preserved; otherwise the
optional z argument (default 0) is used.
sd_force3d(geom = sd_missing_arg(), z = sd_missing_arg())sd_force3d(geom = sd_missing_arg(), z = sd_missing_arg())
geom |
(geometry): Input geometry |
z |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_FORCE3D
If the geometry already has M values they are preserved; otherwise the
optional m argument (default 0) is used.
sd_force3dm(geom = sd_missing_arg(), m = sd_missing_arg())sd_force3dm(geom = sd_missing_arg(), m = sd_missing_arg())
geom |
(geometry): Input geometry |
m |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_FORCE3DM
If the geometry already has Z and M values they are preserved; otherwise
optional z and m arguments (both default 0) are used.
sd_force4d(geom = sd_missing_arg(), z = sd_missing_arg(), m = sd_missing_arg())sd_force4d(geom = sd_missing_arg(), z = sd_missing_arg(), m = sd_missing_arg())
geom |
(geometry): Input geometry |
z |
(double): Input double |
m |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_FORCE4D
Constructs a Geography from WKB Binary.
sd_geogfromwkb(wkb = sd_missing_arg())sd_geogfromwkb(wkb = sd_missing_arg())
wkb |
(binary): Input binary |
(geography)
SedonaDB SQL documentation for ST_GEOGFROMWKB
Alias: ST_GeogFromText.
sd_geogfromwkt(wkt = sd_missing_arg(), srid = sd_missing_arg())sd_geogfromwkt(wkt = sd_missing_arg(), srid = sd_missing_arg())
wkt |
(string): Input string |
srid |
(integer): Input integer |
(geography)
SedonaDB SQL documentation for ST_GEOGFROMWKT
Creates a geography Point from longitude and latitude coordinates.
sd_geogpoint(longitude = sd_missing_arg(), latitude = sd_missing_arg())sd_geogpoint(longitude = sd_missing_arg(), latitude = sd_missing_arg())
longitude |
(double): Input double |
latitude |
(double): Input double |
(geography)
SedonaDB SQL documentation for ST_GEOGPOINT
Returns NULL if the index is out of range.
sd_geometryn(geom = sd_missing_arg(), n = sd_missing_arg())sd_geometryn(geom = sd_missing_arg(), n = sd_missing_arg())
geom |
(geometry): Input geometry |
n |
(integer): Input integer |
(geometry)
SedonaDB SQL documentation for ST_GEOMETRYN
Returns the OGC geometry type name prefixed with ST_. Possible return
values include: 'ST_Point', 'ST_LineString', 'ST_Polygon',
'ST_MultiPoint', 'ST_MultiLineString', 'ST_MultiPolygon', and
'ST_GeometryCollection'.
sd_geometrytype(geom = sd_missing_arg())sd_geometrytype(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(string)
SedonaDB SQL documentation for ST_GEOMETRYTYPE
Parses an EWKB binary value and returns a geometry. EWKB extends the WKB format to include SRID information in the binary header and is useful for PostGIS compatibility.
sd_geomfromewkb(ewkb = sd_missing_arg())sd_geomfromewkb(ewkb = sd_missing_arg())
ewkb |
(binary): Input binary |
(geometry)
SedonaDB SQL documentation for ST_GEOMFROMEWKB
Parses an EWKT string in the format SRID=<srid>;<wkt> and returns a
geometry with the embedded SRID set. EWKT is used by PostGIS and other
systems for human-readable output when an item-level SRID required.
sd_geomfromewkt(ewkt = sd_missing_arg())sd_geomfromewkt(ewkt = sd_missing_arg())
ewkt |
(string): Input string |
(geometry)
SedonaDB SQL documentation for ST_GEOMFROMEWKT
Parses a WKB binary value and returns a geometry. The input is validated by default. An optional SRID or CRS can be provided as a second argument.
sd_geomfromwkb(wkb = sd_missing_arg(), srid = sd_missing_arg())sd_geomfromwkb(wkb = sd_missing_arg(), srid = sd_missing_arg())
wkb |
(binary): Input binary |
srid |
(crs): Input crs |
(geometry)
SedonaDB SQL documentation for ST_GEOMFROMWKB
An optional SRID or CRS can be provided as a second argument to set the
spatial reference. Aliases: ST_GeomFromText, ST_GeometryFromText.
sd_geomfromwkt(wkt = sd_missing_arg(), srid = sd_missing_arg())sd_geomfromwkt(wkt = sd_missing_arg(), srid = sd_missing_arg())
wkt |
(string): Input string |
srid |
(crs): Input crs |
(geometry)
SedonaDB SQL documentation for ST_GEOMFROMWKT
Returns true if the geometry has a M dimension.
sd_hasm(geom = sd_missing_arg())sd_hasm(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_HASM
Returns true if the geometry has a Z dimension.
sd_hasz(geom = sd_missing_arg())sd_hasz(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_HASZ
Returns the Nth interior LINESTRING ring of a POLYGON. Returns NULL if
the geometry is not a polygon or n is out of range. n is 1-based in
SedonaDB.
sd_interiorringn(geom = sd_missing_arg(), n = sd_missing_arg())sd_interiorringn(geom = sd_missing_arg(), n = sd_missing_arg())
geom |
(geometry): Input geometry |
n |
(integer): Input integer |
(geometry)
SedonaDB SQL documentation for ST_INTERIORRINGN
Computes the intersection of two geometries or geographies.
sd_intersection(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_intersection(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_INTERSECTION
Returns the cumulative intersection of all geometries in the input.
sd_intersection_agg(geom = sd_missing_arg())sd_intersection_agg(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_INTERSECTION_AGG
Returns true if geomA intersects geomB.
sd_intersects(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_intersects(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_INTERSECTS
Returns true if the LineString's start and end points are the same. For
MultiLineStrings, all elements must be closed.
sd_isclosed(geom = sd_missing_arg())sd_isclosed(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_ISCLOSED
Returns TRUE if the geometry type of the input is a geometry collection type. Collection types are the following: - GEOMETRYCOLLECTION - MULTIPOINT - MULTIPOLYGON - MULTILINESTRING
sd_iscollection(geom = sd_missing_arg())sd_iscollection(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_ISCOLLECTION
Returns true if the geometry or geography is empty.
sd_isempty(geom = sd_missing_arg())sd_isempty(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_ISEMPTY
Returns true if the linestring is both closed (ST_IsClosed) and simple
(ST_IsSimple). In other words, the input forms a ring with no
self-intersections.
sd_isring(geom = sd_missing_arg())sd_isring(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_ISRING
Returns true if the geometry has no anomalous geometric points such as
self-intersections or self-tangency.
sd_issimple(geom = sd_missing_arg())sd_issimple(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_ISSIMPLE
Returns true if the geometry is well-formed according to OGC rules. Use
ST_IsValidReason to get a diagnostic message for invalid geometries and
ST_MakeValid to attempt to repair them.
sd_isvalid(geom = sd_missing_arg())sd_isvalid(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_ISVALID
Returns a text string explaining why a geometry is invalid, or "Valid Geometry" if the geometry is valid. Useful for debugging geometry
construction.
sd_isvalidreason(geom = sd_missing_arg())sd_isvalidreason(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(string)
SedonaDB SQL documentation for ST_ISVALIDREASON
ST_KNN is used in a join condition to find the k nearest neighbors of one
geometry from another set of geometries. The actual k-nearest neighbors logic
is handled by the spatial join execution engine: the function itself is a
stub that simply defines the expected signature.
sd_knn( geomA = sd_missing_arg(), geomB = sd_missing_arg(), k = sd_missing_arg(), use_spheroid = sd_missing_arg() )sd_knn( geomA = sd_missing_arg(), geomB = sd_missing_arg(), k = sd_missing_arg(), use_spheroid = sd_missing_arg() )
geomA |
(geometry): The geometry around which to search. |
geomB |
(geometry): Column containing candidate geometries. |
k |
(integer): The number of nearest neighbours to return. Defaults to 1. |
use_spheroid |
(boolean): true to use spherical distance, false for Euclidean. Defaults to false. |
(boolean)
SedonaDB SQL documentation for ST_KNN
Returns the length of geom. This function only supports LineString, MultiLineString, and GeometryCollections containing linear geometries. Use ST_Perimeter for polygons. For geometry, returns the length in the units of the coordinate reference system; for geography, returns the spherical approximation of the geodesic length in meters.
sd_length(geom = sd_missing_arg())sd_length(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_LENGTH
Returns a point interpolated along a line. First argument must be a LINESTRING. Second argument is a double between 0 and 1 representing fraction of total linestring length the point has to be located. For geography, the interpolation is computed using spherical interpolation between vertices.
sd_lineinterpolatepoint(geom = sd_missing_arg(), fraction = sd_missing_arg())sd_lineinterpolatepoint(geom = sd_missing_arg(), fraction = sd_missing_arg())
geom |
(geometry): Input geometry |
fraction |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_LINEINTERPOLATEPOINT
Returns a double between 0 and 1, representing the location of the closest point on the LineString as a fraction of its total length. The first argument must be a LINESTRING, and the second argument is a POINT geometry or geography. For geography, the fraction is computed based on spherical interpolation between vertices.
sd_linelocatepoint(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_linelocatepoint(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geography): Input geography |
geom_b |
(geography): Input geography |
(double)
SedonaDB SQL documentation for ST_LINELOCATEPOINT
Merges a collection of potentially connected line segments into the fewest possible LineStrings.
sd_linemerge(geom = sd_missing_arg())sd_linemerge(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_LINEMERGE
Returns a linestring being a substring of the input one starting and ending at the given fractions of total 2d length.
sd_linesubstring( geom = sd_missing_arg(), start_fraction = sd_missing_arg(), end_fraction = sd_missing_arg() )sd_linesubstring( geom = sd_missing_arg(), start_fraction = sd_missing_arg(), end_fraction = sd_missing_arg() )
geom |
(geometry): Input geometry |
start_fraction |
(double): The fraction from which the returned line will start (between 0 and 1) |
end_fraction |
(double): The fraction from which the returned line will end (between 0 and 1) |
(geometry)
SedonaDB SQL documentation for ST_LINESUBSTRING
Extracts the M (measure) coordinate from a Point geometry or geography. Returns NULL if the geometry has no M dimension or for non-point geometries.
sd_m(geom = sd_missing_arg())sd_m(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_M
Creates a LineString from two or more input Point, MultiPoint, or
LineString geometries. The function connects the input geometries in the
order they are provided to form a single continuous line.
sd_makeline(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_makeline(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_MAKELINE
Collapsed geometries are either converted to empty (keepCollapsed=false) or a valid geometry of lower dimension (keepCollapsed=true). Default is keepCollapsed=false.
sd_makevalid(geom = sd_missing_arg(), keepCollapsed = sd_missing_arg())sd_makevalid(geom = sd_missing_arg(), keepCollapsed = sd_missing_arg())
geom |
(geometry): Input geometry |
keepCollapsed |
(boolean): Input boolean |
(geometry)
SedonaDB SQL documentation for ST_MAKEVALID
For geography, returns the maximum distance in meters calculated using a spherical approximation.
sd_maxdistance(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_maxdistance(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geography): Input geography |
geom_b |
(geography): Input geography |
(double)
SedonaDB SQL documentation for ST_MAXDISTANCE
The minimum clearance is a metric that quantifies a geometry's tolerance to changes in coordinate precision or vertex positions. It represents the maximum distance by which vertices can be adjusted without introducing invalidity to the geometry's structure. A larger minimum clearance value indicates greater robustness against such perturbations. For a geometry with a minimum clearance of x, the following conditions hold: - No two distinct vertices are separated by a distance less than x. - No vertex lies within a distance x from any line segment it is not an endpoint of. For geometries with no definable minimum clearance, such as single Point geometries or MultiPoint geometries where all points occupy the same location, the function returns Double.MAX_VALUE.
sd_minimumclearance(geom = sd_missing_arg())sd_minimumclearance(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_MINIMUMCLEARANCE
This function returns a two-point LineString geometry representing the minimum clearance distance of the input geometry. If the input geometry does not have a defined minimum clearance, such as for single Points or coincident MultiPoints, an empty LineString geometry is returned instead.
sd_minimumclearanceline(geom = sd_missing_arg())sd_minimumclearanceline(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_MINIMUMCLEARANCELINE
Missing argument sentinel
sd_missing_arg()sd_missing_arg()
An object of class 'sd_missing_arg'
Returns the maximum M (measure) value from a geometry or geography's bounding box.
sd_mmax(geom = sd_missing_arg())sd_mmax(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_MMAX
Returns the minimum M-coordinate (measure) of a geometry or geography's bounding box.
sd_mmin(geom = sd_missing_arg())sd_mmin(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_MMIN
Returns the geometry or geography in its canonical form.
sd_normalize(geom = sd_missing_arg())sd_normalize(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_NORMALIZE
Returns the total number of coordinate points in the geometry, counting all vertices across all components.
sd_npoints(geom = sd_missing_arg())sd_npoints(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(integer)
SedonaDB SQL documentation for ST_NPOINTS
Returns the total number of rings (exterior and interior) in a polygon or multipolygon. For a simple polygon, this is 1 plus the number of holes. For a multipolygon, it is the sum of all rings in all polygons. Returns 0 for non-polygon geometry types.
sd_nrings(geom = sd_missing_arg())sd_nrings(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(integer)
SedonaDB SQL documentation for ST_NRINGS
Returns the number of Geometries. If geometry is a GEOMETRYCOLLECTION (or MULTI*) return the number of geometries, for single geometries will return 1.
sd_numgeometries(geom = sd_missing_arg())sd_numgeometries(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(integer)
SedonaDB SQL documentation for ST_NUMGEOMETRIES
Returns the number of interior rings (holes) in a polygon. For a polygon
without holes, returns 0. For multipolygons, returns the number of interior
rings in the first polygon. Returns NULL for non-polygon geometry types.
Alias: ST_NumInteriorRing.
sd_numinteriorrings(geom = sd_missing_arg())sd_numinteriorrings(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(integer)
SedonaDB SQL documentation for ST_NUMINTERIORRINGS
Returns the total number of coordinate points in a linestring geometry.
Returns NULL for other geometry types. Use ST_NPoints() to calculate the
number of vertices for all geometry types.
sd_numpoints(geom = sd_missing_arg())sd_numpoints(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(integer)
SedonaDB SQL documentation for ST_NUMPOINTS
Returns true if the two geometries share space and have the same dimension,
but are not completely contained by each other.
sd_overlaps(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_overlaps(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_OVERLAPS
This function calculates the perimeter of a given geometry or geography. It supports Polygon, MultiPolygon, and GeometryCollection geometries (as long as the GeometryCollection contains polygonal geometries). For other types, it returns 0. To measure lines, use ST_Length. For geography, returns the spherical approximation of the geodesic perimeter in meters.
sd_perimeter(geom = sd_missing_arg())sd_perimeter(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_PERIMETER
Constructs a Point geometry from X and Y coordinates. An optional SRID or CRS can be provided as a third argument.
sd_point(x = sd_missing_arg(), y = sd_missing_arg(), srid = sd_missing_arg())sd_point(x = sd_missing_arg(), y = sd_missing_arg(), srid = sd_missing_arg())
x |
(double): Input double |
y |
(double): Input double |
srid |
(crs): Input crs |
(geometry)
SedonaDB SQL documentation for ST_POINT
Constructs a Point with an M (measure) coordinate from X, Y, and M values.
sd_pointm(x = sd_missing_arg(), y = sd_missing_arg(), m = sd_missing_arg())sd_pointm(x = sd_missing_arg(), y = sd_missing_arg(), m = sd_missing_arg())
x |
(double): Input double |
y |
(double): Input double |
m |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_POINTM
Return the Nth point in a single linestring. Negative values are counted backwards from the end of the LineString such that -1 is the last point. Returns NULL if there is no linestring in the geometry.
sd_pointn(geom = sd_missing_arg(), n = sd_missing_arg())sd_pointn(geom = sd_missing_arg(), n = sd_missing_arg())
geom |
(geometry): Input geometry |
n |
(integer): Input integer |
(geometry)
SedonaDB SQL documentation for ST_POINTN
Unlike ST_Centroid which does not necessarily intersect a geometry or geography, ST_PointOnSurface makes an attempt to find an interior point close to the middle (using deterministic heuristics).
sd_pointonsurface(geom = sd_missing_arg())sd_pointonsurface(geom = sd_missing_arg())
geom |
(geography): Input geography |
(geography)
SedonaDB SQL documentation for ST_POINTONSURFACE
Returns a MultiPoint geometry consisting of all the coordinates of the input geometry. It preserves duplicate points as well as M and Z coordinates.
sd_points(geom = sd_missing_arg())sd_points(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_POINTS
Constructs a Point with a Z coordinate from X, Y, and Z values.
sd_pointz(x = sd_missing_arg(), y = sd_missing_arg(), z = sd_missing_arg())sd_pointz(x = sd_missing_arg(), y = sd_missing_arg(), z = sd_missing_arg())
x |
(double): Input double |
y |
(double): Input double |
z |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_POINTZ
Constructs a Point with X, Y, Z and M coordinates.
sd_pointzm( x = sd_missing_arg(), y = sd_missing_arg(), z = sd_missing_arg(), m = sd_missing_arg() )sd_pointzm( x = sd_missing_arg(), y = sd_missing_arg(), z = sd_missing_arg(), m = sd_missing_arg() )
x |
(double): Input double |
y |
(double): Input double |
z |
(double): Input double |
m |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_POINTZM
Builds a polygonal geometry from linear components in the input geometry. Handles GeometryCollection and multi-geometries by extracting linear components. Typically used with collections of complete, simple linework that forms polygon boundaries. Unlike many geometry constructors, this doesn't require explicit closure of rings—any closed rings in the input will become polygon boundaries.
sd_polygonize(geom = sd_missing_arg())sd_polygonize(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_POLYGONIZE
Creates polygons from a set of geometries that contain linework representing the edges of a polygon.
sd_polygonize_agg(geom = sd_missing_arg())sd_polygonize_agg(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_POLYGONIZE_AGG
Rebuilds a new geometry after specifying all vertices to the specified size. Z and M values are preserved but not affected by the grid snapping. The implementation is similar to a unary union and is designed to output valid geometry (e.g., by avoiding creating new crossing edges when snapping vertices).
sd_reduceprecision(geom = sd_missing_arg(), grid_size = sd_missing_arg())sd_reduceprecision(geom = sd_missing_arg(), grid_size = sd_missing_arg())
geom |
(geography): Input geography |
grid_size |
(double): Input double |
(geography)
SedonaDB SQL documentation for ST_REDUCEPRECISION
When called with two geometry arguments, returns the DE-9IM (Dimensionally
Extended 9-Intersection Model) intersection matrix as a 9-character string
describing the spatial relationship between two geometries. When called with
a third string argument, returns true if the two geometries satisfy the
given DE-9IM intersection matrix pattern, false otherwise. The pattern can
use wildcards (*) and T (any non-empty intersection) in addition to exact
dimension values (0, 1, 2, F).
sd_relate( geom_a = sd_missing_arg(), geom_b = sd_missing_arg(), intersectionMatrixPattern = sd_missing_arg() )sd_relate( geom_a = sd_missing_arg(), geom_b = sd_missing_arg(), intersectionMatrixPattern = sd_missing_arg() )
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
intersectionMatrixPattern |
(string): A 9-character DE-9IM pattern string. Each character can be 0-2, T, F, or * (wildcard). |
(string)
SedonaDB SQL documentation for ST_RELATE
Returns the geometry or geography with vertex order reversed.
sd_reverse(geom = sd_missing_arg())sd_reverse(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_REVERSE
Rotates a geometry counter-clockwise around the Z axis by an angle in radians.
sd_rotate(geom = sd_missing_arg(), rot = sd_missing_arg())sd_rotate(geom = sd_missing_arg(), rot = sd_missing_arg())
geom |
(geometry): Input geometry |
rot |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_ROTATE
Rotates a geometry around the X axis by an angle in radians.
sd_rotatex(geom = sd_missing_arg(), rot = sd_missing_arg())sd_rotatex(geom = sd_missing_arg(), rot = sd_missing_arg())
geom |
(geometry): Input geometry |
rot |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_ROTATEX
Rotates a geometry around the Y axis by an angle in radians.
sd_rotatey(geom = sd_missing_arg(), rot = sd_missing_arg())sd_rotatey(geom = sd_missing_arg(), rot = sd_missing_arg())
geom |
(geometry): Input geometry |
rot |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_ROTATEY
Scales a geometry by multiplying each coordinate by the corresponding scale
factor. A 3D variant accepts scaleZ.
sd_scale( geom = sd_missing_arg(), scaleX = sd_missing_arg(), scaleY = sd_missing_arg(), scaleZ = sd_missing_arg() )sd_scale( geom = sd_missing_arg(), scaleX = sd_missing_arg(), scaleY = sd_missing_arg(), scaleZ = sd_missing_arg() )
geom |
(geometry): Input geometry |
scaleX |
(double): Input double |
scaleY |
(double): Input double |
scaleZ |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_SCALE
Densifies a geometry or geography by adding intermediate points along line
segments that exceed the specified maximum segment length. For geometry, uses
planar distance; for geography, uses the spherical approximation of the
geodesic distance in meters and points are added along the great circle arc.
In both cases, points are added so that each resulting segment is no longer
than max_segment_length.
sd_segmentize(geom = sd_missing_arg(), max_segment_length = sd_missing_arg())sd_segmentize(geom = sd_missing_arg(), max_segment_length = sd_missing_arg())
geom |
(geometry): Input geometry |
max_segment_length |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_SEGMENTIZE
Sets a CRS to a geometry/geography. This is metadata-only - no coordinates are transformed. This is different from ST_Transform which actually transforms coordinates.
sd_setcrs(geom = sd_missing_arg(), target_crs = sd_missing_arg())sd_setcrs(geom = sd_missing_arg(), target_crs = sd_missing_arg())
geom |
(geometry): Input geometry |
target_crs |
(string): Input string |
(geometry)
SedonaDB SQL documentation for ST_SETCRS
Sets the SRID (spatial reference system identifier) of the geometry. This is metadata only - no coordinate transformation occurs. Use ST_Transform to actually reproject coordinates.
sd_setsrid(geom = sd_missing_arg(), srid = sd_missing_arg())sd_setsrid(geom = sd_missing_arg(), srid = sd_missing_arg())
geom |
(geometry): Input geometry |
srid |
(integer): Input integer |
(geometry)
SedonaDB SQL documentation for ST_SETSRID
Simplifies a geometry or geography using the Douglas-Peucker algorithm. The
tolerance parameter controls the degree of simplification: higher values
produce simpler geometries. For geography, the tolerance is specified in
meters and a different algorithm is used. This function may produce invalid
geometries; use ST_SimplifyPreserveTopology when validity must be
maintained.
sd_simplify(geom = sd_missing_arg(), tolerance = sd_missing_arg())sd_simplify(geom = sd_missing_arg(), tolerance = sd_missing_arg())
geom |
(geometry): Input geometry |
tolerance |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_SIMPLIFY
Simplifies a geometry, ensuring that the result is a valid geometry having the same dimension and number of components as the input, and with the components having the same topological relationship.
sd_simplifypreservetopology( geom = sd_missing_arg(), tolerance = sd_missing_arg() )sd_simplifypreservetopology( geom = sd_missing_arg(), tolerance = sd_missing_arg() )
geom |
(geometry): Input geometry |
tolerance |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_SIMPLIFYPRESERVETOPOLOGY
Snaps input geometry to reference geometry within tolerance. Result geometry aligns to the reference geometry where within tolerance distance.
sd_snap( geom_a = sd_missing_arg(), geom_b = sd_missing_arg(), tolerance = sd_missing_arg() )sd_snap( geom_a = sd_missing_arg(), geom_b = sd_missing_arg(), tolerance = sd_missing_arg() )
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
tolerance |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_SNAP
Returns the SRID (spatial reference identifier) of a geometry.
sd_srid(geom = sd_missing_arg())sd_srid(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(integer)
SedonaDB SQL documentation for ST_SRID
Returns the start point of a linestring geometry.
sd_startpoint(geom = sd_missing_arg())sd_startpoint(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_STARTPOINT
Returns the parts of geometries or geographies A and B that do not overlap.
sd_symdifference(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_symdifference(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_SYMDIFFERENCE
Converts a geometry to a geography while tessellating edges using spherical (geodesic) interpolation. The tolerance parameter specifies the maximum deviation in meters between the original edge and the tessellated approximation. This is useful when converting planar geometries to geographies where edges need to follow geodesic paths on the sphere.
sd_tessellategeog(geom = sd_missing_arg(), tolerance = sd_missing_arg())sd_tessellategeog(geom = sd_missing_arg(), tolerance = sd_missing_arg())
geom |
(geometry): Input geometry |
tolerance |
(double): Input double |
(geography)
SedonaDB SQL documentation for ST_TESSELLATEGEOG
Converts a geography to a geometry while tessellating edges using spherical (geodesic) interpolation. The tolerance parameter specifies the maximum deviation in meters between the original spherical edge and the tessellated planar approximation. This is useful when converting geographies to geometries while preserving the shape of geodesic edges as approximated line segments. When an edge crosses the antimeridian, the returned coordinates are "wrapped" such that the returned longitude is either greater than 180 or less than -180. This helps produce valid geometry in more cases (e.g., linestring or polygon crossing the antimeridian); however, it does not produce valid geometry in the case of a polygon ring that spans the full longitude range (e.g., Antarctica).
sd_tessellategeom(geom = sd_missing_arg(), tolerance = sd_missing_arg())sd_tessellategeom(geom = sd_missing_arg(), tolerance = sd_missing_arg())
geom |
(geography): Input geography |
tolerance |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_TESSELLATEGEOM
Converts a geometry to a geography by changing the edge interpretation from planar to spherical. This is a metadata-only operation that does not modify the underlying coordinate data. If the input is already a geography, it is returned unchanged.
sd_togeography(geom = sd_missing_arg())sd_togeography(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geography)
SedonaDB SQL documentation for ST_TOGEOGRAPHY
Converts a geography to a geometry by changing the edge interpretation from spherical to planar. This is a metadata-only operation that does not modify the underlying coordinate data. If the input is already a geometry, it is returned unchanged.
sd_togeometry(geom = sd_missing_arg())sd_togeometry(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_TOGEOMETRY
Returns true if the two geometries have at least one boundary point in
common but no interior points in common.
sd_touches(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_touches(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_TOUCHES
Transforms the coordinate reference system of a geometry between EPSG reference systems. If provided with 2 arguments, target_crs can be specified as an EPSG code (e.g., 'EPSG:4326') or as a PROJ string. When 3 arguments are provided, a source_crs can be used to specify the source CRS in case the input geometry doesn't have an SRID defined. The source_crs takes precedence over the geometry's SRID.
sd_transform(...)sd_transform(...)
... |
Supported combinations:
|
(geometry)
SedonaDB SQL documentation for ST_TRANSFORM
Translates (shifts) a geometry by the given deltaX and deltaY offsets. A 3D
variant accepts deltaZ.
sd_translate( geom = sd_missing_arg(), deltaX = sd_missing_arg(), deltaY = sd_missing_arg(), deltaZ = sd_missing_arg() )sd_translate( geom = sd_missing_arg(), deltaX = sd_missing_arg(), deltaY = sd_missing_arg(), deltaZ = sd_missing_arg() )
geom |
(geometry): Input geometry |
deltaX |
(double): Input double |
deltaY |
(double): Input double |
deltaZ |
(double): Input double |
(geometry)
SedonaDB SQL documentation for ST_TRANSLATE
Returns a single geometry which is the union of all components of the input geometry. Useful for computing the union of a set of geometries stored in a single geometry (e.g., a GEOMETRYCOLLECTION or MULTI* geometry).
sd_unaryunion(geom = sd_missing_arg())sd_unaryunion(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_UNARYUNION
Returns a geometry or geography that represents the point set union of two geometries or geographies.
sd_union(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_union(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_UNION
Returns a geometry that represents the point set union of all geometries.
sd_union_agg(geom = sd_missing_arg())sd_union_agg(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(geometry)
SedonaDB SQL documentation for ST_UNION_AGG
Returns true if geometry A is completely inside geometry B. This is the
inverse of ST_Contains: ST_Within(A, B) is equivalent to ST_Contains(B, A).
sd_within(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())sd_within(geom_a = sd_missing_arg(), geom_b = sd_missing_arg())
geom_a |
(geometry): Input geometry |
geom_b |
(geometry): Input geometry |
(boolean)
SedonaDB SQL documentation for ST_WITHIN
Returns NULL for non-point geometries or NULL input.
sd_x(geom = sd_missing_arg())sd_x(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_X
Returns the maximum X coordinate (longitude for geography) of a geometry or geography's bounding box.
sd_xmax(geom = sd_missing_arg())sd_xmax(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_XMAX
Returns the minimum X coordinate (longitude for geography) of a geometry or geography's bounding box.
sd_xmin(geom = sd_missing_arg())sd_xmin(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_XMIN
Returns NULL for non-point geometries or NULL input.
sd_y(geom = sd_missing_arg())sd_y(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_Y
For geography, the maximum latitude is computed considering spherical geometry (e.g., the maximum latitude of a linestring that crosses the North Pole is 90).
sd_ymax(geom = sd_missing_arg())sd_ymax(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_YMAX
For geography, the minimum latitude is computed considering spherical geometry (e.g., the minimum latitude of a linestring that crosses the South Pole is -90).
sd_ymin(geom = sd_missing_arg())sd_ymin(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_YMIN
Returns NULL if the geometry has no Z dimension or for non-point geometries.
sd_z(geom = sd_missing_arg())sd_z(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_Z
Returns the maximum Z coordinate of a geometry or geography's bounding box.
sd_zmax(geom = sd_missing_arg())sd_zmax(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_ZMAX
Returns a code indicating the coordinate dimension: - 0 = 2D (XY) - 1 = 3D with M coordinate (XYM) - 2 = 3D with Z coordinate (XYZ) - 3 = 4D (XYZM)
sd_zmflag(geom = sd_missing_arg())sd_zmflag(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(integer)
SedonaDB SQL documentation for ST_ZMFLAG
Returns the minimum Z coordinate of a geometry or geography's bounding box.
sd_zmin(geom = sd_missing_arg())sd_zmin(geom = sd_missing_arg())
geom |
(geometry): Input geometry |
(double)
SedonaDB SQL documentation for ST_ZMIN