# Geometry Statements

- [Geometry Constructors](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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)](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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](https://mariadb.com/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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/sql-statements/geometry-constructors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
