# Geometry Statements

- [Geometry Constructors](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors.md): Learn about geometry constructors in MariaDB Server. This section details SQL functions for creating spatial data types like points, lines, and polygons, enabling geospatial data management.
- [BUFFER](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/buffer.md): Returns a geometry representing all points within a given distance of the geometry value. This function calculates a buffer zone around the spatial object.
- [CONVEXHULL](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/convexhull.md): Returns a geometry representing the convex hull of the given geometry value. It computes the smallest convex polygon that contains the entire geometry.
- [GEOMETRYCOLLECTION](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/geometrycollection.md): Constructs a GeometryCollection value from a list of WKB arguments. This function creates a collection containing multiple geometry objects.
- [LINESTRING](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/linestring.md): Constructs a LineString value from a number of Point values. It creates a linear geometry connecting the specified coordinate points.
- [MULTILINESTRING](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/multilinestring.md): Constructs a MultiLineString value from a list of WKB LineString arguments. This function creates a collection of multiple line strings.
- [MULTIPOINT](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/multipoint.md): Constructs a MultiPoint value from a list of WKB Point arguments. It creates a geometry collection consisting of multiple individual points.
- [MULTIPOLYGON](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/multipolygon.md): Constructs a MultiPolygon value from a list of WKB Polygon arguments. This function creates a geometry collection containing multiple polygons.
- [POINT](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/point.md): Constructs a Point value using its coordinates. This basic constructor creates a point geometry from given X and Y (and optionally Z/M) values.
- [PointOnSurface](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/pointonsurface.md): Returns a Point which is guaranteed to lie on the surface of the given geometry. This is useful for labeling or finding a representative point inside a polygon.
- [POLYGON](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/polygon.md): Constructs a Polygon value from a list of WKB LineString arguments. It defines a filled shape using an outer ring and optional inner rings (holes).
- [ST\_BUFFER](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/st_buffer.md): Returns a geometry representing all points within a given distance of the geometry. This standard-compliant function creates a buffer zone around the object.
- [ST\_CONVEXHULL](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/st_convexhull.md): Returns a geometry representing the convex hull of the given geometry. This standard function computes the smallest convex polygon enclosing the geometry.
- [ST\_INTERSECTION](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/st_intersection.md): Returns a geometry representing the point set intersection of two geometries. It outputs the spatial region shared by both input objects.
- [ST\_POINTONSURFACE](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/st_pointonsurface.md): Returns a Point guaranteed to lie on the surface of the given geometry. This standard function finds a representative point strictly within the geometry's area.
- [ST\_SYMDIFFERENCE](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/st_symdifference.md): Returns a geometry representing the point set symmetric difference of two geometries. It outputs the spatial area present in either geometry but not in both.
- [ST\_UNION](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/st_union.md): Returns a geometry representing the point set union of two geometries. This function merges multiple spatial objects into a single geometry.
- [ST\_AsGeoJSON](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/geojson-st_asgeojson.md): Generates a GeoJSON object from a given geometry. This function converts internal geometry data into the standard JSON-based format for web mapping.
- [ST\_GeomFromGeoJSON](/docs/server/reference/sql-statements/geometry-constructors/geometry-constructors/st_geomfromgeojson.md): Parses a GeoJSON string and returns a geometry. This function converts a standard GeoJSON representation into a MariaDB geometry value.
- [Geometry Properties](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties.md): Learn about geometry properties. This section details SQL functions for retrieving attributes of spatial objects, such as area, length, and bounding box, essential for geospatial analysis.
- [BOUNDARY](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/geometry-properties-boundary.md): Synonym for ST\_BOUNDARY. Returns a geometry representing the closure of the combinatorial boundary of the geometry value.
- [DIMENSION](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/dimension.md): Synonym for ST\_DIMENSION. Returns the inherent dimension of a geometry object (0 for Point, 1 for LineString, 2 for Polygon).
- [ENVELOPE](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/geometry-properties-envelope.md): Synonym for ST\_ENVELOPE. Returns the Minimum Bounding Rectangle (MBR) for the given geometry as a Polygon.
- [GeometryN](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/geometry-properties-geometryn.md): Synonym for ST\_GEOMETRYN. Returns the N-th geometry from a GeometryCollection, numbered starting from 1.
- [GeometryType](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/geometry-properties-geometrytype.md): Synonym for ST\_GEOMETRYTYPE. Returns the name of the geometry type (e.g., 'POINT') of the geometry instance.
- [IsClosed](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/isclosed.md): Synonym for ST\_ISCLOSED. Checks if a LineString's start and end points are the same (closed).
- [IsEmpty](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/geometry-properties-isempty.md): Synonym for ST\_ISEMPTY. Checks if a geometry is empty (contains no point sets). Returns 1 if empty, 0 otherwise.
- [IsRing](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/isring.md): Synonym for ST\_ISRING. Checks if a LineString is a ring, meaning it is both closed and simple.
- [IsSimple](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/geometry-properties-issimple.md): Synonym for ST\_ISSIMPLE. Checks if a geometry is simple, meaning it has no anomalous geometric points like self-intersections.
- [NumGeometries](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/geometry-properties-numgeometries.md): Synonym for ST\_NUMGEOMETRIES. Returns the number of geometries contained in a GeometryCollection.
- [SRID](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/geometry-properties-srid.md): Synonym for ST\_SRID. Returns the Spatial Reference Identifier (SRID) integer associated with the geometry.
- [ST\_BOUNDARY](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/st_boundary.md): Returns the combinatorial boundary of a geometry. For a Polygon, this is the line string defining the boundary.
- [ST\_DIMENSION](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/st_dimension.md): Returns the inherent dimension of the geometry value. Returns 0 for points, 1 for linear geometries, and 2 for surface geometries.
- [ST\_ENVELOPE](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/st_envelope.md): Returns the Minimum Bounding Rectangle (MBR) for the geometry value. The result is returned as a Polygon defined by the corner points.
- [ST\_GEOMETRYN](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/st_geometryn.md): Returns the N-th geometry in a GeometryCollection. Geometries are numbered beginning with 1.
- [ST\_GEOMETRYTYPE](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/st_geometrytype.md): Returns the name of the geometry type (e.g., 'POINT', 'LINESTRING', 'POLYGON') for the given geometry instance.
- [ST\_ISCLOSED](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/st_isclosed.md): Returns 1 if the LineString is closed (start and end points are the same), 0 if not, and NULL if the argument is NULL.
- [ST\_ISEMPTY](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/st_isempty.md): Checks if a geometry is empty. Returns 1 if the geometry contains no points, and 0 otherwise.
- [ST\_IsRing](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/st_isring.md): Checks if the LineString is a ring. Returns 1 if the LineString is both closed (start equals end) and simple (no self-intersection).
- [ST\_IsSimple](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/st_issimple.md): Checks if the geometry is simple (no self-intersections or anomalous points). Returns 1 if simple, 0 otherwise.
- [ST\_NUMGEOMETRIES](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/st_numgeometries.md): Returns the number of geometries in a GeometryCollection. Returns NULL if the argument is not a GeometryCollection.
- [ST\_RELATE](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/st_relate.md): Tests if two geometries are spatially related according to a given DE-9IM intersection matrix pattern.
- [ST\_SRID](/docs/server/reference/sql-statements/geometry-constructors/geometry-properties/st_srid.md): Returns the Spatial Reference Identifier (SRID) for the geometry. This integer represents the coordinate system used.
- [Geometry Relations](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations.md): Learn about geometry relations in MariaDB Server. This section details SQL functions for determining spatial relationships between geometric objects, such as ST\_Intersects and ST\_Contains.
- [CONTAINS](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/contains.md): Synonym for ST\_CONTAINS. Checks if the first geometry completely contains the second geometry, with no points of the second geometry outside the first.
- [CROSSES](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/crosses.md): Synonym for ST\_CROSSES. Checks if two geometries cross, meaning they share some interior points but not all, and the intersection has a lower dimension.
- [DISJOINT](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/disjoint.md): Synonym for ST\_DISJOINT. Checks if two geometries are disjoint, meaning they have no points in common.
- [EQUALS](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/equals.md): Synonym for ST\_EQUALS. Checks if two geometries are spatially equal, meaning they contain exactly the same point set.
- [INTERSECTS](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/intersects.md): Synonym for ST\_INTERSECTS. Checks if two geometries intersect, meaning they share at least one common point.
- [OVERLAPS](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/overlaps.md): Synonym for ST\_OVERLAPS. Checks if two geometries overlap, sharing some but not all points, and having the same dimension.
- [ST\_CONTAINS](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/st-contains.md): Checks if geometry A contains geometry B. Returns 1 if B is completely inside A, 0 otherwise.
- [ST\_CROSSES](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/st-crosses.md): Checks if two geometries cross. Returns 1 if they intersect but one does not cover the other, and the intersection dimension is less than the maximum dimension.
- [ST\_DIFFERENCE](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/st_difference.md): Returns a geometry representing the difference between two geometries. The result contains points from the first geometry that are not in the second.
- [ST\_DISJOINT](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/st_disjoint.md): Checks if two geometries are disjoint. Returns 1 if the geometries share no points, 0 otherwise.
- [ST\_DISTANCE](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/st_distance.md): Calculates the shortest distance between two geometries. Returns the minimum Euclidean distance between any two points in the geometries.
- [ST\_DISTANCE\_SPHERE](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/st_distance_sphere.md): Calculates the spherical distance between two points or geometries. Uses a spherical earth model to determine the minimum distance in meters.
- [ST\_EQUALS](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/st-equals.md): Returns a geometry representing the difference between two geometries. The result contains points from the first geometry that are not in the second.
- [ST\_INTERSECTS](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/st-intersects.md): Checks if two geometries intersect. Returns 1 if the geometries share any portion of space (interior or boundary), 0 otherwise.
- [ST\_LENGTH](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/st_length.md): Returns the length of a linear geometry. Calculates the total length of a LineString or MultiLineString in its associated spatial reference units.
- [ST\_OVERLAPS](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/st-overlaps.md): Checks if two geometries overlap. Returns 1 if they share space but neither completely contains the other, and they have the same dimension.
- [ST\_TOUCHES](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/st-touches.md): Checks if two geometries touch. Returns 1 if they intersect only at their boundaries and not their interiors.
- [ST\_WITHIN](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/st-within.md): Checks if geometry A is within geometry B. Returns 1 if A is completely inside B, 0 otherwise. This is the inverse of ST\_CONTAINS.
- [TOUCHES](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/touches.md): Synonym for ST\_TOUCHES. Checks if two geometries touch at their boundaries without their interiors intersecting.
- [WITHIN](/docs/server/reference/sql-statements/geometry-constructors/geometry-relations/within.md): Synonym for ST\_WITHIN. Checks if the first geometry is completely enclosed by the second geometry.
- [LineString Properties](/docs/server/reference/sql-statements/geometry-constructors/linestring-properties.md): Learn about LINESTRING properties in MariaDB Server. This section details SQL functions for retrieving attributes of linear spatial objects, such as length, number of points, and start/end points.
- [ENDPOINT](/docs/server/reference/sql-statements/geometry-constructors/linestring-properties/linestring-properties-endpoint.md): Synonym for ST\_ENDPOINT. Returns the last point of a LineString geometry.
- [GLENGTH](/docs/server/reference/sql-statements/geometry-constructors/linestring-properties/glength.md): Synonym for ST\_LENGTH. Calculates the length of a LineString or MultiLineString in its associated spatial reference units.
- [NumPoints](/docs/server/reference/sql-statements/geometry-constructors/linestring-properties/linestring-properties-numpoints.md): Synonym for ST\_NUMPOINTS. Returns the number of points in a LineString geometry.
- [PointN](/docs/server/reference/sql-statements/geometry-constructors/linestring-properties/linestring-properties-pointn.md): Synonym for ST\_POINTN. Returns the N-th point in a LineString geometry, where N is a 1-based index.
- [STARTPOINT](/docs/server/reference/sql-statements/geometry-constructors/linestring-properties/linestring-properties-startpoint.md): Synonym for ST\_STARTPOINT. Returns the first point of a LineString geometry.
- [ST\_ENDPOINT](/docs/server/reference/sql-statements/geometry-constructors/linestring-properties/st_endpoint.md): Returns the end Point of a LineString. This function retrieves the final coordinate in the linear geometry sequence.
- [ST\_NUMPOINTS](/docs/server/reference/sql-statements/geometry-constructors/linestring-properties/st_numpoints.md): Returns the count of Points in a LineString. This function calculates the total number of vertices defining the line.
- [ST\_POINTN](/docs/server/reference/sql-statements/geometry-constructors/linestring-properties/st_pointn.md): Returns the N-th Point in a LineString. This function retrieves a specific point from the sequence based on its 1-based index.
- [ST\_STARTPOINT](/docs/server/reference/sql-statements/geometry-constructors/linestring-properties/st_startpoint.md): Returns the start Point of a LineString. This function retrieves the initial coordinate in the linear geometry sequence.
- [MBR (Minimum Bounding Rectangle)](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle.md): Learn about Minimum Bounding Rectangles (MBR) in MariaDB Server. This section details how to calculate and use MBRs for spatial indexing and efficient querying of geometric data.
- [MBR Definition](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbr-definition.md): Understand Minimum Bounding Rectangles. An MBR is the smallest rectangle that completely encloses a geometry, defined by its minimum and maximum X and Y coordinates.
- [MBRContains](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrcontains.md): Check if one MBR contains another. Returns 1 if the Minimum Bounding Rectangle of the first geometry completely encloses the MBR of the second geometry.
- [MBRCoveredBy](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrcoveredby.md): Check if one MBR is covered by another. Returns 1 if the MBR of the first geometry is entirely contained within the MBR of the second geometry.
- [MBRDisjoint](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrdisjoint.md): Check if two MBRs are disjoint. Returns 1 if the Minimum Bounding Rectangles of the two geometries do not intersect or touch at all.
- [MBREqual](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrequal.md): Check if two MBRs are identical. Returns 1 if the Minimum Bounding Rectangles of both geometries share the exact same coordinates.
- [MBRIntersects](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrintersects.md): Check if two MBRs intersect. Returns 1 if the Minimum Bounding Rectangles of the geometries share any portion of space, including boundaries.
- [MBROverlaps](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbroverlaps.md): Check if two MBRs overlap. Returns 1 if the MBRs intersect but neither completely contains the other, and they have the same dimension.
- [MBRTouches](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrtouches.md): Check if two MBRs touch. Returns 1 if the MBRs intersect only at their boundaries and do not share any interior points.
- [MBRWithin](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrwithin.md): Check if one MBR is within another. Returns 1 if the MBR of the first geometry is completely enclosed by the MBR of the second geometry.
- [Miscellaneous GIS functions](/docs/server/reference/sql-statements/geometry-constructors/miscellaneous-gis-functions.md): Explore miscellaneous GIS functions in MariaDB Server. This section details various SQL functions that support geographic information system operations and spatial data analysis.
- [ST\_Collect](/docs/server/reference/sql-statements/geometry-constructors/miscellaneous-gis-functions/st_collect.md): Aggregate multiple geometries into a collection. This function creates a MultiPoint, MultiLineString, MultiPolygon, or GeometryCollection from a set of geometry arguments.
- [ST\_GeoHash](/docs/server/reference/sql-statements/geometry-constructors/miscellaneous-gis-functions/st_geohash.md): Generate a Geohash string from a point or coordinates. This function encodes spatial locations into short, alphanumeric strings for efficient indexing and proximity searches.
- [ST\_IsValid](/docs/server/reference/sql-statements/geometry-constructors/miscellaneous-gis-functions/st_isvalid.md): Check if a geometry is valid. This function returns 1 if the geometry complies with OGC specifications (e.g., no self-intersections), 0 otherwise.
- [ST\_LatFromGeoHash](/docs/server/reference/sql-statements/geometry-constructors/miscellaneous-gis-functions/st_latfromgeohash.md): Decode a Geohash to retrieve the latitude. This function returns the latitude coordinate (Y-axis) from a given Geohash string.
- [ST\_LongFromGeoHash](/docs/server/reference/sql-statements/geometry-constructors/miscellaneous-gis-functions/st_longfromgeohash.md): Decode a Geohash to retrieve the longitude. This function returns the longitude coordinate (X-axis) from a given Geohash string.
- [ST\_PointFromGeoHash](/docs/server/reference/sql-statements/geometry-constructors/miscellaneous-gis-functions/st_pointfromgeohash.md): Create a Point geometry from a Geohash. This function decodes a Geohash string into a Point object representing the location's center.
- [ST\_Simplify](/docs/server/reference/sql-statements/geometry-constructors/miscellaneous-gis-functions/st_simplify.md): Simplify a geometry using the Douglas-Peucker algorithm. This function reduces the number of vertices in a geometry while preserving its general shape, useful for rendering maps.
- [ST\_Validate](/docs/server/reference/sql-statements/geometry-constructors/miscellaneous-gis-functions/st_validate.md): Validate and optionally return a geometry. This function checks if a geometry is valid according to OGC rules; it returns the geometry if valid, or NULL if not.
- [Point Properties](/docs/server/reference/sql-statements/geometry-constructors/point-properties.md): Learn about POINT properties in MariaDB Server. This section details SQL functions for retrieving attributes of point spatial objects, such as their X and Y coordinates.
- [X](/docs/server/reference/sql-statements/geometry-constructors/point-properties/point-properties-x.md): Synonym for ST\_X. Returns the X-coordinate value of a Point geometry as a double-precision number.
- [Y](/docs/server/reference/sql-statements/geometry-constructors/point-properties/point-properties-y.md): Synonym for ST\_Y. Returns the Y-coordinate value of a Point geometry as a double-precision number.
- [ST\_X](/docs/server/reference/sql-statements/geometry-constructors/point-properties/st_x.md): Returns the X-coordinate of a Point geometry. This function extracts the horizontal coordinate value as a double-precision number.
- [ST\_Y](/docs/server/reference/sql-statements/geometry-constructors/point-properties/st_y.md): Returns the Y-coordinate of a Point geometry. This function extracts the vertical coordinate value as a double-precision number.
- [Polygon Properties](/docs/server/reference/sql-statements/geometry-constructors/polygon-properties.md): Learn about POLYGON properties in MariaDB Server. This section details SQL functions for retrieving attributes of polygonal spatial objects, such as area, perimeter, and the number of rings.
- [CENTROID](/docs/server/reference/sql-statements/geometry-constructors/polygon-properties/centroid.md): Synonym for ST\_CENTROID. Returns the mathematical centroid of the Polygon or MultiPolygon as a Point geometry.
- [AREA](/docs/server/reference/sql-statements/geometry-constructors/polygon-properties/polygon-properties-area.md): Synonym for ST\_AREA. Returns the double-precision area of the Polygon or MultiPolygon, calculated in its spatial reference system.
- [ExteriorRing](/docs/server/reference/sql-statements/geometry-constructors/polygon-properties/polygon-properties-exteriorring.md): Synonym for ST\_ExteriorRing. Returns the exterior ring of a Polygon as a LineString.
- [InteriorRingN](/docs/server/reference/sql-statements/geometry-constructors/polygon-properties/polygon-properties-interiorringn.md): Synonym for ST\_InteriorRingN. Returns the N-th interior ring of a Polygon as a LineString.
- [NumInteriorRings](/docs/server/reference/sql-statements/geometry-constructors/polygon-properties/polygon-properties-numinteriorrings.md): Synonym for ST\_NumInteriorRings. Returns the number of interior rings in a Polygon geometry.
- [ST\_AREA](/docs/server/reference/sql-statements/geometry-constructors/polygon-properties/st_area.md): Returns the area of a Polygon or MultiPolygon. The result is a double-precision number measured in the geometry's spatial reference units.
- [ST\_CENTROID](/docs/server/reference/sql-statements/geometry-constructors/polygon-properties/st_centroid.md): Returns the centroid of a Polygon or MultiPolygon. The result is a Point geometry representing the mathematical center of mass.
- [ST\_ExteriorRing](/docs/server/reference/sql-statements/geometry-constructors/polygon-properties/st_exteriorring.md): Returns the exterior ring of a Polygon. This function extracts the outer boundary of the polygon as a LineString geometry.
- [ST\_InteriorRingN](/docs/server/reference/sql-statements/geometry-constructors/polygon-properties/st_interiorringn.md): Returns the N-th interior ring of a Polygon. This function retrieves a specific inner hole of the polygon as a LineString.
- [ST\_NumInteriorRings](/docs/server/reference/sql-statements/geometry-constructors/polygon-properties/st_numinteriorrings.md): Returns the count of interior rings in a Polygon. This function calculates the total number of inner holes within the polygon.
- [WKB](/docs/server/reference/sql-statements/geometry-constructors/wkb.md): Learn about Well-Known Binary (WKB) in MariaDB Server. This section details how to represent and store geometric data in a binary format, essential for efficient spatial data exchange and storage.
- [AsBinary](/docs/server/reference/sql-statements/geometry-constructors/wkb/wkb-asbinary.md): Synonym for ST\_AsBinary. Converts a geometry value from its internal format to its Well-Known Binary (WKB) representation.
- [AsWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/aswkb.md): Synonym for ST\_AsBinary. Converts a geometry value from its internal format to its Well-Known Binary (WKB) representation.
- [GeomCollFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/wkb-geomcollfromwkb.md): Synonym for ST\_GeomCollFromWKB. Constructs a GeometryCollection value from its WKB representation and an optional SRID.
- [GeometryCollectionFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/geometrycollectionfromwkb.md): Synonym for ST\_GeomCollFromWKB. Constructs a GeometryCollection value from its WKB representation and an optional SRID.
- [GeometryFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/geometryfromwkb.md): Synonym for ST\_GeomFromWKB. Constructs a geometry value of any type from its WKB representation and an optional SRID.
- [GeomFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/wkb-geomfromwkb.md): Synonym for ST\_GeomFromWKB. Constructs a geometry value of any type from its WKB representation and an optional SRID.
- [LineFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/wkb-linefromwkb.md): Synonym for ST\_LineFromWKB. Constructs a LineString value from its WKB representation and an optional SRID.
- [LineStringFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/linestringfromwkb.md): Synonym for ST\_LineFromWKB. Constructs a LineString value from its WKB representation and an optional SRID.
- [MLineFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/mlinefromwkb.md): Synonym for ST\_MultiLineStringFromWKB. Constructs a MultiLineString value from its WKB representation and an optional SRID.
- [MPointFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/mpointfromwkb.md): Synonym for ST\_MultiPointFromWKB. Constructs a MultiPoint value from its WKB representation and an optional SRID.
- [MPolyFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/mpolyfromwkb.md): Synonym for ST\_MultiPolygonFromWKB. Constructs a MultiPolygon value from its WKB representation and an optional SRID.
- [MultiLineStringFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/multilinestringfromwkb.md): Synonym for ST\_MultiLineStringFromWKB. Constructs a MultiLineString value from its WKB representation and an optional SRID.
- [MultiPointFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/multipointfromwkb.md): Synonym for ST\_MultiPointFromWKB. Constructs a MultiPoint value from its WKB representation and an optional SRID.
- [MultiPolygonFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/multipolygonfromwkb.md): Synonym for ST\_MultiPolygonFromWKB. Constructs a MultiPolygon value from its WKB representation and an optional SRID.
- [PointFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/wkb-pointfromwkb.md): Synonym for ST\_PointFromWKB. Constructs a Point value from its WKB representation and an optional SRID.
- [PolyFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/wkb-polyfromwkb.md): Synonym for ST\_PolyFromWKB. Constructs a Polygon value from its WKB representation and an optional SRID.
- [PolygonFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/polygonfromwkb.md): Synonym for ST\_PolyFromWKB. Constructs a Polygon value from its WKB representation and an optional SRID.
- [ST\_AsBinary](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_asbinary.md): Converts a value in internal geometry format to its WKB representation and returns the binary result.
- [ST\_AsWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_aswkb.md): Synonym for ST\_AsBinary. Converts a geometry value from its internal format to its Well-Known Binary (WKB) representation.
- [ST\_GeomCollFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_geomcollfromwkb.md): Constructs a GeometryCollection value from its WKB representation and an optional SRID.
- [ST\_GeometryCollectionFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_geometrycollectionfromwkb.md): Synonym for ST\_GeomCollFromWKB. Constructs a GeometryCollection value from its WKB representation and an optional SRID.
- [ST\_GeometryFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_geometryfromwkb.md): Synonym for ST\_GeomFromWKB. Constructs a geometry value of any type from its WKB representation and an optional SRID.
- [ST\_GeomFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_geomfromwkb.md): Constructs a geometry value of any type using its WKB representation and an optional SRID.
- [ST\_LineFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_linefromwkb.md): Constructs a LineString value using its WKB representation and an optional SRID.
- [ST\_LineStringFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_linestringfromwkb.md): Synonym for ST\_LineFromWKB. Constructs a LineString value from its WKB representation and an optional SRID.
- [ST\_MPointFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_mpointfromwkb.md): Synonym for ST\_MultiPointFromWKB. Constructs a MultiPoint value from its WKB representation and an optional SRID.
- [ST\_MPolyFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_mpolyfromwkb.md): Synonym for ST\_MultiPolygonFromWKB. Constructs a MultiPolygon value from its WKB representation and an optional SRID.
- [ST\_MultiPointFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_multipointfromwkb.md): Constructs a MultiLineString value using its WKB representation and an optional SRID.
- [ST\_MultiPolygonFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_multipolygonfromwkb.md): Constructs a MultiPolygon value using its WKB representation and an optional SRID.
- [ST\_PointFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_pointfromwkb.md): Constructs a Point value using its WKB representation and an optional SRID.
- [ST\_PolyFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_polyfromwkb.md): Constructs a Polygon value using its WKB representation and an optional SRID.
- [ST\_PolygonFromWKB](/docs/server/reference/sql-statements/geometry-constructors/wkb/st_polygonfromwkb.md): Synonym for ST\_PolyFromWKB. Constructs a Polygon value from its WKB representation and an optional SRID.
- [Well-Known Binary (WKB) Format](/docs/server/reference/sql-statements/geometry-constructors/wkb/well-known-binary-wkb-format.md): Understand the standard binary format for geometry. This overview explains how WKB represents spatial data types for storage and exchange.
- [WKT](/docs/server/reference/sql-statements/geometry-constructors/wkt.md): Learn about Well-Known Text (WKT) in MariaDB Server. This section details how to represent and store geometric data in a text format, essential for human-readable spatial data exchange.
- [WKT Definition](/docs/server/reference/sql-statements/geometry-constructors/wkt/wkt-definition.md): Understand the Well-Known Text (WKT) format. This section describes the standard ASCII representation for exchanging geometric data.
- [AsText](/docs/server/reference/sql-statements/geometry-constructors/wkt/wkt-astext.md): Synonym for ST\_AsText. Converts a geometry value from its internal format to its Well-Known Text (WKT) representation.
- [AsWKT](/docs/server/reference/sql-statements/geometry-constructors/wkt/wkt-aswkt.md): Synonym for ST\_AsText. Converts a geometry value from its internal format to its Well-Known Text (WKT) representation.
- [GeomCollFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/wkt-geomcollfromtext.md): Synonym for ST\_GeomCollFromText. Constructs a GeometryCollection value from its WKT representation and an optional SRID.
- [GeometryCollectionFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/geometrycollectionfromtext.md): Synonym for ST\_GeomCollFromText. Constructs a GeometryCollection value from its WKT representation and an optional SRID.
- [GeometryFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/geometryfromtext.md): Synonym for ST\_GeomFromText. Constructs a geometry value of any type from its WKT representation and an optional SRID.
- [GeomFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/wkt-geomfromtext.md): Synonym for ST\_GeomFromText. Constructs a geometry value of any type from its WKT representation and an optional SRID.
- [LineFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/wkt-linefromtext.md): Synonym for ST\_LineFromText. Constructs a LineString value from its WKT representation and an optional SRID.
- [LineStringFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/linestringfromtext.md): Synonym for ST\_LineFromText. Constructs a LineString value from its WKT representation and an optional SRID.
- [MLineFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/mlinefromtext.md): Synonym for ST\_MultiLineStringFromText. Constructs a MultiLineString value from its WKT representation and an optional SRID.
- [MPointFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/mpointfromtext.md): Synonym for ST\_MultiPointFromText. Constructs a MultiPoint value from its WKT representation and an optional SRID.
- [MPolyFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/mpolyfromtext.md): Synonym for ST\_MultiPolygonFromText. Constructs a MultiPolygon value from its WKT representation and an optional SRID.
- [MultiLineStringFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/multilinestringfromtext.md): Synonym for ST\_MultiLineStringFromText. Constructs a MultiLineString value from its WKT representation and an optional SRID.
- [MultiPointFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/multipointfromtext.md): Synonym for ST\_MultiPointFromText. Constructs a MultiPoint value from its WKT representation and an optional SRID.
- [MultiPolygonFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/multipolygonfromtext.md): Synonym for ST\_MultiPolygonFromText. Constructs a MultiPolygon value from its WKT representation and an optional SRID.
- [PointFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/wkt-pointfromtext.md): Synonym for ST\_PointFromText. Constructs a Point value from its WKT representation and an optional SRID.
- [PolyFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/wkt-polyfromtext.md): Synonym for ST\_PolyFromText. Constructs a Polygon value from its WKT representation and an optional SRID.
- [PolygonFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/polygonfromtext.md): Synonym for ST\_PolyFromText. Constructs a Polygon value from its WKT representation and an optional SRID.
- [ST\_AsText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_astext.md): Converts a value in internal geometry format to its WKT representation and returns the string result.
- [ST\_ASWKT](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_aswkt.md): Synonym for ST\_AsText. Converts a geometry value from its internal format to its Well-Known Text (WKT) representation.
- [ST\_GeomCollFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_geomcollfromtext.md): Constructs a GeometryCollection value from its WKB representation and an optional SRID.
- [ST\_GeometryCollectionFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_geometrycollectionfromtext.md): Synonym for ST\_GeomCollFromText. Constructs a GeometryCollection value from its WKT representation and an optional SRID.
- [ST\_GeometryFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_geometryfromtext.md): Synonym for ST\_GeomFromText. Constructs a geometry value of any type from its WKT representation and an optional SRID.
- [ST\_GeomFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_geomfromtext.md): Constructs a geometry value of any type using its WKT representation and an optional SRID.
- [ST\_LineFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_linefromtext.md): Constructs a LineString value using its WKT representation and an optional SRID.
- [ST\_LineStringFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_linestringfromtext.md): Synonym for ST\_LineFromText. Constructs a LineString value from its WKT representation and an optional SRID.
- [ST\_MPointFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_mpointfromtext.md): Synonym for ST\_MultiLineStringFromText. Constructs a MultiLineString value from its WKT representation and an optional SRID.
- [ST\_MPolyFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_mpolyfromtext.md): Synonym for ST\_MultiPointFromText. Constructs a MultiPoint value from its WKT representation and an optional SRID.
- [ST\_MultiLineStringFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_multilinestringfromtext.md): Constructs a MultiLineString value using its WKT representation and an optional SRID.
- [ST\_MultiPointFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_multipointfromtext.md): Constructs a MultiPoint value using its WKT representation and an optional SRID.
- [ST\_MultiPolygonFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_multipolygonfromtext.md): Constructs a MultiPolygon value using its WKT representation and an optional SRID.
- [ST\_PointFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_pointfromtext.md): Constructs a Point value using its WKT representation and an optional SRID.
- [ST\_PolyFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_polyfromtext.md): Constructs a Polygon value using its WKT representation and an optional SRID.
- [ST\_PolygonFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/st_polygonfromtext.md): Synonym for ST\_PolyFromText. Constructs a Polygon value from its WKT representation and an optional SRID.
- [ST\_MLineFromText](/docs/server/reference/sql-statements/geometry-constructors/wkt/wkt-st_mlinefromtext.md): Synonym for ST\_MultiLineStringFromText. Constructs a MultiLineString value from its WKT representation and an optional SRID.
