Chapter 12. PostGIS Special Functions Index

Table of Contents
12.1. PostGIS Aggregate Functions
12.2. PostGIS Window Functions
12.3. PostGIS SQL-MM Compliant Functions
12.4. PostGIS Geography Support Functions
12.5. PostGIS Raster Support Functions
12.6. PostGIS Geometry / Geography / Raster Dump Functions
12.7. PostGIS Box Functions
12.8. PostGIS Functions that support 3D
12.9. PostGIS Curved Geometry Support Functions
12.10. PostGIS Polyhedral Surface Support Functions
12.11. PostGIS Function Support Matrix
12.12. New, Enhanced or changed PostGIS Functions
12.12.1. PostGIS Functions new or enhanced in 3.4
12.12.2. PostGIS Functions new or enhanced in 3.3
12.12.3. PostGIS Functions new or enhanced in 3.2
12.12.4. PostGIS Functions new or enhanced in 3.1
12.12.5. PostGIS Functions new or enhanced in 3.0
12.12.6. PostGIS Functions new or enhanced in 2.5
12.12.7. PostGIS Functions new or enhanced in 2.4
12.12.8. PostGIS Functions new or enhanced in 2.3
12.12.9. PostGIS Functions new or enhanced in 2.2
12.12.10. PostGIS Functions new or enhanced in 2.1
12.12.11. PostGIS Functions new or enhanced in 2.0
12.12.12. PostGIS Functions new or enhanced in 1.5
12.12.13. PostGIS Functions new or enhanced in 1.4
12.12.14. PostGIS Functions new or enhanced in 1.3

12.1. PostGIS Aggregate Functions

The functions below are spatial aggregate functions that are used in the same way as SQL aggregate function such as sum and average.

  • ST_3DExtent - Aggregate function that returns the 3D bounding box of geometries.
  • ST_3DUnion - Perform 3D union.
  • ST_AsFlatGeobuf - Return a FlatGeobuf representation of a set of rows.
  • ST_AsGeobuf - Return a Geobuf representation of a set of rows.
  • ST_AsMVT - Aggregate function returning a MVT representation of a set of rows.
  • ST_ClusterIntersecting - Aggregate function that clusters input geometries into connected sets.
  • ST_ClusterWithin - Aggregate function that clusters geometries by separation distance.
  • ST_Collect - Creates a GeometryCollection or Multi* geometry from a set of geometries.
  • ST_CoverageUnion - Computes the union of a set of polygons forming a coverage by removing shared edges.
  • ST_Extent - Aggregate function that returns the bounding box of geometries.
  • ST_MakeLine - Crea una cadena de línea desde geometrías de punto, multipunto o de línea.
  • ST_MemUnion - Aggregate function which unions geometries in a memory-efficent but slower way
  • ST_Polygonize - Computes a collection of polygons formed from the linework of a set of geometries.
  • ST_SameAlignment - Returns true if rasters have same skew, scale, spatial ref, and offset (pixels can be put on same grid without cutting into pixels) and false if they don't with notice detailing issue.
  • ST_Union - Computes a geometry representing the point-set union of the input geometries.
  • TopoElementArray_Agg - Devuelve un topoelementarray para un conjunto de element_id, matriz de tipo (topoelements).

12.2. PostGIS Window Functions

The functions below are spatial window functions that are used in the same way as SQL window functions such as row_number(), lead(), and lag(). They must be followed by an OVER() clause.

  • ST_ClusterDBSCAN - Window function that returns a cluster id for each input geometry using the DBSCAN algorithm.
  • ST_ClusterIntersectingWin - Window function that returns a cluster id for each input geometry, clustering input geometries into connected sets.
  • ST_ClusterKMeans - Window function that returns a cluster id for each input geometry using the K-means algorithm.
  • ST_ClusterWithinWin - Window function that returns a cluster id for each input geometry, clustering using separation distance.
  • ST_CoverageInvalidEdges - Window function that finds locations where polygons fail to form a valid coverage.
  • ST_CoverageSimplify - Window function that simplifies the edges of a polygonal coverage.

12.3. PostGIS SQL-MM Compliant Functions

The functions given below are PostGIS functions that conform to the SQL/MM 3 standard

  • ST_3DArea - Computes area of 3D surface geometries. Will return 0 for solids. Descripción Disponibilidad: 2.1.0 This method needs SFCGAL backend. This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 8.1, 10.5 This function supports 3d and will not drop the z-index. This function supports Polyhedral surfaces. This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).
  • ST_3DDWithin - Tests if two 3D geometries are within a given 3D distance Description Returns true if the 3D distance between two geometry values is no larger than distance distance_of_srid. The distance is specified in units defined by the spatial reference system of the geometries. For this function to make sense the source geometries must be in the same coordinate system (have the same SRID). This function automatically includes a bounding box comparison that makes use of any spatial indexes that are available on the geometries. This function supports 3d and will not drop the z-index. This function supports Polyhedral surfaces. This method implements the SQL/MM specification. SQL-MM ? Availability: 2.0.0
  • ST_3DDifference - Perform 3D difference Descripción Returns that part of geom1 that is not part of geom2. Disponibilidad: 2.2.0 This method needs SFCGAL backend. This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 5.1 This function supports 3d and will not drop the z-index. This function supports Polyhedral surfaces. This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).
  • ST_3DDistance - Returns the 3D cartesian minimum distance (based on spatial ref) between two geometries in projected units. Descripción Returns the 3-dimensional minimum cartesian distance between two geometries in projected units (spatial ref units). This function supports 3d and will not drop the z-index. This function supports Polyhedral surfaces. This method implements the SQL/MM specification. SQL-MM ISO/IEC 13249-3 Disponibilidad: 2.0.0 Changed: 2.2.0 - In case of 2D and 3D, Z is no longer assumed to be 0 for missing Z. Changed: 3.0.0 - SFCGAL version removed
  • ST_3DIntersection - Perform 3D intersection Descripción Return a geometry that is the shared portion between geom1 and geom2. Disponibilidad: 2.1.0 This method needs SFCGAL backend. This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 5.1 This function supports 3d and will not drop the z-index. This function supports Polyhedral surfaces. This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).
  • ST_3DIntersects - Tests if two geometries spatially intersect in 3D - only for points, linestrings, polygons, polyhedral surface (area) Description Overlaps, Touches, Within all imply spatial intersection. If any of the aforementioned returns true, then the geometries also spatially intersect. Disjoint implies false for spatial intersection. This function automatically includes a bounding box comparison that makes use of any spatial indexes that are available on the geometries. Changed: 3.0.0 SFCGAL backend removed, GEOS backend supports TINs. Availability: 2.0.0 This function supports 3d and will not drop the z-index. This function supports Polyhedral surfaces. This function supports Triangles and Triangulated Irregular Network Surfaces (TIN). This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 5.1
  • ST_3DLength - Returns the 3D length of a linear geometry. Descripción Returns the 3-dimensional or 2-dimensional length of the geometry if it is a LineString or MultiLineString. For 2-d lines it will just return the 2-d length (same as ST_Length and ST_Length2D) This function supports 3d and will not drop the z-index. This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 7.1, 10.3 Changed: 2.0.0 In prior versions this used to be called ST_Length3D
  • ST_3DPerimeter - Returns the 3D perimeter of a polygonal geometry. Descripción Returns the 3-dimensional perimeter of the geometry, if it is a polygon or multi-polygon. If the geometry is 2-dimensional, then the 2-dimensional perimeter is returned. This function supports 3d and will not drop the z-index. This method implements the SQL/MM specification. SQL-MM ISO/IEC 13249-3: 8.1, 10.5 Changed: 2.0.0 In prior versions this used to be called ST_Perimeter3D
  • ST_3DUnion - Perform 3D union. Descripción Disponibilidad: 2.2.0 Availability: 3.3.0 aggregate variant was added This method needs SFCGAL backend. This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 5.1 This function supports 3d and will not drop the z-index. This function supports Polyhedral surfaces. This function supports Triangles and Triangulated Irregular Network Surfaces (TIN). Aggregate variant: returns a geometry that is the 3D union of a rowset of geometries. The ST_3DUnion() function is an "aggregate" function in the terminology of PostgreSQL. That means that it operates on rows of data, in the same way the SUM() and AVG() functions do and like most aggregates, it also ignores NULL geometries.
  • ST_AddEdgeModFace - Añada un nuevo borde y, si al hacerlo, divide una cara, modifica la cara original y añade una nueva cara. Descripción Añade un nuevo borde y, si al hacerlo, se divide una cara, modifica la cara original y añade una nueva. Si es posible, la nueva cara se creará en el lado izquierdo del nuevo borde. Esto no será posible si la cara del lado izquierdo necesita ser Universe face (sin límites). Devuelve el identificador del borde recientemente añadido. Actualiza todos los bordes unidos y relaciones en consecuencia existentes. Si cualquier argumento es nulo, los nodos dados son desconocidos (ya deben existir en la tabla node del esquema de topología) , el acurve no es un LINESTRING, el anode y anothernode no son el punto de inicio y final de acurve entonces un error es lanzado. Si el sistema de referencia espacial (SRID) de la geometría acurve no es el mismo que la topología se lanza una excepción. Disponibilidad: 2.0 This method implements the SQL/MM specification. SQL-MM: Topo-Geo y Topo-Net 3: Detalle de Rutina: X.3.13
  • ST_AddEdgeNewFaces - Agrega un nuevo borde y, si al hacerlo divide una cara, se elimina la cara original y es reemplazada con dos nuevas caras. Descripción Agrega un nuevo borde y, si al hacerlo divide una cara, se elimina la cara original y es reemplazada con dos nuevas caras. Devuelve el identificador del borde recientemente agregado. Actualiza todos los bordes unidos y relaciones en consecuencia existentes. Si cualquier argumento es nulo, los nodos dados son desconocidos (ya deben existir en la tabla node del esquema de topología) , el acurve no es un LINESTRING, el anode y anothernode no son el punto de inicio y final de acurve entonces un error es lanzado. Si el sistema de referencia espacial (SRID) de la geometría acurve no es el mismo que la topología se lanza una excepción. Disponibilidad: 2.0 This method implements the SQL/MM specification. SQL-MM: Topo-Geo y Topo-Net 3: Detalles de Rutina: X.3.12
  • ST_AddIsoEdge - Agrega un borde aislado definido por la geometría alinestring a una topología que conecta dos nodos aislados existentes anode y anothernode y devuelve el identificador de borde del nuevo borde. Descripción Agrega un borde aislado definido por la geometría alinestring a una topología que conecta dos nodos aislados existentes anode y anothernode y devuelve el identificador de borde del nuevo borde. Si el sistema de referencia espacial (SRID) de la geometría alinestring no es el mismo que la topología, cualquiera de los argumentos de entrada son nulos, o los nodos se contienen en más de una cara, o los nodos son el inicio o fin de los nodos de un borde existente, entonces una excepción es lanzada. Si el alinestring no está dentro de la cara de la cara a la que pertenece anode y anothernode, entonces una excepción es lanzada. Si el anode y anothernode no son los puntos de inicion y final de la alinestring entonces una excepción es lanzada. Availability: 1.1 This method implements the SQL/MM specification. SQL-MM: Topo-Geo y Topo-Net 3: Detalles de rutina: X.3.4
  • ST_AddIsoNode - Agrega un nodo aislado a una cara de una topología y devuelve el identificardor de nodo del nuevo nodo. Si la cara es nula, el nodo es creado de todas maneras. Descripción Agrega un nodo aislado con la localización del punto apoint a una cara existente con identificador de cara aface a una topología atopology y devuelve el identificador de nodo de el nuevo nodo. Si el sistema de referencia espacial (SRID) de la geometría de punto no es el mismo que el de la topología, el apoint no es una geometía de punto, el punto es nulo, o el punto intersecta un borde existente (incluso en los límites) entonces una excepción es lanzada. Si el punto ya existe como un nodo, se produce una excepción. Si aface no es nulo y el apoint no está dentro de la cara, entonces una excepción es lanzada. Availability: 1.1 This method implements the SQL/MM specification. SQL-MM: Topo-Net Rutinas: X+1.3.1
  • ST_Area - Returns the area of a polygonal geometry. Descripción Returns the area of a polygonal geometry. For geometry types a 2D Cartesian (planar) area is computed, with units specified by the SRID. For geography types by default area is determined on a spheroid with units in square meters. To compute the area using the faster but less accurate spherical model use ST_Area(geog,false). Enhanced: 2.0.0 - support for 2D polyhedral surfaces was introduced. Enhanced: 2.2.0 - measurement on spheroid performed with GeographicLib for improved accuracy and robustness. Requires PROJ >= 4.9.0 to take advantage of the new feature. Changed: 3.0.0 - does not depend on SFCGAL anymore. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 8.1.2, 9.5.3 This function supports Polyhedral surfaces. For polyhedral surfaces, only supports 2D polyhedral surfaces (not 2.5D). For 2.5D, may give a non-zero answer, but only for the faces that sit completely in XY plane.
  • ST_AsBinary - Return the OGC/ISO Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data. Descripción Returns the OGC/ISO Well-Known Binary (WKB) representation of the geometry. The first function variant defaults to encoding using server machine endian. The second function variant takes a text argument specifying the endian encoding, either little-endian ('NDR') or big-endian ('XDR'). WKB format is useful to read geometry data from the database and maintaining full numeric precision. This avoids the precision rounding that can happen with text formats such as WKT. To perform the inverse conversion of WKB to PostGIS geometry use . The OGC/ISO WKB format does not include the SRID. To get the EWKB format which does include the SRID use The default behavior in PostgreSQL 9.0 has been changed to output bytea in hex encoding. If your GUI tools require the old behavior, then SET bytea_output='escape' in your database. Mejorado: 2.0.0 soporte para superficies poliédricas, triángulos y TIN fue introducida. Enhanced: 2.0.0 support for higher coordinate dimensions was introduced. Enhanced: 2.0.0 support for specifying endian with geography was introduced. Availability: 1.5.0 geography support was introduced. Changed: 2.0.0 Inputs to this function can not be unknown -- must be geometry. Constructs such as ST_AsBinary('POINT(1 2)') are no longer valid and you will get an n st_asbinary(unknown) is not unique error. Code like that needs to be changed to ST_AsBinary('POINT(1 2)'::geometry);. If that is not possible, then install legacy.sql. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.1 This method implements the SQL/MM specification. SQL-MM 3: 5.1.37 This method supports Circular Strings and Curves. This function supports Polyhedral surfaces. This function supports Triangles and Triangulated Irregular Network Surfaces (TIN). This function supports 3d and will not drop the z-index.
  • ST_AsGML - Return the geometry as a GML version 2 or 3 element. Descripción Return the geometry as a Geography Markup Language (GML) element. The version parameter, if specified, may be either 2 or 3. If no version parameter is specified then the default is assumed to be 2. The maxdecimaldigits argument may be used to reduce the maximum number of decimal places used in output (defaults to 15). Using the maxdecimaldigits parameter can cause output geometry to become invalid. To avoid this use with a suitable gridsize first. GML 2 refer to 2.1.2 version, GML 3 to 3.1.1 version The 'options' argument is a bitfield. It could be used to define CRS output type in GML output, and to declare data as lat/lon: 0: GML Short CRS (e.g EPSG:4326), default value 1: GML Long CRS (e.g urn:ogc:def:crs:EPSG::4326) 2: For GML 3 only, remove srsDimension attribute from output. 4: For GML 3 only, use <LineString> rather than <Curve> tag for lines. 16: Declare that datas are lat/lon (e.g srid=4326). Default is to assume that data are planars. This option is useful for GML 3.1.1 output only, related to axis order. So if you set it, it will swap the coordinates so order is lat lon instead of database lon lat. 32: Output the box of the geometry (envelope). The 'namespace prefix' argument may be used to specify a custom namespace prefix or no prefix (if empty). If null or omitted 'gml' prefix is used Disponibilidad: 1.3.2 Availability: 1.5.0 geography support was introduced. Enhanced: 2.0.0 prefix support was introduced. Option 4 for GML3 was introduced to allow using LineString instead of Curve tag for lines. GML3 Support for Polyhedral surfaces and TINS was introduced. Option 32 was introduced to output the box. Changed: 2.0.0 use default named args Enhanced: 2.1.0 id support was introduced, for GML 3. Only version 3+ of ST_AsGML supports Polyhedral Surfaces and TINS. This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 17.2 This function supports 3d and will not drop the z-index. This function supports Polyhedral surfaces. This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).
  • ST_AsText - Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata. Descripción Returns the OGC Well-Known Text (WKT) representation of the geometry/geography. The optional maxdecimaldigits argument may be used to limit the number of digits after the decimal point in output ordinates (defaults to 15). To perform the inverse conversion of WKT representation to PostGIS geometry use . The standard OGC WKT representation does not include the SRID. To include the SRID as part of the output representation, use the non-standard PostGIS function The textual representation of numbers in WKT may not maintain full floating-point precision. To ensure full accuracy for data storage or transport it is best to use Well-Known Binary (WKB) format (see and maxdecimaldigits). Using the maxdecimaldigits parameter can cause output geometry to become invalid. To avoid this use with a suitable gridsize first. Availability: 1.5 - support for geography was introduced. Enhanced: 2.5 - optional parameter precision introduced. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.1 This method implements the SQL/MM specification. SQL-MM 3: 5.1.25 This method supports Circular Strings and Curves.
  • ST_Boundary - Devuelve el cierre del limite combinatorio de esta geometría. Descripción Devuelve el cierre del limite combinatorio de esta geometría. El limite combinatorio esta definido como se describe en la sección 3.12.3.2 de la especificación OGC. Ya que el resultado de esta función es un cerco, y por lo tanto topológicamente cerrado, el límite resultante puede ser representado utilizando geometrías primitivas como se discute en la especificación OGC en la sección 3.12.2. Realizado por el módulo de GEOS Anterior a la version 2.0.0, esta función lanza una excepción si se utiliza con GEOMETRYCOLLECTION. Desde la version 2.0.0 y superiores devolverá NULL en lugar de la excepción (entrada no soportada). This method implements the OGC Simple Features Implementation Specification for SQL 1.1. OGC SPEC s2.1.1.1 This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 5.1.17 This function supports 3d and will not drop the z-index. Mejorado: 2.1.0 Se ha introducido soporte para Triangle Changed: 3.2.0 support for TIN, does not use geos, does not linearize curves
  • ST_Buffer - Computes a geometry covering all points within a given distance from a geometry. Descripción Computes a POLYGON or MULTIPOLYGON that represents all points whose distance from a geometry/geography is less than or equal to a given distance. A negative distance shrinks the geometry rather than expanding it. A negative distance may shrink a polygon completely, in which case POLYGON EMPTY is returned. For points and lines negative distances always return empty results. For geometry, the distance is specified in the units of the Spatial Reference System of the geometry. For geography, the distance is specified in meters. The optional third parameter controls the buffer accuracy and style. The accuracy of circular arcs in the buffer is specified as the number of line segments used to approximate a quarter circle (default is 8). The buffer style can be specifed by providing a list of blank-separated key=value pairs as follows: 'quad_segs=#' : number of line segments used to approximate a quarter circle (default is 8). 'endcap=round|flat|square' : endcap style (defaults to "round"). 'butt' is accepted as a synonym for 'flat'. 'join=round|mitre|bevel' : join style (defaults to "round"). 'miter' is accepted as a synonym for 'mitre'. 'mitre_limit=#.#' : mitre ratio limit (only affects mitered join style). 'miter_limit' is accepted as a synonym for 'mitre_limit'. 'side=both|left|right' : 'left' or 'right' performs a single-sided buffer on the geometry, with the buffered side relative to the direction of the line. This is only applicable to LINESTRING geometry and does not affect POINT or POLYGON geometries. By default end caps are square. For geography this is a thin wrapper around the geometry implementation. It determines a planar spatial reference system that best fits the bounding box of the geography object (trying UTM, Lambert Azimuthal Equal Area (LAEA) North/South pole, and finally Mercator ). The buffer is computed in the planar space, and then transformed back to WGS84. This may not produce the desired behavior if the input object is much larger than a UTM zone or crosses the dateline Buffer output is always a valid polygonal geometry. Buffer can handle invalid inputs, so buffering by distance 0 is sometimes used as a way of repairing invalid polygons. can also be used for this purpose. Buffering is sometimes used to perform a within-distance search. For this use case it is more efficient to use . This function ignores the Z dimension. It always gives a 2D result even when used on a 3D geometry. Enhanced: 2.5.0 - ST_Buffer geometry support was enhanced to allow for side buffering specification side=both|left|right. Availability: 1.5 - ST_Buffer was enhanced to support different endcaps and join types. These are useful for example to convert road linestrings into polygon roads with flat or square edges instead of rounded edges. Thin wrapper for geography was added. Realizado por el módulo GEOS. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.3 This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 5.1.30
  • ST_Centroid - Returns the geometric center of a geometry. Descripción Computes a point which is the geometric center of mass of a geometry. For [MULTI]POINTs, the centroid is the arithmetic mean of the input coordinates. For [MULTI]LINESTRINGs, the centroid is computed using the weighted length of each line segment. For [MULTI]POLYGONs, the centroid is computed in terms of area. If an empty geometry is supplied, an empty GEOMETRYCOLLECTION is returned. If NULL is supplied, NULL is returned. If CIRCULARSTRING or COMPOUNDCURVE are supplied, they are converted to linestring with CurveToLine first, then same than for LINESTRING For mixed-dimension input, the result is equal to the centroid of the component Geometries of highest dimension (since the lower-dimension geometries contribute zero "weight" to the centroid). Note that for polygonal geometries the centroid does not necessarily lie in the interior of the polygon. For example, see the diagram below of the centroid of a C-shaped polygon. To construct a point guaranteed to lie in the interior of a polygon use . New in 2.3.0 : supports CIRCULARSTRING and COMPOUNDCURVE (using CurveToLine) Availability: 2.4.0 support for geography was introduced. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 8.1.4, 9.5.5
  • ST_ChangeEdgeGeom - Cambia la forma de un borde sin afectar la estructura de la topología. Descripción Cambia la forma de un borde sin afectar la estructura de la topología. If any arguments are null, the given edge does not exist in the edge table of the topology schema, the acurve is not a LINESTRING, or the modification would change the underlying topology then an error is thrown. Si el sistema de referencia espacial (SRID) de la geometría acurve no es el mismo que la topología se lanza una excepción. Si el nuevo acurve no es simple, entonces un error es lanzado. Si al mover el borde de la vieja a la nueva posición golpease un obstáculo entonces se produce un error. Disponibilidad: 1.1.0 Mejorado: 2.0.0 agrega aplicación de consistencia topológica This method implements the SQL/MM specification. SQL-MM: Topo-Geo y Topo-Net 3: Detalle de Rutina X.3.6
  • ST_Contains - Tests if every point of B lies in A, and their interiors have a point in common Description Returns TRUE if geometry A contains geometry B. A contains B if and only if all points of B lie inside (i.e. in the interior or boundary of) A (or equivalently, no points of B lie in the exterior of A), and the interiors of A and B have at least one point in common. In mathematical terms: ST_Contains(A, B) ⇔ (A ⋂ B = B) ∧ (Int(A) ⋂ Int(B) ≠ ∅) The contains relationship is reflexive: every geometry contains itself. (In contrast, in the predicate a geometry does not properly contain itself.) The relationship is antisymmetric: if ST_Contains(A,B) = true and ST_Contains(B,A) = true, then the two geometries must be topologically equal (ST_Equals(A,B) = true). ST_Contains is the converse of . So, ST_Contains(A,B) = ST_Within(B,A). Because the interiors must have a common point, a subtlety of the definition is that polygons and lines do not contain lines and points lying fully in their boundary. For further details see Subtleties of OGC Covers, Contains, Within. The predicate provides a more inclusive relationship. This function automatically includes a bounding box comparison that makes use of any spatial indexes that are available on the geometries. To avoid index use, use the function _ST_Contains. Performed by the GEOS module Enhanced: 2.3.0 Enhancement to PIP short-circuit extended to support MultiPoints with few points. Prior versions only supported point in polygon. Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Do not use this function with invalid geometries. You will get unexpected results. NOTE: this is the "allowable" version that returns a boolean, not an integer. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.2 // s2.1.13.3 - same as within(geometry B, geometry A) This method implements the SQL/MM specification. SQL-MM 3: 5.1.31
  • ST_ConvexHull - Computes the convex hull of a geometry. Descripción Computes the convex hull of a geometry. The convex hull is the smallest convex geometry that encloses all geometries in the input. One can think of the convex hull as the geometry obtained by wrapping an rubber band around a set of geometries. This is different from a concave hull which is analogous to "shrink-wrapping" the geometries. A convex hull is often used to determine an affected area based on a set of point observations. In the general case the convex hull is a Polygon. The convex hull of two or more collinear points is a two-point LineString. The convex hull of one or more identical points is a Point. This is not an aggregate function. To compute the convex hull of a set of geometries, use to aggregate them into a geometry collection (e.g. ST_ConvexHull(ST_Collect(geom)). Realizado por el módulo de GEOS This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.3 This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 5.1.16 This function supports 3d and will not drop the z-index.
  • ST_CoordDim - Devuelve la dimensión de las coordenadas del valor de ST_Geometry. Descripción Devuelve la dimensión de las coordenadas del valor de ST_Geometry. Es el alias de conforme a MM This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 5.1.3 This method supports Circular Strings and Curves. This function supports 3d and will not drop the z-index. This function supports Polyhedral surfaces. This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).
  • ST_CreateTopoGeo - Agrega una colección de geometrías a una topología vacía dada y devuelve un mensaje que detalla el éxito. Descripción Agrega una colección de geometrías a una topología vacía dada y devuelve un mensaje que detalla el éxito. Útil para rellenar una topología vacía. Disponibilidad: 2.0 This method implements the SQL/MM specification. SQL-MM: Topo-Geo y Topo-Net 3: Detalles de la rutina -- X.3.18
  • ST_Crosses - Tests if two geometries have some, but not all, interior points in common Description Compares two geometry objects and returns true if their intersection "spatially crosses"; that is, the geometries have some, but not all interior points in common. The intersection of the interiors of the geometries must be non-empty and must have dimension less than the maximum dimension of the two input geometries, and the intersection of the two geometries must not equal either geometry. Otherwise, it returns false. The crosses relation is symmetric and irreflexive. In mathematical terms: ST_Crosses(A, B) ⇔ (dim( Int(A) ⋂ Int(B) ) < max( dim( Int(A) ), dim( Int(B) ) )) ∧ (A ⋂ B ≠ A) ∧ (A ⋂ B ≠ B) Geometries cross if their DE-9IM Intersection Matrix matches: T*T****** for Point/Line, Point/Area, and Line/Area situations T*****T** for Line/Point, Area/Point, and Area/Line situations 0******** for Line/Line situations the result is false for Point/Point and Area/Area situations The OpenGIS Simple Features Specification defines this predicate only for Point/Line, Point/Area, Line/Line, and Line/Area situations. JTS / GEOS extends the definition to apply to Line/Point, Area/Point and Area/Line situations as well. This makes the relation symmetric. This function automatically includes a bounding box comparison that makes use of any spatial indexes that are available on the geometries. Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.13.3 This method implements the SQL/MM specification. SQL-MM 3: 5.1.29
  • ST_CurveToLine - Converts a geometry containing curves to a linear geometry. Descripción Converts a CIRCULAR STRING to regular LINESTRING or CURVEPOLYGON to POLYGON or MULTISURFACE to MULTIPOLYGON. Useful for outputting to devices that can't support CIRCULARSTRING geometry types Converts a given geometry to a linear geometry. Each curved geometry or segment is converted into a linear approximation using the given `tolerance` and options (32 segments per quadrant and no options by default). The 'tolerance_type' argument determines interpretation of the `tolerance` argument. It can take the following values: 0 (default): Tolerance is max segments per quadrant. 1: Tolerance is max-deviation of line from curve, in source units. 2: Tolerance is max-angle, in radians, between generating radii. The 'flags' argument is a bitfield. 0 by default. Supported bits are: 1: Symmetric (orientation idependent) output. 2: Retain angle, avoids reducing angles (segment lengths) when producing symmetric output. Has no effect when Symmetric flag is off. Availability: 1.3.0 Enhanced: 2.4.0 added support for max-deviation and max-angle tolerance, and for symmetric output. Enhanced: 3.0.0 implemented a minimum number of segments per linearized arc to prevent topological collapse. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 7.1.7 This function supports 3d and will not drop the z-index. This method supports Circular Strings and Curves.
  • ST_Difference - Computes a geometry representing the part of geometry A that does not intersect geometry B. Description Returns a geometry representing the part of geometry A that does not intersect geometry B. This is equivalent to A - ST_Intersection(A,B). If A is completely contained in B then an empty atomic geometry of appropriate type is returned. This is the only overlay function where input order matters. ST_Difference(A, B) always returns a portion of A. If the optional gridSize parameter is given (GEOS-3.9.0 or higher required), all result vertices are guaranteed to fall on a grid of the specified size. For the operation to give predictable results all the input vertices must fall already on the specified grid, see . Performed by the GEOS module Enhanced: 3.1.0 accept a gridSize parameter. Requires GEOS >= 3.9.0 to use the gridSize parameter. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.3 This method implements the SQL/MM specification. SQL-MM 3: 5.1.20 This function supports 3d and will not drop the z-index. However, the result is computed using XY only. The result Z values are copied, averaged or interpolated.
  • ST_Dimension - Devuelve la dimensión de las coordenadas del valor de ST_Geometry. Descripción La dimensión inherente del objeto Geometry, la cual debe ser menor o igual a la dimensión de coordenadas. En la Especificación OGC s2.1.1.1 - devuelve 0 para un POINT, 1 para una LINESTRING, 2 para un POLYGON, y la dimensión mayor de los componentes de una GEOMETRYCOLLECTION. Si es desconocida (geometría vacía) se devuelve null. This method implements the SQL/MM specification. SQL-MM 3: 5.1.2 Mejora: 2.0.0 se introdujeron soporte de superficies poliédricas y TIN. No lanza una excepción si se envia una geometría vacía. Anterior a la versión 2.0.0, esta función lanzaba una excepción si se enviaba una geometría vacía. This function supports Polyhedral surfaces. This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).
  • ST_Disjoint - Tests if two geometries have no points in common Description Returns true if two geometries are disjoint. Geometries are disjoint if they have no point in common. If any other spatial relationship is true for a pair of geometries, they are not disjoint. Disjoint implies that is false. In mathematical terms: ST_Disjoint(A, B) ⇔ A ⋂ B = ∅ Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Performed by the GEOS module This function call does not use indexes. A negated predicate can be used as a more performant alternative that uses indexes: ST_Disjoint(A,B) = NOT ST_Intersects(A,B) NOTE: this is the "allowable" version that returns a boolean, not an integer. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.2 //s2.1.13.3 - a.Relate(b, 'FF*FF****') This method implements the SQL/MM specification. SQL-MM 3: 5.1.26
  • ST_Distance - Returns the distance between two geometry or geography values. Descripción For types returns the minimum 2D Cartesian (planar) distance between two geometries, in projected units (spatial ref units). For types defaults to return the minimum geodesic distance between two geographies in meters, compute on the spheroid determined by the SRID. If use_spheroid is false, a faster spherical calculation is used. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 5.1.23 This method supports Circular Strings and Curves. Availability: 1.5.0 geography support was introduced in 1.5. Speed improvements for planar to better handle large or many vertex geometries Enhanced: 2.1.0 improved speed for geography. See Making Geography faster for details. Enhanced: 2.1.0 - support for curved geometries was introduced. Enhanced: 2.2.0 - measurement on spheroid performed with GeographicLib for improved accuracy and robustness. Requires PROJ >= 4.9.0 to take advantage of the new feature. Changed: 3.0.0 - does not depend on SFCGAL anymore.
  • ST_EndPoint - Devuelve el número de puntos en un valor ST_LineString o ST_CircularString. Descripción Devuelve el primer punto de una geometría LINESTRING o CIRCULARLINESTRING como un POINT o NULL si el parámetro de entrada no es un LINESTRING o CIRCULARLINESTRING. This method implements the SQL/MM specification. SQL-MM 3: 7.1.4 This function supports 3d and will not drop the z-index. This method supports Circular Strings and Curves. Cambiado: 2.0.0 ya no funciona con multilinestrings de geometrías simples. En versiones anteriores de PostGIS -- una linea simple multilinestring funciona sin problemas con esta función y devuelve el punto inicial. En la version 2.0.0 simplemente devuelve NULL como con cualquier multilinestring. La antigua version era una función sin documentar, pero la gente que asumía que tenia sus datos almacenados en LINESTRING pueden experimentar este comportamiento ahora de resultado NULL en la version 2.0.
  • ST_Envelope - Devuelve una geometría que representa la caja en doble precisión (float8) de la geometría dada. Descripción Devuelve una geometría que representa la caja mínima en doble precisión (float8) de la geometría dada. El polígono definido por las esquinas de la caja ((MINX, MINY), (MINX, MAXY), (MAXX, MAXY), (MAXX, MINY), (MINX, MINY)). (PostGIS añadirá las coordenadas ZMIN/ZMAX también). Algunos casos particulares(lineas verticales, puntos) devolverán una geometría de dimension menor que POLYGON, por ejemplo POINT o LINESTRING. Disponibilidad: 1.5.0 comportamiento modificado para devolver doble precisión en vez de float4. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.1 This method implements the SQL/MM specification. SQL-MM 3: 5.1.19
  • ST_Equals - Tests if two geometries include the same set of points Description Returns true if the given geometries are "topologically equal". Use this for a 'better' answer than '='. Topological equality means that the geometries have the same dimension, and their point-sets occupy the same space. This means that the order of vertices may be different in topologically equal geometries. To verify the order of points is consistent use (it must be noted ST_OrderingEquals is a little more stringent than simply verifying order of points are the same). In mathematical terms: ST_Equals(A, B) ⇔ A = B The following relation holds: ST_Equals(A, B) ⇔ ST_Within(A,B) ∧ ST_Within(B,A) Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.2 This method implements the SQL/MM specification. SQL-MM 3: 5.1.24 Changed: 2.2.0 Returns true even for invalid geometries if they are binary equal
  • ST_ExteriorRing - Devuelva el número de anillos interiores de una geometría poligonal. Descripción Devuelve una linestring representando el anillo exterior de una geometria tipo POLYGON. Devuelve NULL si la geometria no es un poligono. No funcionará con MULTIPOLYGON Esto no funcionara con MULTIPOLYGONs. Para MULTIPOLYGONs utilizaba junto a ST_Dump. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. 2.1.5.1 This method implements the SQL/MM specification. SQL-MM 3: 8.2.3, 8.3.3 This function supports 3d and will not drop the z-index.
  • ST_GMLToSQL - Devuelve un valor especifico ST_Geometry desde una representación GML. Esto es un alias de ST_GeomFromGML Descripción This method implements the SQL/MM specification. SQL-MM 3: 5.1.50 (excepto para soporte de curvas). Disponibilidad: 1.5, requiere libxml2 1.6+ Mejora: 2.0.0 se introdujeron soporte de superficies poliédricas y TIN. Mejorada: 2.0.0 se agregó el parámetro por defecto opcional srid.
  • ST_GeomCollFromText - Hace una colección Geometry de la colección WKT con el SRID dado. Si no se da SRID, el valor predeterminado es 0. Descripción Hace una colección Geometry de la representación de texto conocido (WKT) con el SRID dado. Si no se da SRID, el valor predeterminado es 0. OGC SPEC 3.2.6.2 - La opción SRID es del paquete de conformidad Devuelve null si el WKT no es una GEOMETRYCOLLECTION Si estas completamente seguro que todas tus geometrias WKT son colecciones, no utilices esta función. Es mas lenta que ST_GeomFromText ya que añade pasos de validación adicionales. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s3.2.6.2 This method implements the SQL/MM specification.
  • ST_GeomFromText - Devuelve un valor especifico de ST_Geometry desde una representación "Extended Well-Known Binary" (EWKB). Descripción Construye un objeto ST_Geometry de PostGIS desde una representación OGC "Well-Known Text" (WKT). Hay dos variantes de la función ST_GeomFromText. El primero no toma SRID y devuelve una geometría sin sistema de referencia espacial definido (SRID = 0). La segunda toma un SRID como segundo argumento y devuelve una geometría que incluye esta SRID como parte de sus metadatos. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s3.2.6.2 - la opción SRID es de la suite de conformidad. This method implements the SQL/MM specification. SQL-MM 3: 5.1.40 This method supports Circular Strings and Curves. While not OGC-compliant, is faster than ST_GeomFromText and ST_PointFromText. It is also easier to use for numeric coordinate values. is another option similar in speed to and is OGC-compliant, but doesn't support anything but 2D points. Cambiado: 2.0.0 En las versiones anteriores de PostGIS ST_GeomFromText('GEOMETRYCOLLECTION(EMPTY)') estaba permitido. Esto no esta permitido ahora en PostGIS 2.0.0 para ajustarse mejor a las normas SQL/MM. Esto debería ser escrito como ST_GeomFromText('GEOMETRYCOLLECTION EMPTY')
  • ST_GeomFromWKB - Crea una instancia de geometría desde la representación de una geometría en "Well-Known Binary" (WKB) y un SRID opcional. Descripción La función ST_GeomFromWKB, toma una representación binaria "well-known" de una geometría y un ID de un Sistema de Referencia Espacial (SRID) y crea una instancia del tipo de geometría adecuado. Esta función juega un rol de "Geometry Factory" en SQL. Es un nombre alternativo para ST_WKBToSQL. Si no se especifica SRID, el valor predeterminado es 0 (desconocido). This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s3.2.7.2 - El SRID opcional es para el paquete de conformidad This method implements the SQL/MM specification. SQL-MM 3: 5.1.41 This method supports Circular Strings and Curves.
  • ST_GeometryFromText - Devuelve un valor especifico de ST_Geometry desde una representación "Well-Known Text" (WKT). Es un alias para ST_GeomFromText Descripción This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 5.1.40
  • ST_GeometryN - Devuelve el tipo de geometría del valor de ST_Geometry. Descripción Devuelve la geometría en la cual se basa si la geometría es una GEOMETRYCOLLECTION, un (MULTI)POINT, una (MULTI)LINESTRING, una MULTICURVE o un (MULTI)POLYGON, una POLYHEDRALSURFACE si no devuelve NULL. El indice es 1-based en la especificación OGC desde la version 0.8.0. Versiones anteriormente implementadas era de tipo 0-based. Si quieres extraer todas las geometrías de una geometría, ST_Dump es mas eficiente y funcionará con geometrías simples. Mejorado: 2.0.0 se introdujo soporte para superficies poliédricas, Triangulos y TIN. Cambiado: 2.0.0 Versiones anteriores devuelven NULL para geometrias simples. Esto ha sido cambiado para devolver la geometría en el caso de ST_GeometryN(..,1) . This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 9.1.5 This function supports 3d and will not drop the z-index. This method supports Circular Strings and Curves. This function supports Polyhedral surfaces. This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).
  • ST_GeometryType - Devuelve el tipo de geometría del valor de ST_Geometry. Descripción Devuelve el tipo de geometría como una cadena de texto. Por Ejemplo: 'ST_LineString', 'ST_Polygon','ST_MultiPolygon' etc. Esta función difiere de GeometryType(geometría) en este caso se devuelve la cadena de texto y ST delante, como el hecho de que no indicará como se mide la geometría. Mejora: 2.0.0 se introdujo soporte de superficies poliédricas. This method implements the SQL/MM specification. SQL-MM 3: 5.1.4 This function supports 3d and will not drop the z-index. This function supports Polyhedral surfaces.
  • ST_GetFaceEdges - Devuelve un conjunto de bordes ordenados que ligan aface. Descripción Devuelve un conjunto de bordes ordenados que ligan aface. Cada salida consta de una secuencia e identificador de borde. Los números de secuencia comienzan con el valor 1. La enumeración de los bordes de cada anillo comienza desde el borde con el identificador más pequeño. El orden de los bordes sigue la regla de la izquierda (la cara enmarcada está a la izquierda de cada borde dirigido). Disponibilidad: 2.0 This method implements the SQL/MM specification. SQL-MM 3 Topo-Geo y Topo-Net 3: Detalles de Rutina: X.3.5
  • ST_GetFaceGeometry - Devuelve el polígono en la topología dada con el identificador de la cara especificada. Descripción Devuelve el polígono en la topología dada con el identificador de cara especificado. Construye el polígono de los bordes que componen la cara. Availability: 1.1 This method implements the SQL/MM specification. SQL-MM 3 Topo-Geo y Topo-Net 3: Detalles de Rutina: X.3.16
  • ST_InitTopoGeo - Creates a new topology schema and registers it in the topology.topology table. Descripción This is the SQL-MM equivalent of . It lacks options for spatial reference system and tolerance. it returns a text description of the topology creation, instead of the topology id. Availability: 1.1 This method implements the SQL/MM specification. SQL-MM 3 Topo-Geo y Topo-Net 3: Detalles de la rutina: X.3.17
  • ST_InteriorRingN - Devuelva el número de anillos interiores de una geometría poligonal. Descripción Devuelve la cadena de texto del anillo interior N del poligono. Devuelve NULL si la geometría no es un polígono o el indice N dado esta fuera de rango. Esto no funcionara con MULTIPOLYGONs. Para MULTIPOLYGONs utilizaba junto a ST_Dump. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 8.2.6, 8.3.5 This function supports 3d and will not drop the z-index.
  • ST_Intersection - Computes a geometry representing the shared portion of geometries A and B. Description Returns a geometry representing the point-set intersection of two geometries. In other words, that portion of geometry A and geometry B that is shared between the two geometries. If the geometries have no points in common (i.e. are disjoint) then an empty atomic geometry of appropriate type is returned. If the optional gridSize parameter is given (GEOS-3.9.0 or higher required), all result vertices are guaranteed to fall on a grid of the specified size. For the operation to give predictable results all the input vertices must fall already on the specified grid, see . ST_Intersection in conjunction with is useful for clipping geometries such as in bounding box, buffer, or region queries where you only require the portion of a geometry that is inside a country or region of interest. For geography this is a thin wrapper around the geometry implementation. It first determines the best SRID that fits the bounding box of the 2 geography objects (if geography objects are within one half zone UTM but not same UTM will pick one of those) (favoring UTM or Lambert Azimuthal Equal Area (LAEA) north/south pole, and falling back on mercator in worst case scenario) and then intersection in that best fit planar spatial ref and retransforms back to WGS84 geography. This function will drop the M coordinate values if present. If working with 3D geometries, you may want to use SFGCAL based which does a proper 3D intersection for 3D geometries. Although this function works with Z-coordinate, it does an averaging of Z-Coordinate. Performed by the GEOS module Enhanced: 3.1.0 accept a gridSize parameter Requires GEOS >= 3.9.0 to use the gridSize parameter Changed: 3.0.0 does not depend on SFCGAL. Availability: 1.5 support for geography data type was introduced. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.3 This method implements the SQL/MM specification. SQL-MM 3: 5.1.18 This function supports 3d and will not drop the z-index. However, the result is computed using XY only. The result Z values are copied, averaged or interpolated.
  • ST_Intersects - Tests if two geometries intersect (they have at least one point in common) Description Returns true if two geometries intersect. Geometries intersect if they have any point in common. For geography, a distance tolerance of 0.00001 meters is used (so points that are very close are considered to intersect). In mathematical terms: ST_Intersects(A, B) ⇔ A ⋂ B ≠ ∅ Geometries intersect if their DE-9IM Intersection Matrix matches one of: T******** *T******* ***T***** ****T**** Spatial intersection is implied by all the other spatial relationship tests, except , which tests that geometries do NOT intersect. This function automatically includes a bounding box comparison that makes use of any spatial indexes that are available on the geometries. Changed: 3.0.0 SFCGAL version removed and native support for 2D TINS added. Enhanced: 2.5.0 Supports GEOMETRYCOLLECTION. Enhanced: 2.3.0 Enhancement to PIP short-circuit extended to support MultiPoints with few points. Prior versions only supported point in polygon. Performed by the GEOS module (for geometry), geography is native Availability: 1.5 support for geography was introduced. For geography, this function has a distance tolerance of about 0.00001 meters and uses the sphere rather than spheroid calculation. NOTE: this is the "allowable" version that returns a boolean, not an integer. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.2 //s2.1.13.3 - ST_Intersects(g1, g2 ) --> Not (ST_Disjoint(g1, g2 )) This method implements the SQL/MM specification. SQL-MM 3: 5.1.27 This method supports Circular Strings and Curves. This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).
  • ST_IsClosed - Devuelve TRUE si los puntos de inicio y final de una LINESTRINGson coincidentes. Para superficies poliedricas si son cerradas (volumetricas). Descripción Devuelve TRUE si los puntos de inicio y final de una LINESTRINGson coincidentes. Para superficies poliédricas , te dice si las superficies son áreas (abiertas) o si son volumétricas (cerradas). This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 7.1.5, 9.3.3 SQL-MM define que el resultado de ST_IsClosed(NULL) debe ser 0, mientras que PostGIS devuelve NULL. This function supports 3d and will not drop the z-index. This method supports Circular Strings and Curves. Mejora: 2.0.0 se introdujo soporte de superficies poliédricas. This function supports Polyhedral surfaces.
  • ST_IsEmpty - Tests if a geometry is empty. Descripción Devuelve True si la Geometría es una geometría vacía. Si es cierto, entonces esta Geometría representa una colección de geometrías vacías, polígonos vacíos, puntos vacíos, etc. SQL-MM define que el resultado de ST_IsEmpty(NULL) debe ser 0, mientras que PostGIS devuelve NULL. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.1 This method implements the SQL/MM specification. SQL-MM 3: 5.1.7 This method supports Circular Strings and Curves. Cambiado: 2.0.0 En las versiones anteriores de PostGIS ST_GeomFromText('GEOMETRYCOLLECTION(EMPTY)') estaba permitido. Esto no esta permitido ahora en PostGIS 2.0.0 para ajustarse mejor a las normas SQL/MM.
  • ST_IsRing - Tests if a LineString is closed and simple. Descripción Devuelve TRUE si esta LINESTRING es (ST_StartPoint(g) ~= ST_Endpoint(g)) y (no se intersecta con ella misma). This method implements the OGC Simple Features Implementation Specification for SQL 1.1. 2.1.5.1 This method implements the SQL/MM specification. SQL-MM 3: 7.1.6 SQL-MM define que el resultado de ST_IsRing(NULL) debe ser 0, mientras que PostGIS devuelve NULL.
  • ST_IsSimple - Devuelve (TRUE) si la geometría no tiene puntos geométricos anómalos, como auto intersecciones o tangencias. Descripción Devuelve TRUE si la geometría no tiene puntos geométricos anómalos, como auto intersecciones o tangencias. Para mas información sobre la definición del OGC de simplicidad y validez geométrica, visita el enlace "Ensuring OpenGIS compliancy of geometries" SQL-MM define que el resultado de ST_IsSimple(NULL) debe ser 0, mientras que PostGIS devuelve NULL. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.1 This method implements the SQL/MM specification. SQL-MM 3: 5.1.8 This function supports 3d and will not drop the z-index.
  • ST_IsValid - Tests if a geometry is well-formed in 2D. Description Tests if an ST_Geometry value is well-formed and valid in 2D according to the OGC rules. For geometries with 3 and 4 dimensions, the validity is still only tested in 2 dimensions. For geometries that are invalid, a PostgreSQL NOTICE is emitted providing details of why it is not valid. For the version with the flags parameter, supported values are documented in This version does not print a NOTICE explaining invalidity. For more information on the definition of geometry validity, refer to SQL-MM defines the result of ST_IsValid(NULL) to be 0, while PostGIS returns NULL. Performed by the GEOS module. The version accepting flags is available starting with 2.0.0. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 5.1.9 Neither OGC-SFS nor SQL-MM specifications include a flag argument for ST_IsValid. The flag is a PostGIS extension.
  • ST_Length - Returns the 2D length of a linear geometry. Descripción For geometry types: returns the 2D Cartesian length of the geometry if it is a LineString, MultiLineString, ST_Curve, ST_MultiCurve. For areal geometries 0 is returned; use instead. The units of length is determined by the spatial reference system of the geometry. For geography types: computation is performed using the inverse geodesic calculation. Units of length are in meters. If PostGIS is compiled with PROJ version 4.8.0 or later, the spheroid is specified by the SRID, otherwise it is exclusive to WGS84. If use_spheroid = false, then the calculation is based on a sphere instead of a spheroid. Currently for geometry this is an alias for ST_Length2D, but this may change to support higher dimensions. Changed: 2.0.0 Breaking change -- in prior versions applying this to a MULTI/POLYGON of type geography would give you the perimeter of the POLYGON/MULTIPOLYGON. In 2.0.0 this was changed to return 0 to be in line with geometry behavior. Please use ST_Perimeter if you want the perimeter of a polygon For geography the calculation defaults to using a spheroidal model. To use the faster but less accurate spherical calculation use ST_Length(gg,false); This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.5.1 This method implements the SQL/MM specification. SQL-MM 3: 7.1.2, 9.3.4 Availability: 1.5.0 geography support was introduced in 1.5.
  • ST_LineFromText - Hace una geometría de la representación WKT con el SRID dado. Si SRID no se da, el valor predeterminado es 0. Descripción Hace una Geometry desde un WKT con el SRID dado. Si no se da un SRID, el valor predeterminado es 0. Si el WKT pasado no es un LINESTRING, se devuelve null. OGC SPEC 3.2.6.2 - La opción SRID es del paquete de conformidad Si sabes que todas tus geometrías son LINESTRING, es mas eficiente el uso de ST_GeomFromText. Esto llama únicamente a ST_GeomFromText y añade validaciones adicionales que devuelven un linestring. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s3.2.6.2 This method implements the SQL/MM specification. SQL-MM 3: 7.2.8
  • ST_LineFromWKB - Crea un LINESTRING desde un WKB con el SRID dado Descripción La función ST_GeomFromWKB, toma una representación binaria "well-known" de una geometría y un ID de un Sistema de Referencia Espacial (SRID) y crea una instancia del tipo de geometría adecuado - en este caso una geometría LINESTRING. Esta función juega un rol de "Geometry Factory" en SQL. Si no se especifica un SRID, el valor predeterminado es 0. NULL se devuelve si la entrada bytea no representa un LINESTRING. OGC SPEC 3.2.6.2 - La opción SRID es del paquete de conformidad Si sabes que todas tus geometrías son LINESTRING, es mas eficiente el uso de . Esta función simplemente llama a y añade validaciones adicionales y devuelve una linestring. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s3.2.6.2 This method implements the SQL/MM specification. SQL-MM 3: 7.2.9
  • ST_LinestringFromWKB - Crea una geometría desde un WKB con el SRID dado. Descripción La función ST_LinestringFromWKB, toma una representación de una geometría en "well-known binary" y un ID de un Sistema de Referencia Espacial (SRID) y crea una instancia del tipo apropiado de geometría - en este caso, una geometría LINESTRING. Esta función juega un rol de "Geometry Factory" en SQL. Si no se especifica un SRID, el valor predeterminado es 0.NULL se devuelve si la entrada bytea no representa una geometría LINESTRING. Esto es un alias para . OGC SPEC 3.2.6.2 - La opción SRID es del paquete de conformidad Si sabes que todas tus geometrías son LINESTRING, es mas eficiente el uso de . Esta función simplemente llama a y añade validaciones adicionales y devuelve una LINESTRING. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s3.2.6.2 This method implements the SQL/MM specification. SQL-MM 3: 7.2.9
  • ST_LocateAlong - Returns the point(s) on a geometry that match a measure value. Descripción Returns the location(s) along a measured geometry that have the given measure values. The result is a Point or MultiPoint. Polygonal inputs are not supported. If offset is provided, the result is offset to the left or right of the input line by the specified distance. A positive offset will be to the left, and a negative one to the right. Use this function only for linear geometries with an M component The semantic is specified by the ISO/IEC 13249-3 SQL/MM Spatial standard. Disponibilidad: 1.1.0 por antiguo nombre ST_Locate_Along_Measure. Modificado: 2.0.0 en versiones anteriores éste solía llamarse ST_Locate_Along_Measure. El nombre anterior ha quedado obsoleto y se eliminará en el futuro, pero aún está disponible. This function supports M coordinates. This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 5.1.13
  • ST_LocateBetween - Returns the portions of a geometry that match a measure range. Descripción Devuelve un valor de la colección Geometry derivado con elementos que coinciden con la medida especificada. No se admiten elementos poligonales. Si se proporciona un desplazamiento, el resultado se desplazará a la izquierda o a la derecha de la línea de entrada por el número de unidades especificado. Un desplazamiento positivo será a la izquierda, y uno negativo a la derecha. Clipping a non-convex POLYGON may produce invalid geometry. The semantic is specified by the ISO/IEC 13249-3 SQL/MM Spatial standard. Disponibilidad: 1.1.0 por nombre antiguo ST_Locate_Between_Measures. Modificado: 2.0.0 en versiones anteriores éste solía llamarse ST_Locate_Along_Measure. El nombre anterior ha quedado obsoleto y se eliminará en el futuro, pero aún está disponible. Enhanced: 3.0.0 - added support for POLYGON, TIN, TRIANGLE. This function supports M coordinates. This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 5.1
  • ST_M - Returns the M coordinate of a Point. Descripción Devuelve la coordenada M del punto, o NULL si no seta disponible. La entrada debe ser un punto. Esto no es (todavía) parte de la especificación OGC, pero esta incluida aquí para completar la lista de extracción de coordenadas de un punto. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. This function supports 3d and will not drop the z-index.
  • ST_MLineFromText - Devuelve un valor especificado ST_MultiLineString desde una representación WKT. Descripción Hace una Geometry desde el texto bien conocido (WKT) con el SRID dado. Si no se da un SRID, el valor predeterminado es 0. OGC SPEC 3.2.6.2 - La opción SRID es del paquete de conformidad Devuelve NULL si el WKT no es un MULTILINESTRING Si estas completamente seguro que todas tus geometrias WKT son puntos, no utilices esta función. Es mas lenta que ST_GeomFromText ya que añade algunos pasos de validación. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s3.2.6.2 This method implements the SQL/MM specification. SQL-MM 3: 9.4.4
  • ST_MPointFromText - Hace una geometría desde un WKT con el SRID dado. Si no se da un SRID, el valor predeterminado es 0. Descripción Hace una geometría desde un WKT con el SRID dado. Si no se da un SRID, el valor predeterminado es 0. OGC SPEC 3.2.6.2 - La opción SRID es del paquete de conformidad Devuelve NULL si el WKT no es un MULTIPUNTO Si estas completamente seguro que todas tus geometrias WKT son puntos, no utilices esta función. Es mas lenta que ST_GeomFromText ya que añade algunos pasos de validación. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. 3.2.6.2 This method implements the SQL/MM specification. SQL-MM 3: 9.2.4
  • ST_MPolyFromText - Hace una Geometría MultiPolygon desde un WKT con el SRID dado. Si no se da SRID, el valor predeterminado es 0. Descripción Hace un MultiPolygon desde un WKT con el SRID dado. Si no se da SRID, el valor predeterminado es 0. OGC SPEC 3.2.6.2 - La opción SRID es del paquete de conformidad Devuelve un error si el WKT no es un MULTIPOLYGON Si estas completamente seguro que todas tus geometrías WKT son multipolygon, no utilices esta función. Es mas lenta que ST_GeomFromText ya que añade algunos pasos de validación adicionales. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s3.2.6.2 This method implements the SQL/MM specification. SQL-MM 3: 9.6.4
  • ST_ModEdgeHeal - Cura dos aristas eliminando el nodo que las conecta, modificando la primera arista y eliminando la segunda arista. Devuelve el identificador del nodo eliminado. Descripción Cura dos aristas eliminando el nodo que las conecta, modificando la primera arista y eliminando la segunda arista. Devuelve el identificador del nodo eliminado. Actualiza todos los bordes y relaciones unidos existentes en consecuencia. Disponibilidad: 2.0 This method implements the SQL/MM specification. SQL-MM: Topo-Geo y Topo-Net 3: Detalles de Rutina: X.3.9
  • ST_ModEdgeSplit - Dividir un borde creando un nuevo nodo a lo largo de un borde existente, modificando el borde original y agregando un nuevo borde. Descripción Dividir un borde creando un nuevo nodo a lo largo de un borde existente, modificando el borde original y agregando un nuevo borde. Actualiza todos los bordes unidos existentes y relaciones en consecuencia. Devuelve el identificador del nodo recientemente agregado. Availability: 1.1 Cambiado: 2.0 - En versiones anteriores, esto fue mal llamado ST_ModEdgesSplit This method implements the SQL/MM specification. SQL-MM: Topo-Geo y Topo-Net 3: Detalles de Rutina: X.3.9
  • ST_MoveIsoNode - Mueve un nodo aislado en una topología de un punto a otro. Si la nueva geometría apoint existe como nodo se lanza un error. Devuelve la descripción del movimiento. Descripción Mueve un nodo aislado en una topología de un punto a otro. Si la nueva geometría apoint existe como un nodo un error es lanzado. If any arguments are null, the apoint is not a point, the existing node is not isolated (is a start or end point of an existing edge), new node location intersects an existing edge (even at the end points) or the new location is in a different face (since 3.2.0) then an exception is thrown. Si el sistema de referencia espacial (SRID) de la geometría de punto no es el mismo que el de la topología se lanza una excepción. Disponibilidad: 2.0.0 Enhanced: 3.2.0 ensures the nod cannot be moved in a different face This method implements the SQL/MM specification. SQL-MM: Topo-Net Rutina: X.3.2
  • ST_NewEdgeHeal - Cura dos aristas eliminando el nodo que las conecta, eliminando ambas aristas y sustituyéndolas por una arista cuya dirección sea la misma que la primera arista proporcionada. Descripción Cura dos aristas eliminando el nodo que las conecta, eliminando ambas aristas y sustituyéndolas por una arista cuya dirección sea la misma que la primera arista proporcionada. Devuelve el identificador de la nueva aristas reemplazante de las curadas. Actualiza todas las aristas y relaciones unidos existentes en consecuencia. Disponibilidad: 2.0 This method implements the SQL/MM specification. SQL-MM: Topo-Geo y Topo-Net 3: Detalles de Rutina: X.3.9
  • ST_NewEdgesSplit - Divide un borde creando un nuevo nodo a lo largo de un borde existente, eliminando el borde original y reemplazandolo con dos bordes nuevos. Devuelve el identificador del nuevo nodo creado que une los nuevos bordes. Descripción Divide un borde con el identificador de borde anedge creando un nodo nuevo con la localización del punto apoint a lo largo del borde actual, eliminando el borde original y reemplazando con dos bordes nuevos. Devuelve el identificador del nuevo nodo creado que une los nuevos bordes. Actualiza todos los bordes unidos existentes y relaciones en consecuencia. Si el sistema de referencia espacial (SRID) de la geometría de punto no es el mismo que el de la topología, el apoint no es una geometría de punto, el punto es nulo, el punto ya existe como un nodo, el borde no corresponde a un borde existente o el punto no está dentro del borde entonces se lanza una excepción. Availability: 1.1 This method implements the SQL/MM specification. SQL-MM: Topo-Net Rutina: X.3.8
  • ST_NumGeometries - Devuelve el numero de puntos en la geometría. Funciona con todas las geometrías. Descripción Returns the number of elements in a geometry collection (GEOMETRYCOLLECTION or MULTI*). For non-empty atomic geometries returns 1. For empty geometries returns 0. Mejorado: 2.0.0 se introdujo soporte para superficies poliédricas, Triangulos y TIN. Cambiado: 2.0.0 En versiones anteriores esto devolvería NULL si la geometría no era de tipo collection/MULTI. 2.0.0+ devuelve 1 para geometrías simples, por ejemplo, POLYGON, LINESTRING, POINT. This method implements the SQL/MM specification. SQL-MM 3: 9.1.4 This function supports 3d and will not drop the z-index. This function supports Polyhedral surfaces. This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).
  • ST_NumInteriorRings - Devuelva el número de anillos interiores de una geometría poligonal. Descripción Devuelve el número de anillos interiores de una geometría poligonal. Devuelve NULL si la geometría no es un polígono. This method implements the SQL/MM specification. SQL-MM 3: 8.2.5 Cambiado: 2.0.0 - En versiones anteriores permitiría pasar un multipolígono, devolviendo el número de anillos interiores de primer polígono.
  • ST_NumPatches - Devuelve el número de caras en una superficie poliédrica. Devolverá nulo para geometrías no poliédricas. Descripción Devuelve el número de caras en una superficie poliédrica. Devolverá nulo para geometrías no poliédricas. Esto es un alias para ST_NumGeometries para admitir nombres MM. Más rápido para usar ST_NumGeometries si no te importa la convención MM. Disponibilidad: 2.0.0 This function supports 3d and will not drop the z-index. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM ISO/IEC 13249-3: 8.5 This function supports Polyhedral surfaces.
  • ST_NumPoints - Devuelve el número de puntos en un valor ST_LineString o ST_CircularString. Descripción Devuelve el número de puntos en un valor ST_LineString o ST_CircularString. Antes de 1.4 sólo funcionaba con cadenas de línea como el estado de especificaciones. A partir de 1.4, esto es un alias para ST_NPoints que devuelve el número de vértices para no sólo las cadenas de línea. Considere el uso de ST_NPoints en su lugar, que es multiuso y funciona con muchos tipos de geometría. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 7.2.4
  • ST_OrderingEquals - Tests if two geometries represent the same geometry and have points in the same directional order Description ST_OrderingEquals compares two geometries and returns t (TRUE) if the geometries are equal and the coordinates are in the same order; otherwise it returns f (FALSE). This function is implemented as per the ArcSDE SQL specification rather than SQL-MM. http://edndoc.esri.com/arcsde/9.1/sql_api/sqlapi3.htm#ST_OrderingEquals This method implements the SQL/MM specification. SQL-MM 3: 5.1.43
  • ST_Overlaps - Tests if two geometries have the same dimension and intersect, but each has at least one point not in the other Description Returns TRUE if geometry A and B "spatially overlap". Two geometries overlap if they have the same dimension, their interiors intersect in that dimension. and each has at least one point inside the other (or equivalently, neither one covers the other). The overlaps relation is symmetric and irreflexive. In mathematical terms: ST_Overlaps(A, B) ⇔ ( dim(A) = dim(B) = dim( Int(A) ⋂ Int(B) )) ∧ (A ⋂ B ≠ A) ∧ (A ⋂ B ≠ B) This function automatically includes a bounding box comparison that makes use of any spatial indexes that are available on the geometries. To avoid index use, use the function _ST_Overlaps. Performed by the GEOS module Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION NOTE: this is the "allowable" version that returns a boolean, not an integer. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.2 // s2.1.13.3 This method implements the SQL/MM specification. SQL-MM 3: 5.1.32
  • ST_PatchN - Devuelve el tipo de geometría del valor de ST_Geometry. Descripción Devuelve la 1 geometría de base n-ésima (cara) si la geometría es un POLYHEDRALSURFACE, POLYHEDRALSURFACEM. De lo contrario, devuelve NULL. Esto devuelve la misma respuesta que ST_GeometryN para las superficies de poliedros. Usar ST_GemoetryN es más rápido. El índice está basado en 1. Si desea extraer todas las geometrías, de una geometría, ST_Dump es más eficiente. Disponibilidad: 2.0.0 This method implements the SQL/MM specification. SQL-MM ISO/IEC 13249-3: 8.5 This function supports 3d and will not drop the z-index. This function supports Polyhedral surfaces.
  • ST_Perimeter - Returns the length of the boundary of a polygonal geometry or geography. Descripción Returns the 2D perimeter of the geometry/geography if it is a ST_Surface, ST_MultiSurface (Polygon, MultiPolygon). 0 is returned for non-areal geometries. For linear geometries use . For geometry types, units for perimeter measures are specified by the spatial reference system of the geometry. For geography types, the calculations are performed using the inverse geodesic problem, where perimeter units are in meters. If PostGIS is compiled with PROJ version 4.8.0 or later, the spheroid is specified by the SRID, otherwise it is exclusive to WGS84. If use_spheroid = false, then calculations will approximate a sphere instead of a spheroid. Currently this is an alias for ST_Perimeter2D, but this may change to support higher dimensions. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.5.1 This method implements the SQL/MM specification. SQL-MM 3: 8.1.3, 9.5.4 Availability 2.0.0: Support for geography was introduced
  • ST_Point - Creates a Point with X, Y and SRID values. Descripción Returns a Point with the given X and Y coordinate values. This is the SQL-MM equivalent for that takes just X and Y. For geodetic coordinates, X is longitude and Y is latitude Enhanced: 3.2.0 srid as an extra optional argument was added. Older installs require combining with ST_SetSRID to mark the srid on the geometry. This method implements the SQL/MM specification. SQL-MM 3: 6.1.2
  • ST_PointFromText - Crea una geometría puntual desde un WKT con el SRID dado. Si no se especifica el SRID por defecto será unknown. Descripción Construye un objeto de punto de PostGIS ST_GEOMETRY de la representación bien conocida del texto de OGC. Si no se da SRID, se omite a desconocido (actualmente 0). Si la geometría no es una representación de punto WKT, devuelve null. Si WKT es totalmente inválido, entonces lanza un error. Hay 2 variantes de la función ST_PointFromText, la primera no toma SRID y devuelve una geometría sin sistema de referencia espacial definido. La segunda toma un id de un sistema de referencia como segundo argumento y devuelve una ST_Geometry que incluye este srid como parte de sus metadatos. El srid debe estar definido en la tabla spatial_ref_sys. Si estas completamente seguro que todas tus geometrias WKT son puntos, no utilices esta función. Es mas lenta que ST_GeomFromText ya que añade algunos pasos de validación. Si estas construyendo puntos desde coordenadas long lat y te interesan mas el rendimiento y la precisión que la conformidad con OGC, utiliza o el alias conforme al OGC. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s3.2.6.2 - la opción SRID es de la suite de conformidad. This method implements the SQL/MM specification. SQL-MM 3: 6.1.8
  • ST_PointFromWKB - Crea una geometría desde un WKB con el SRID dado. Descripción La función ST_PointFromWKB, toma una representación binaria "well-known" de una geometría y un ID de un Sistema de Referencia Espacial (SRID) y crea una instancia del tipo de geometría adecuado - en este caso una geometría POINT. Esta función juega un rol de "Geometry Factory" en SQL. Si no se especifica un SRID, el valor predeterminado es 0. NULL se devuelve si la entrada bytea no representa una geometría de POINT. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s3.2.7.2 This method implements the SQL/MM specification. SQL-MM 3: 6.1.9 This function supports 3d and will not drop the z-index. This method supports Circular Strings and Curves.
  • ST_PointN - Devuelve el número de puntos en un valor ST_LineString o ST_CircularString. Descripción Devuelve el punto enésimo en una sola cadena de línea o cadena de línea circular en la geometría. Los valores negativos se contabilizan hacia atrás desde el final de la cadena de línea, por lo que -1 es el último punto. Devuelve NULL si no hay cadena de línea en la geometría. El índice se basa en 1 como para las especificaciones OGC desde la versión 0.8.0. La indexación hacia atrás (índice negativo) no se encuentra en versiones anteriores de OGC implementado esto como basado en 0 en su lugar. Si desea obtener el punto n-ésimo de cada cadena de línea en una multiple cadena de línea, utilícelo en conjunción con ST_Dump This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 7.2.5, 7.3.5 This function supports 3d and will not drop the z-index. This method supports Circular Strings and Curves. Cambiado: 2.0.0 ya no funciona con una sola geometría multilinestrings. En versiones antiguas de PostGIS -- una sola línea MultiLineString trabajaría felizmente con esta función y regresaría el punto de inicio. En 2.0.0 sólo devuelve NULL como cualquier otro MultiLineString. Cambiado: 2.3.0: indexación negativa disponible (-1 es el último punto)
  • ST_PointOnSurface - Computes a point guaranteed to lie in a polygon, or on a geometry. Descripción Returns a POINT which is guaranteed to lie in the interior of a surface (POLYGON, MULTIPOLYGON, and CURVED POLYGON). In PostGIS this function also works on line and point geometries. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s3.2.14.2 // s3.2.18.2 This method implements the SQL/MM specification. SQL-MM 3: 8.1.5, 9.5.6. The specifications define ST_PointOnSurface for surface geometries only. PostGIS extends the function to support all common geometry types. Other databases (Oracle, DB2, ArcSDE) seem to support this function only for surfaces. SQL Server 2008 supports all common geometry types. This function supports 3d and will not drop the z-index.
  • ST_Polygon - Creates a Polygon from a LineString with a specified SRID. Descripción Returns a polygon built from the given LineString and sets the spatial reference system from the srid. ST_Polygon is similar to Variant 1 with the addition of setting the SRID. , , Esta función no acepta una MULTILINESTRING. Utiliza o para generar una linestring. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 8.3.2 This function supports 3d and will not drop the z-index.
  • ST_PolygonFromText - Hace una geometría desde un WKT con el SRID dado. Si no se da un SRID, el valor predeterminado es 0. Descripción Hace una geometría desde WKT con el SRID dado. Si no se da SRID, el valor predeterminado es 0. Devuelve null si WKT no es un polígono. OGC SPEC 3.2.6.2 - La opción SRID es del paquete de conformidad Si estas completamente seguro que todas tus geometrías WKT son poligonos, no utilices esta función. Es mas lenta que ST_GeomFromText ya que añade algunos pasos de validación adicionales. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s3.2.6.2 This method implements the SQL/MM specification. SQL-MM 3: 8.3.6
  • ST_Relate - Tests if two geometries have a topological relationship matching an Intersection Matrix pattern, or computes their Intersection Matrix Description These functions allow testing and evaluating the spatial (topological) relationship between two geometries, as defined by the Dimensionally Extended 9-Intersection Model (DE-9IM). The DE-9IM is specified as a 9-element matrix indicating the dimension of the intersections between the Interior, Boundary and Exterior of two geometries. It is represented by a 9-character text string using the symbols 'F', '0', '1', '2' (e.g. 'FF1FF0102'). A specific kind of spatial relationship can be tested by matching the intersection matrix to an intersection matrix pattern. Patterns can include the additional symbols 'T' (meaning "intersection is non-empty") and '*' (meaning "any value"). Common spatial relationships are provided by the named functions , , , , , , , , , , and . Using an explicit pattern allows testing multiple conditions of intersects, crosses, etc in one step. It also allows testing spatial relationships which do not have a named spatial relationship function. For example, the relationship "Interior-Intersects" has the DE-9IM pattern T********, which is not evaluated by any named predicate. For more information refer to . Variant 1: Tests if two geometries are spatially related according to the given intersectionMatrixPattern. Unlike most of the named spatial relationship predicates, this does NOT automatically include an index call. The reason is that some relationships are true for geometries which do NOT intersect (e.g. Disjoint). If you are using a relationship pattern that requires intersection, then include the && index call. It is better to use a named relationship function if available, since they automatically use a spatial index where one exists. Also, they may implement performance optimizations which are not available with full relate evalation. Variant 2: Returns the DE-9IM matrix string for the spatial relationship between the two input geometries. The matrix string can be tested for matching a DE-9IM pattern using . Variant 3: Like variant 2, but allows specifying a Boundary Node Rule. A boundary node rule allows finer control over whether the endpoints of MultiLineStrings are considered to lie in the DE-9IM Interior or Boundary. The boundaryNodeRule values are: 1: OGC-Mod2 - line endpoints are in the Boundary if they occur an odd number of times. This is the rule defined by the OGC SFS standard, and is the default for ST_Relate. 2: Endpoint - all endpoints are in the Boundary. 3: MultivalentEndpoint - endpoints are in the Boundary if they occur more than once. In other words, the boundary is all the "attached" or "inner" endpoints (but not the "unattached/outer" ones). 4: MonovalentEndpoint - endpoints are in the Boundary if they occur only once. In other words, the boundary is all the "unattached" or "outer" endpoints. This function is not in the OGC spec, but is implied. see s2.1.13.2 This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.2 // s2.1.13.3 This method implements the SQL/MM specification. SQL-MM 3: 5.1.25 Performed by the GEOS module Enhanced: 2.0.0 - added support for specifying boundary node rule. Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION
  • ST_RemEdgeModFace - Removes an edge, and if the edge separates two faces deletes one face and modifies the other face to cover the space of both. Descripción Removes an edge, and if the removed edge separates two faces deletes one face and modifies the other face to cover the space of both. Preferentially keeps the face on the right, to be consistent with . Returns the id of the face which is preserved. Actualiza todos los bordes unidos y relaciones en consecuencia existentes. Se niega a eliminar un borde que participa en la definición de un TopoGeometry existente. Se niega a sanear dos caras si cualquier TopoGeometry es definido por sólo uno de ellos (y no el otro). Si algún argumento es null, se desconoce el borde dado (debe existir ya en la tabla edge del esquema de topología), el nombre de la topología no es válido entonces se produce un error. Disponibilidad: 2.0 This method implements the SQL/MM specification. SQL-MM: Topo-Geo y Topo-Net 3: Detalles de Rutina: X.3.15
  • ST_RemEdgeNewFace - Elimina un borde y, si el borde eliminado separa dos caras, borra las caras originales y las reemplaza con una nueva cara. Descripción Elimina un borde y, si el borde eliminado separa dos caras, borra las caras originales y las reemplaza con una nueva cara. Devuelve el identificador de una cara creada recientemente o NULL, si no se crea ninguna nueva cara. No se crea ninguna nueva cara cuando el borde eliminado está colgando o aislado o confinado con la cara del universo (posiblemente haciendo que el universo se inunde en la cara del otro lado). Actualiza todos los bordes unidos y relaciones en consecuencia existentes. Se niega a eliminar un borde que participa en la definición de un TopoGeometry existente. Se niega a sanear dos caras si cualquier TopoGeometry es definido por sólo uno de ellos (y no el otro). Si algún argumento es null, se desconoce el borde dado (debe existir ya en la tabla edge del esquema de topología), el nombre de la topología no es válido entonces se produce un error. Disponibilidad: 2.0 This method implements the SQL/MM specification. SQL-MM: Topo-Geo y Topo-Net 3: Detalles de Rutina: X.3.14
  • ST_RemoveIsoEdge - Elimina un borde aislado y devuelve la descripción de la acción. Si el borde no está aislado, se lanza una excepción. Descripción Elimina un borde aislado y devuelve la descripción de la acción. Si el borde no está aislado, se lanza una excepción. Availability: 1.1 This method implements the SQL/MM specification. SQL-MM: Topo-Geo y Topo-Net 3: Detelles de Rutina: X+1.3.3
  • ST_RemoveIsoNode - Elimina un nodo aislado y devuelve la descripción de la acción. Si el nodo no está aislado (es el inicio o el final de un borde), entonces se lanza una excepción. Descripción Elimina un nodo aislado y devuelve la descripción de la acción. Si el nodo no está aislado (es el inicio o el final de un borde), entonces se lanza una excepción. Availability: 1.1 This method implements the SQL/MM specification. SQL-MM: Topo-Geo y Topo-Net 3: Detelles de Rutina: X+1.3.3
  • ST_SRID - Returns the spatial reference identifier for a geometry. Description Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table. spatial_ref_sys table is a table that catalogs all spatial reference systems known to PostGIS and is used for transformations from one spatial reference system to another. So verifying you have the right spatial reference system identifier is important if you plan to ever transform your geometries. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.1 This method implements the SQL/MM specification. SQL-MM 3: 5.1.5 This method supports Circular Strings and Curves.
  • ST_StartPoint - Returns the first point of a LineString. Descripción Devuelve el primer punto de una geometría LINESTRING o CIRCULARLINESTRING como un POINT o NULL si el parámetro de entrada no es un LINESTRING o CIRCULARLINESTRING. This method implements the SQL/MM specification. SQL-MM 3: 7.1.3 This function supports 3d and will not drop the z-index. This method supports Circular Strings and Curves. Enhanced: 3.2.0 returns a point for all geometries. Prior behavior returns NULLs if input was not a LineString. Cambiado: 2.0.0 ya no funciona con multilinestrings de geometrías simples. En versiones anteriores de PostGIS -- una linea simple multilinestring funciona sin problemas con esta función y devuelve el punto inicial. En la version 2.0.0 simplemente devuelve NULL como con cualquier multilinestring. La antigua version era una función sin documentar, pero la gente que asumía que tenia sus datos almacenados en LINESTRING pueden experimentar este comportamiento ahora de resultado NULL en la version 2.0.
  • ST_SymDifference - Computes a geometry representing the portions of geometries A and B that do not intersect. Description Returns a geometry representing the portions of geonetries A and B that do not intersect. This is equivalent to ST_Union(A,B) - ST_Intersection(A,B). It is called a symmetric difference because ST_SymDifference(A,B) = ST_SymDifference(B,A). If the optional gridSize parameter is given (GEOS-3.9.0 or higher required), all result vertices are guaranteed to fall on a grid of the specified size. For the operation to give predictable results all the input vertices must fall already on the specified grid, see . Performed by the GEOS module Enhanced: 3.1.0 accept a gridSize parameter. Requires GEOS >= 3.9.0 to use the gridSize parameter This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.3 This method implements the SQL/MM specification. SQL-MM 3: 5.1.21 This function supports 3d and will not drop the z-index. However, the result is computed using XY only. The result Z values are copied, averaged or interpolated.
  • ST_Touches - Tests if two geometries have at least one point in common, but their interiors do not intersect Description Returns TRUE if A and B intersect, but their interiors do not intersect. Equivalently, A and B have at least one point in common, and the common points lie in at least one boundary. For Point/Point inputs the relationship is always FALSE, since points do not have a boundary. In mathematical terms: ST_Touches(A, B) ⇔ (Int(A) ⋂ Int(B) ≠ ∅) ∧ (A ⋂ B ≠ ∅) This relationship holds if the DE-9IM Intersection Matrix for the two geometries matches one of: FT******* F**T***** F***T**** This function automatically includes a bounding box comparison that makes use of any spatial indexes that are available on the geometries. To avoid using an index, use _ST_Touches instead. Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.2 // s2.1.13.3 This method implements the SQL/MM specification. SQL-MM 3: 5.1.28
  • ST_Transform - Return a new geometry with coordinates transformed to a different spatial reference system. Description Returns a new geometry with its coordinates transformed to a different spatial reference system. The destination spatial reference to_srid may be identified by a valid SRID integer parameter (i.e. it must exist in the spatial_ref_sys table). Alternatively, a spatial reference defined as a PROJ.4 string can be used for to_proj and/or from_proj, however these methods are not optimized. If the destination spatial reference system is expressed with a PROJ.4 string instead of an SRID, the SRID of the output geometry will be set to zero. With the exception of functions with from_proj, input geometries must have a defined SRID. ST_Transform is often confused with . ST_Transform actually changes the coordinates of a geometry from one spatial reference system to another, while ST_SetSRID() simply changes the SRID identifier of the geometry. ST_Transform automatically selects a suitable conversion pipeline given the source and target spatial reference systems. To use a specific conversion method, use . Requires PostGIS be compiled with PROJ support. Use to confirm you have PROJ support compiled in. If using more than one transformation, it is useful to have a functional index on the commonly used transformations to take advantage of index usage. Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+ Enhanced: 2.0.0 support for Polyhedral surfaces was introduced. Enhanced: 2.3.0 support for direct PROJ.4 text was introduced. This method implements the SQL/MM specification. SQL-MM 3: 5.1.6 This method supports Circular Strings and Curves. This function supports Polyhedral surfaces.
  • ST_Union - Computes a geometry representing the point-set union of the input geometries. Description Unions the input geometries, merging geometry to produce a result geometry with no overlaps. The output may be an atomic geometry, a MultiGeometry, or a Geometry Collection. Comes in several variants: Two-input variant: returns a geometry that is the union of two input geometries. If either input is NULL, then NULL is returned. Array variant: returns a geometry that is the union of an array of geometries. Aggregate variant: returns a geometry that is the union of a rowset of geometries. The ST_Union() function is an "aggregate" function in the terminology of PostgreSQL. That means that it operates on rows of data, in the same way the SUM() and AVG() functions do and like most aggregates, it also ignores NULL geometries. See for a non-aggregate, single-input variant. The ST_Union array and set variants use the fast Cascaded Union algorithm described in http://blog.cleverelephant.ca/2009/01/must-faster-unions-in-postgis-14.html If the optional gridSize parameter is given (GEOS-3.9.0 or higher required), all result vertices are guaranteed to fall on a grid of the specified size. For the operation to give predictable results all the input vertices must fall already on the specified grid, see . may sometimes be used in place of ST_Union, if the result is not required to be non-overlapping. ST_Collect is usually faster than ST_Union because it performs no processing on the collected geometries. Performed by the GEOS module. ST_Union creates MultiLineString and does not sew LineStrings into a single LineString. Use to sew LineStrings. NOTE: this function was formerly called GeomUnion(), which was renamed from "Union" because UNION is an SQL reserved word. Enhanced: 3.1.0 accept a gridSize parameter. Requires GEOS >= 3.9.0 to use the gridSize parameter Changed: 3.0.0 does not depend on SFCGAL. Availability: 1.4.0 - ST_Union was enhanced. ST_Union(geomarray) was introduced and also faster aggregate collection in PostgreSQL. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.3 Aggregate version is not explicitly defined in OGC SPEC. This method implements the SQL/MM specification. SQL-MM 3: 5.1.19 the z-index (elevation) when polygons are involved. This function supports 3d and will not drop the z-index. However, the result is computed using XY only. The result Z values are copied, averaged or interpolated.
  • ST_Volume - Computes the volume of a 3D solid. If applied to surface (even closed) geometries will return 0. Descripción Disponibilidad: 2.2.0 This method needs SFCGAL backend. This function supports 3d and will not drop the z-index. This function supports Polyhedral surfaces. This function supports Triangles and Triangulated Irregular Network Surfaces (TIN). This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 9.1 (same as ST_3DVolume)
  • ST_WKBToSQL - Devuelve un valor especifico de ST_Geometry desde una representación "Well-Known Binary" (WKB). Es un alias para ST_GeomFromWKB que no toma srid Descripción This method implements the SQL/MM specification. SQL-MM 3: 5.1.36
  • ST_WKTToSQL - Devuelve un valor especifico de ST_Geometry desde una representación "Well-Known Text" (WKT). Es un alias para ST_GeomFromText Descripción This method implements the SQL/MM specification. SQL-MM 3: 5.1.34
  • ST_Within - Tests if every point of A lies in B, and their interiors have a point in common Description Returns TRUE if geometry A is within geometry B. A is within B if and only if all points of A lie inside (i.e. in the interior or boundary of) B (or equivalently, no points of A lie in the exterior of B), and the interiors of A and B have at least one point in common. For this function to make sense, the source geometries must both be of the same coordinate projection, having the same SRID. In mathematical terms: ST_Within(A, B) ⇔ (A ⋂ B = A) ∧ (Int(A) ⋂ Int(B) ≠ ∅) The within relation is reflexive: every geometry is within itself. The relation is antisymmetric: if ST_Within(A,B) = true and ST_Within(B,A) = true, then the two geometries must be topologically equal (ST_Equals(A,B) = true). ST_Within is the converse of . So, ST_Within(A,B) = ST_Contains(B,A). Because the interiors must have a common point, a subtlety of the definition is that lines and points lying fully in the boundary of polygons or lines are not within the geometry. For further details see Subtleties of OGC Covers, Contains, Within. The predicate provides a more inclusive relationship. This function automatically includes a bounding box comparison that makes use of any spatial indexes that are available on the geometries. To avoid index use, use the function _ST_Within. Performed by the GEOS module Enhanced: 2.3.0 Enhancement to PIP short-circuit for geometry extended to support MultiPoints with few points. Prior versions only supported point in polygon. Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Do not use this function with invalid geometries. You will get unexpected results. NOTE: this is the "allowable" version that returns a boolean, not an integer. This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.2 // s2.1.13.3 - a.Relate(b, 'T*F**F***') This method implements the SQL/MM specification. SQL-MM 3: 5.1.30
  • ST_X - Returns the X coordinate of a Point. Descripción Devuelve la coordenada X del punto, o NULL si no está disponible. La entrada debe ser un punto. To get the minimum and maximum X value of geometry coordinates use the functions and . This method implements the SQL/MM specification. SQL-MM 3: 6.1.3 This function supports 3d and will not drop the z-index.
  • ST_Y - Returns the Y coordinate of a Point. Descripción Devuelve la coordenada Y del punto, o NULL si no está disponible. La entrada debe ser un punto. To get the minimum and maximum Y value of geometry coordinates use the functions and . This method implements the OGC Simple Features Implementation Specification for SQL 1.1. This method implements the SQL/MM specification. SQL-MM 3: 6.1.4 This function supports 3d and will not drop the z-index.
  • ST_Z - Returns the Z coordinate of a Point. Descripción Devuelve la coordenada Z del punto, o NULL si no está disponible. La entrada debe ser un punto. To get the minimum and maximum Z value of geometry coordinates use the functions and . This method implements the SQL/MM specification. This function supports 3d and will not drop the z-index.
  • TG_ST_SRID - Returns the spatial reference identifier for a topogeometry. Descripción Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table. spatial_ref_sys table is a table that catalogs all spatial reference systems known to PostGIS and is used for transformations from one spatial reference system to another. So verifying you have the right spatial reference system identifier is important if you plan to ever transform your geometries. Availability: 3.2.0 This method implements the SQL/MM specification. SQL-MM 3: 14.1.5

12.4. PostGIS Geography Support Functions

The functions and operators given below are PostGIS functions/operators that take as input or return as output a geography data type object.

[Note]

Functions with a (T) are not native geodetic functions, and use a ST_Transform call to and from geometry to do the operation. As a result, they may not behave as expected when going over dateline, poles, and for large geometries or geometry pairs that cover more than one UTM zone. Basic transform - (favoring UTM, Lambert Azimuthal (North/South), and falling back on mercator in worst case scenario)

  • ST_Area - Returns the area of a polygonal geometry.
  • ST_AsBinary - Return the OGC/ISO Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
  • ST_AsEWKT - Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.
  • ST_AsGML - Return the geometry as a GML version 2 or 3 element.
  • ST_AsGeoJSON - Return a geometry as a GeoJSON element.
  • ST_AsKML - Return the geometry as a KML element.
  • ST_AsSVG - Returns SVG path data for a geometry.
  • ST_AsText - Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.
  • ST_Azimuth - Returns the north-based azimuth of a line between two points.
  • ST_Buffer - Computes a geometry covering all points within a given distance from a geometry.
  • ST_Centroid - Returns the geometric center of a geometry.
  • ST_ClosestPoint - Returns the 2D point on g1 that is closest to g2. This is the first point of the shortest line from one geometry to the other.
  • ST_CoveredBy - Tests if every point of A lies in B
  • ST_Covers - Tests if every point of B lies in A
  • ST_DWithin - Tests if two geometries are within a given distance
  • ST_Distance - Returns the distance between two geometry or geography values.
  • ST_GeogFromText - Devuelve un valor especifico "geography" desde una representación "Well-Known Text" (WKT) o extendida.
  • ST_GeogFromWKB - Crea una instancia "geography" desde la representación de una geometría en "Well-Known Binary" (WKB) o "Extended Well-Known Binary" (EWKB).
  • ST_GeographyFromText - Devuelve un valor especifico "geography" desde una representación "Well-Known Text" (WKT) o extendida.
  • = - Returns TRUE if the coordinates and coordinate order geometry/geography A are the same as the coordinates and coordinate order of geometry/geography B.
  • ST_Intersection - Computes a geometry representing the shared portion of geometries A and B.
  • ST_Intersects - Tests if two geometries intersect (they have at least one point in common)
  • ST_Length - Returns the 2D length of a linear geometry.
  • ST_LineInterpolatePoint - Returns a point interpolated along a line at a fractional location.
  • ST_LineInterpolatePoints - Returns points interpolated along a line at a fractional interval.
  • ST_LineLocatePoint - Returns the fractional location of the closest point on a line to a point.
  • ST_LineSubstring - Returns the part of a line between two fractional locations.
  • ST_Perimeter - Returns the length of the boundary of a polygonal geometry or geography.
  • ST_Project - Returns a point projected from a start point by a distance and bearing (azimuth).
  • ST_Segmentize - Returns a modified geometry/geography having no segment longer than a given distance.
  • ST_ShortestLine - Returns the 2D shortest line between two geometries
  • ST_Summary - Devuelve un resumen de texto del contenido de la geometría.
  • <-> - Returns the 2D distance between A and B.
  • && - Returns TRUE if A's 2D bounding box intersects B's 2D bounding box.

12.5. PostGIS Raster Support Functions

The functions and operators given below are PostGIS functions/operators that take as input or return as output a raster data type object. Listed in alphabetical order.

  • Box3D - Returns the box 3d representation of the enclosing box of the raster.
  • @ - Returns TRUE if A's bounding box is contained by B's. Uses double precision bounding box.
  • ~ - Returns TRUE if A's bounding box is contains B's. Uses double precision bounding box.
  • = - Returns TRUE if A's bounding box is the same as B's. Uses double precision bounding box.
  • && - Returns TRUE if A's bounding box intersects B's bounding box.
  • &< - Returns TRUE if A's bounding box is to the left of B's.
  • &> - Returns TRUE if A's bounding box is to the right of B's.
  • ~= - Returns TRUE if A's bounding box is the same as B's.
  • ST_Retile - Return a set of configured tiles from an arbitrarily tiled raster coverage.
  • ST_AddBand - Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end.
  • ST_AsBinary/ST_AsWKB - Return the Well-Known Binary (WKB) representation of the raster.
  • ST_AsGDALRaster - Return the raster tile in the designated GDAL Raster format. Raster formats are one of those supported by your compiled library. Use ST_GDALDrivers() to get a list of formats supported by your library.
  • ST_AsHexWKB - Return the Well-Known Binary (WKB) in Hex representation of the raster.
  • ST_AsJPEG - Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.
  • ST_AsPNG - Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are specified, then all bands are used. If more 2 or more than 4 bands and no bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA space.
  • ST_AsRaster - Converts a PostGIS geometry to a PostGIS raster.
  • ST_AsTIFF - Return the raster selected bands as a single TIFF image (byte array). If no band is specified or any of specified bands does not exist in the raster, then will try to use all bands.
  • ST_Aspect - Returns the aspect (in degrees by default) of an elevation raster band. Useful for analyzing terrain.
  • ST_Band - Returns one or more bands of an existing raster as a new raster. Useful for building new rasters from existing rasters.
  • ST_BandFileSize - Returns the file size of a band stored in file system. If no bandnum specified, 1 is assumed.
  • ST_BandFileTimestamp - Returns the file timestamp of a band stored in file system. If no bandnum specified, 1 is assumed.
  • ST_BandIsNoData - Returns true if the band is filled with only nodata values.
  • ST_BandMetaData - Returns basic meta data for a specific raster band. band num 1 is assumed if none-specified.
  • ST_BandNoDataValue - Returns the value in a given band that represents no data. If no band num 1 is assumed.
  • ST_BandPath - Returns system file path to a band stored in file system. If no bandnum specified, 1 is assumed.
  • ST_BandPixelType - Returns the type of pixel for given band. If no bandnum specified, 1 is assumed.
  • ST_Clip - Returns the raster clipped by the input geometry. If band number not is specified, all bands are processed. If crop is not specified or TRUE, the output raster is cropped.
  • ST_ColorMap - Creates a new raster of up to four 8BUI bands (grayscale, RGB, RGBA) from the source raster and a specified band. Band 1 is assumed if not specified.
  • ST_Contains - Return true if no points of raster rastB lie in the exterior of raster rastA and at least one point of the interior of rastB lies in the interior of rastA.
  • ST_ContainsProperly - Return true if rastB intersects the interior of rastA but not the boundary or exterior of rastA.
  • ST_Contour - Generates a set of vector contours from the provided raster band, using the GDAL contouring algorithm.
  • ST_ConvexHull - Return the convex hull geometry of the raster including pixel values equal to BandNoDataValue. For regular shaped and non-skewed rasters, this gives the same result as ST_Envelope so only useful for irregularly shaped or skewed rasters.
  • ST_Count - Returns the number of pixels in a given band of a raster or raster coverage. If no band is specified defaults to band 1. If exclude_nodata_value is set to true, will only count pixels that are not equal to the nodata value.
  • ST_CountAgg - Aggregate. Returns the number of pixels in a given band of a set of rasters. If no band is specified defaults to band 1. If exclude_nodata_value is set to true, will only count pixels that are not equal to the NODATA value.
  • ST_CoveredBy - Return true if no points of raster rastA lie outside raster rastB.
  • ST_Covers - Return true if no points of raster rastB lie outside raster rastA.
  • ST_DFullyWithin - Return true if rasters rastA and rastB are fully within the specified distance of each other.
  • ST_DWithin - Return true if rasters rastA and rastB are within the specified distance of each other.
  • ST_Disjoint - Return true if raster rastA does not spatially intersect rastB.
  • ST_DumpAsPolygons - Returns a set of geomval (geom,val) rows, from a given raster band. If no band number is specified, band num defaults to 1.
  • ST_DumpValues - Get the values of the specified band as a 2-dimension array.
  • ST_Envelope - Returns the polygon representation of the extent of the raster.
  • ST_FromGDALRaster - Returns a raster from a supported GDAL raster file.
  • ST_GeoReference - Returns the georeference meta data in GDAL or ESRI format as commonly seen in a world file. Default is GDAL.
  • ST_Grayscale - Creates a new one-8BUI band raster from the source raster and specified bands representing Red, Green and Blue
  • ST_HasNoBand - Returns true if there is no band with given band number. If no band number is specified, then band number 1 is assumed.
  • ST_Height - Returns the height of the raster in pixels.
  • ST_HillShade - Returns the hypothetical illumination of an elevation raster band using provided azimuth, altitude, brightness and scale inputs.
  • ST_Histogram - Returns a set of record summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.
  • ST_InterpolateRaster - Interpolates a gridded surface based on an input set of 3-d points, using the X- and Y-values to position the points on the grid and the Z-value of the points as the surface elevation.
  • ST_Intersection - Returns a raster or a set of geometry-pixelvalue pairs representing the shared portion of two rasters or the geometrical intersection of a vectorization of the raster and a geometry.
  • ST_Intersects - Return true if raster rastA spatially intersects raster rastB.
  • ST_IsEmpty - Returns true if the raster is empty (width = 0 and height = 0). Otherwise, returns false.
  • ST_MakeEmptyCoverage - Cover georeferenced area with a grid of empty raster tiles.
  • ST_MakeEmptyRaster - Returns an empty raster (having no bands) of given dimensions (width & height), upperleft X and Y, pixel size and rotation (scalex, scaley, skewx & skewy) and reference system (srid). If a raster is passed in, returns a new raster with the same size, alignment and SRID. If srid is left out, the spatial ref is set to unknown (0).
  • ST_MapAlgebra (callback function version) - Callback function version - Returns a one-band raster given one or more input rasters, band indexes and one user-specified callback function.
  • ST_MapAlgebraExpr - 1 raster band version: Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation on the input raster band and of pixeltype provided. Band 1 is assumed if no band is specified.
  • ST_MapAlgebraExpr - 2 raster band version: Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation on the two input raster bands and of pixeltype provided. band 1 of each raster is assumed if no band numbers are specified. The resulting raster will be aligned (scale, skew and pixel corners) on the grid defined by the first raster and have its extent defined by the "extenttype" parameter. Values for "extenttype" can be: INTERSECTION, UNION, FIRST, SECOND.
  • ST_MapAlgebraFct - 1 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the input raster band and of pixeltype prodived. Band 1 is assumed if no band is specified.
  • ST_MapAlgebraFct - 2 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the 2 input raster bands and of pixeltype prodived. Band 1 is assumed if no band is specified. Extent type defaults to INTERSECTION if not specified.
  • ST_MapAlgebraFctNgb - 1-band version: Map Algebra Nearest Neighbor using user-defined PostgreSQL function. Return a raster which values are the result of a PLPGSQL user function involving a neighborhood of values from the input raster band.
  • ST_MapAlgebra (expression version) - Expression version - Returns a one-band raster given one or two input rasters, band indexes and one or more user-specified SQL expressions.
  • ST_MemSize - Returns the amount of space (in bytes) the raster takes.
  • ST_MetaData - Returns basic meta data about a raster object such as pixel size, rotation (skew), upper, lower left, etc.
  • ST_MinConvexHull - Return the convex hull geometry of the raster excluding NODATA pixels.
  • ST_NearestValue - Returns the nearest non-NODATA value of a given band's pixel specified by a columnx and rowy or a geometric point expressed in the same spatial reference coordinate system as the raster.
  • ST_Neighborhood - Returns a 2-D double precision array of the non-NODATA values around a given band's pixel specified by either a columnX and rowY or a geometric point expressed in the same spatial reference coordinate system as the raster.
  • ST_NotSameAlignmentReason - Returns text stating if rasters are aligned and if not aligned, a reason why.
  • ST_NumBands - Returns the number of bands in the raster object.
  • ST_Overlaps - Return true if raster rastA and rastB intersect but one does not completely contain the other.
  • ST_PixelAsCentroid - Returns the centroid (point geometry) of the area represented by a pixel.
  • ST_PixelAsCentroids - Returns the centroid (point geometry) for each pixel of a raster band along with the value, the X and the Y raster coordinates of each pixel. The point geometry is the centroid of the area represented by a pixel.
  • ST_PixelAsPoint - Returns a point geometry of the pixel's upper-left corner.
  • ST_PixelAsPoints - Returns a point geometry for each pixel of a raster band along with the value, the X and the Y raster coordinates of each pixel. The coordinates of the point geometry are of the pixel's upper-left corner.
  • ST_PixelAsPolygon - Returns the polygon geometry that bounds the pixel for a particular row and column.
  • ST_PixelAsPolygons - Returns the polygon geometry that bounds every pixel of a raster band along with the value, the X and the Y raster coordinates of each pixel.
  • ST_PixelHeight - Returns the pixel height in geometric units of the spatial reference system.
  • ST_PixelOfValue - Get the columnx, rowy coordinates of the pixel whose value equals the search value.
  • ST_PixelWidth - Returns the pixel width in geometric units of the spatial reference system.
  • ST_Polygon - Returns a multipolygon geometry formed by the union of pixels that have a pixel value that is not no data value. If no band number is specified, band num defaults to 1.
  • ST_Quantile - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the raster's 25%, 50%, 75% percentile.
  • ST_RastFromHexWKB - Return a raster value from a Hex representation of Well-Known Binary (WKB) raster.
  • ST_RastFromWKB - Return a raster value from a Well-Known Binary (WKB) raster.
  • ST_RasterToWorldCoord - Returns the raster's upper left corner as geometric X and Y (longitude and latitude) given a column and row. Column and row starts at 1.
  • ST_RasterToWorldCoordX - Returns the geometric X coordinate upper left of a raster, column and row. Numbering of columns and rows starts at 1.
  • ST_RasterToWorldCoordY - Returns the geometric Y coordinate upper left corner of a raster, column and row. Numbering of columns and rows starts at 1.
  • ST_Reclass - Creates a new raster composed of band types reclassified from original. The nband is the band to be changed. If nband is not specified assumed to be 1. All other bands are returned unchanged. Use case: convert a 16BUI band to a 8BUI and so forth for simpler rendering as viewable formats.
  • ST_Resample - Resample a raster using a specified resampling algorithm, new dimensions, an arbitrary grid corner and a set of raster georeferencing attributes defined or borrowed from another raster.
  • ST_Rescale - Resample a raster by adjusting only its scale (or pixel size). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline, Lanczos, Max or Min resampling algorithm. Default is NearestNeighbor.
  • ST_Resize - Resize a raster to a new width/height
  • ST_Reskew - Resample a raster by adjusting only its skew (or rotation parameters). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.
  • ST_Rotation - Returns the rotation of the raster in radian.
  • ST_Roughness - Returns a raster with the calculated "roughness" of a DEM.
  • ST_SRID - Returns the spatial reference identifier of the raster as defined in spatial_ref_sys table.
  • ST_SameAlignment - Returns true if rasters have same skew, scale, spatial ref, and offset (pixels can be put on same grid without cutting into pixels) and false if they don't with notice detailing issue.
  • ST_ScaleX - Returns the X component of the pixel width in units of coordinate reference system.
  • ST_ScaleY - Returns the Y component of the pixel height in units of coordinate reference system.
  • ST_SetBandIndex - Update the external band number of an out-db band
  • ST_SetBandIsNoData - Sets the isnodata flag of the band to TRUE.
  • ST_SetBandNoDataValue - Sets the value for the given band that represents no data. Band 1 is assumed if no band is specified. To mark a band as having no nodata value, set the nodata value = NULL.
  • ST_SetBandPath - Update the external path and band number of an out-db band
  • ST_SetGeoReference - Set Georeference 6 georeference parameters in a single call. Numbers should be separated by white space. Accepts inputs in GDAL or ESRI format. Default is GDAL.
  • ST_SetM - Returns a geometry with the same X/Y coordinates as the input geometry, and values from the raster copied into the M dimension using the requested resample algorithm.
  • ST_SetRotation - Set the rotation of the raster in radian.
  • ST_SetSRID - Sets the SRID of a raster to a particular integer srid defined in the spatial_ref_sys table.
  • ST_SetScale - Sets the X and Y size of pixels in units of coordinate reference system. Number units/pixel width/height.
  • ST_SetSkew - Sets the georeference X and Y skew (or rotation parameter). If only one is passed in, sets X and Y to the same value.
  • ST_SetUpperLeft - Sets the value of the upper left corner of the pixel of the raster to projected X and Y coordinates.
  • ST_SetValue - Returns modified raster resulting from setting the value of a given band in a given columnx, rowy pixel or the pixels that intersect a particular geometry. Band numbers start at 1 and assumed to be 1 if not specified.
  • ST_SetValues - Returns modified raster resulting from setting the values of a given band.
  • ST_SetZ - Returns a geometry with the same X/Y coordinates as the input geometry, and values from the raster copied into the Z dimension using the requested resample algorithm.
  • ST_SkewX - Returns the georeference X skew (or rotation parameter).
  • ST_SkewY - Returns the georeference Y skew (or rotation parameter).
  • ST_Slope - Returns the slope (in degrees by default) of an elevation raster band. Useful for analyzing terrain.
  • ST_SnapToGrid - Resample a raster by snapping it to a grid. New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.
  • ST_Summary - Returns a text summary of the contents of the raster.
  • ST_SummaryStats - Returns summarystats consisting of count, sum, mean, stddev, min, max for a given raster band of a raster or raster coverage. Band 1 is assumed is no band is specified.
  • ST_SummaryStatsAgg - Aggregate. Returns summarystats consisting of count, sum, mean, stddev, min, max for a given raster band of a set of raster. Band 1 is assumed is no band is specified.
  • ST_TPI - Returns a raster with the calculated Topographic Position Index.
  • ST_TRI - Returns a raster with the calculated Terrain Ruggedness Index.
  • ST_Tile - Returns a set of rasters resulting from the split of the input raster based upon the desired dimensions of the output rasters.
  • ST_Touches - Return true if raster rastA and rastB have at least one point in common but their interiors do not intersect.
  • ST_Transform - Reprojects a raster in a known spatial reference system to another known spatial reference system using specified resampling algorithm. Options are NearestNeighbor, Bilinear, Cubic, CubicSpline, Lanczos defaulting to NearestNeighbor.
  • ST_Union - Returns the union of a set of raster tiles into a single raster composed of 1 or more bands.
  • ST_UpperLeftX - Returns the upper left X coordinate of raster in projected spatial ref.
  • ST_UpperLeftY - Returns the upper left Y coordinate of raster in projected spatial ref.
  • ST_Value - Returns the value of a given band in a given columnx, rowy pixel or at a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified. If exclude_nodata_value is set to false, then all pixels include nodata pixels are considered to intersect and return value. If exclude_nodata_value is not passed in then reads it from metadata of raster.
  • ST_ValueCount - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.
  • ST_Width - Returns the width of the raster in pixels.
  • ST_Within - Return true if no points of raster rastA lie in the exterior of raster rastB and at least one point of the interior of rastA lies in the interior of rastB.
  • ST_WorldToRasterCoord - Returns the upper left corner as column and row given geometric X and Y (longitude and latitude) or a point geometry expressed in the spatial reference coordinate system of the raster.
  • ST_WorldToRasterCoordX - Returns the column in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.
  • ST_WorldToRasterCoordY - Returns the row in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.
  • UpdateRasterSRID - Change the SRID of all rasters in the user-specified column and table.

12.6. PostGIS Geometry / Geography / Raster Dump Functions

The functions given below are PostGIS functions that take as input or return as output a set of or single geometry_dump or geomval data type object.

  • ST_DumpAsPolygons - Returns a set of geomval (geom,val) rows, from a given raster band. If no band number is specified, band num defaults to 1.
  • ST_Intersection - Returns a raster or a set of geometry-pixelvalue pairs representing the shared portion of two rasters or the geometrical intersection of a vectorization of the raster and a geometry.

12.7. PostGIS Box Functions

The functions given below are PostGIS functions that take as input or return as output the box* family of PostGIS spatial types. The box family of types consists of box2d, and box3d

  • Box2D - Returns a BOX2D representing the 2D extent of a geometry.
  • Box3D - Returns a BOX3D representing the 3D extent of a geometry.
  • Box3D - Returns the box 3d representation of the enclosing box of the raster.
  • ST_3DExtent - Aggregate function that returns the 3D bounding box of geometries.
  • ST_3DMakeBox - Creates a BOX3D defined by two 3D point geometries.
  • ST_AsMVTGeom - Transforms a geometry into the coordinate space of a MVT tile.
  • ST_AsTWKB - Returns the geometry as TWKB, aka "Tiny Well-Known Binary"
  • ST_Box2dFromGeoHash - Devuelve un BOX2D de una cadena de GeoHash.
  • ST_ClipByBox2D - Computes the portion of a geometry falling within a rectangle.
  • ST_EstimatedExtent - Returns the estimated extent of a spatial table.
  • ST_Expand - Returns a bounding box expanded from another bounding box or a geometry.
  • ST_Extent - Aggregate function that returns the bounding box of geometries.
  • ST_MakeBox2D - Creates a BOX2D defined by two 2D point geometries.
  • ST_XMax - Returns the X maxima of a 2D or 3D bounding box or a geometry.
  • ST_XMin - Returns the X minima of a 2D or 3D bounding box or a geometry.
  • ST_YMax - Returns the Y maxima of a 2D or 3D bounding box or a geometry.
  • ST_YMin - Returns the Y minima of a 2D or 3D bounding box or a geometry.
  • ST_ZMax - Returns the Z maxima of a 2D or 3D bounding box or a geometry.
  • ST_ZMin - Returns the Z minima of a 2D or 3D bounding box or a geometry.
  • RemoveUnusedPrimitives - Removes topology primitives which not needed to define existing TopoGeometry objects.
  • ValidateTopology - Devuelve un conjunto de objetos validatetopology_returntype que detallan problemas con la topología.
  • ~(box2df,box2df) - Returns TRUE if a 2D float precision bounding box (BOX2DF) contains another 2D float precision bounding box (BOX2DF).
  • ~(box2df,geometry) - Returns TRUE if a 2D float precision bounding box (BOX2DF) contains a geometry's 2D bonding box.
  • ~(geometry,box2df) - Returns TRUE if a geometry's 2D bonding box contains a 2D float precision bounding box (GIDX).
  • @(box2df,box2df) - Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into another 2D float precision bounding box.
  • @(box2df,geometry) - Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into a geometry's 2D bounding box.
  • @(geometry,box2df) - Returns TRUE if a geometry's 2D bounding box is contained into a 2D float precision bounding box (BOX2DF).
  • &&(box2df,box2df) - Returns TRUE if two 2D float precision bounding boxes (BOX2DF) intersect each other.
  • &&(box2df,geometry) - Returns TRUE if a 2D float precision bounding box (BOX2DF) intersects a geometry's (cached) 2D bounding box.
  • &&(geometry,box2df) - Returns TRUE if a geometry's (cached) 2D bounding box intersects a 2D float precision bounding box (BOX2DF).

12.8. PostGIS Functions that support 3D

The functions given below are PostGIS functions that do not throw away the Z-Index.

  • AddGeometryColumn - Suprime una columna de geometrías de una tabla espacial.
  • Box3D - Returns a BOX3D representing the 3D extent of a geometry.
  • DropGeometryColumn - Suprime una columna de geometrías de una tabla espacial.
  • GeometryType - Devuelve el tipo de geometría del valor de ST_Geometry.
  • ST_3DArea - Computes area of 3D surface geometries. Will return 0 for solids.
  • ST_3DClosestPoint - Returns the 3D point on g1 that is closest to g2. This is the first point of the 3D shortest line.
  • ST_3DConvexHull - Computes the 3D convex hull of a geometry.
  • ST_3DDFullyWithin - Tests if two 3D geometries are entirely within a given 3D distance
  • ST_3DDWithin - Tests if two 3D geometries are within a given 3D distance
  • ST_3DDifference - Perform 3D difference
  • ST_3DDistance - Returns the 3D cartesian minimum distance (based on spatial ref) between two geometries in projected units.
  • ST_3DExtent - Aggregate function that returns the 3D bounding box of geometries.
  • ST_3DIntersection - Perform 3D intersection
  • ST_3DIntersects - Tests if two geometries spatially intersect in 3D - only for points, linestrings, polygons, polyhedral surface (area)
  • ST_3DLength - Returns the 3D length of a linear geometry.
  • ST_3DLineInterpolatePoint - Returns a point interpolated along a 3D line at a fractional location.
  • ST_3DLongestLine - Returns the 3D longest line between two geometries
  • ST_3DMaxDistance - Returns the 3D cartesian maximum distance (based on spatial ref) between two geometries in projected units.
  • ST_3DPerimeter - Returns the 3D perimeter of a polygonal geometry.
  • ST_3DShortestLine - Returns the 3D shortest line between two geometries
  • ST_3DUnion - Perform 3D union.
  • ST_AddMeasure - Interpolates measures along a linear geometry.
  • ST_AddPoint - Añade un punto a una cadena de línea.
  • ST_Affine - Apply a 3D affine transformation to a geometry.
  • ST_ApproximateMedialAxis - Compute the approximate medial axis of an areal geometry.
  • ST_AsBinary - Return the OGC/ISO Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
  • ST_AsEWKB - Return the Extended Well-Known Binary (EWKB) representation of the geometry with SRID meta data.
  • ST_AsEWKT - Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.
  • ST_AsGML - Return the geometry as a GML version 2 or 3 element.
  • ST_AsGeoJSON - Return a geometry as a GeoJSON element.
  • ST_AsHEXEWKB - Returns a Geometry in HEXEWKB format (as text) using either little-endian (NDR) or big-endian (XDR) encoding.
  • ST_AsKML - Return the geometry as a KML element.
  • ST_AsX3D - Returns a Geometry in X3D xml node element format: ISO-IEC-19776-1.2-X3DEncodings-XML
  • ST_Boundary - Devuelve el cierre del limite combinatorio de esta geometría.
  • ST_BoundingDiagonal - Devuelve la diagonal del cuadro delimitador de la geometría suministrada.
  • ST_CPAWithin - Tests if the closest point of approach of two trajectories is within the specified distance.
  • ST_ChaikinSmoothing - Returns a smoothed version of a geometry, using the Chaikin algorithm
  • ST_ClosestPointOfApproach - Returns a measure at the closest point of approach of two trajectories.
  • ST_Collect - Creates a GeometryCollection or Multi* geometry from a set of geometries.
  • ST_ConstrainedDelaunayTriangles - Return a constrained Delaunay triangulation around the given input geometry.
  • ST_ConvexHull - Computes the convex hull of a geometry.
  • ST_CoordDim - Devuelve la dimensión de las coordenadas del valor de ST_Geometry.
  • ST_CurveToLine - Converts a geometry containing curves to a linear geometry.
  • ST_DelaunayTriangles - Returns the Delaunay triangulation of the vertices of a geometry.
  • ST_Difference - Computes a geometry representing the part of geometry A that does not intersect geometry B.
  • ST_DistanceCPA - Returns the distance between the closest point of approach of two trajectories.
  • ST_Dump - Returns a set of geometry_dump rows for the components of a geometry.
  • ST_DumpPoints - Devuelve un resumen de texto del contenido de la geometría.
  • ST_DumpRings - Returns a set of geometry_dump rows for the exterior and interior rings of a Polygon.
  • ST_DumpSegments - Devuelve un resumen de texto del contenido de la geometría.
  • ST_EndPoint - Devuelve el número de puntos en un valor ST_LineString o ST_CircularString.
  • ST_ExteriorRing - Devuelva el número de anillos interiores de una geometría poligonal.
  • ST_Extrude - Extrude a surface to a related volume
  • ST_FlipCoordinates - Returns a version of a geometry with X and Y axis flipped.
  • ST_Force2D - Forzar las geometrías en un "modo de 2 dimensiones".
  • ST_ForceCurve - Relanzar una geometría en su tipo curvo, si corresponde.
  • ST_ForceLHR - Force LHR orientation
  • ST_ForcePolygonCCW - Orienta todos los aros exteriores en sentido contrario a las agujas del reloj y todos los aros interiores en sentido horario.
  • ST_ForcePolygonCW - Orienta todos los anillos exteriores en el sentido de las agujas del reloj y todos los anillos interiores en sentido contrario a las agujas del reloj.
  • ST_ForceRHR - Fuerza la orientación de los vértices en un polígono para seguir la regla de la mano derecha.
  • ST_ForceSFS - Fuerza las geometrías para usar sólo los tipos de geometría SFS 1.1.
  • ST_Force_3D - Forzar las geometrías en modo XYZ. Este es un alias para ST_Force3DZ.
  • ST_Force_3DZ - Fuerza las geometrías en modo XYZ.
  • ST_Force_4D - Fuerza las geometrías en modo XYZM.
  • ST_Force_Collection - Convertir la geometría en una GEOMETRYCOLLECTION.
  • ST_GeomFromEWKB - Devuelve un valor especifico de ST_Geometry desde una representación " Extended Well-Known Binary" (EWKB).
  • ST_GeomFromEWKT - Devuelve un valor especificado ST_Geometry desde una representación "Extended Well-Known Text" (EWKT).
  • ST_GeomFromGML - Toma una representación GML como entrada de una geometría y extrae un objeto geométrico PostGIS
  • ST_GeomFromGeoJSON - Toma como entrada una representación geojson de una geometría y devuelve un objeto geométrico PostGIS
  • ST_GeomFromKML - Toma una representación de una geometría KML de entrada y devuelve un objeto geométrico PostGIS
  • ST_GeometricMedian - Returns the geometric median of a MultiPoint.
  • ST_GeometryN - Devuelve el tipo de geometría del valor de ST_Geometry.
  • ST_GeometryType - Devuelve el tipo de geometría del valor de ST_Geometry.
  • ST_HasArc - Tests if a geometry contains a circular arc
  • ST_InteriorRingN - Devuelva el número de anillos interiores de una geometría poligonal.
  • ST_InterpolatePoint - Devuelve el valor de la dimensión medida de una geometría en el punto cerrado al punto proporcionado.
  • ST_Intersection - Computes a geometry representing the shared portion of geometries A and B.
  • ST_IsClosed - Devuelve TRUE si los puntos de inicio y final de una LINESTRINGson coincidentes. Para superficies poliedricas si son cerradas (volumetricas).
  • ST_IsCollection - Devuelve True si la Geometría es una colección vacía, polígono vacio, punto vacío etc.
  • ST_IsPlanar - Check if a surface is or not planar
  • ST_IsPolygonCCW - Devuelve true si todos los aros exteriores están orientados hacia la izquierda y todos los aros interiores están orientados hacia la derecha.
  • ST_IsPolygonCW - Devuelve true si todos los aros exteriores están orientados hacia la derecha y todos los aros interiores están orientados en sentido contrario a las agujas del reloj.
  • ST_IsSimple - Devuelve (TRUE) si la geometría no tiene puntos geométricos anómalos, como auto intersecciones o tangencias.
  • ST_IsSolid - Test if the geometry is a solid. No validity check is performed.
  • ST_IsValidTrajectory - Tests if the geometry is a valid trajectory.
  • ST_Length_Spheroid - Returns the 2D or 3D length/perimeter of a lon/lat geometry on a spheroid.
  • ST_LineFromMultiPoint - Crea una LineString desde una geometría MultiPoint.
  • ST_LineInterpolatePoint - Returns a point interpolated along a line at a fractional location.
  • ST_LineInterpolatePoints - Returns points interpolated along a line at a fractional interval.
  • ST_LineSubstring - Returns the part of a line between two fractional locations.
  • ST_LineToCurve - Converts a linear geometry to a curved geometry.
  • ST_LocateBetweenElevations - Returns the portions of a geometry that lie in an elevation (Z) range.
  • ST_M - Returns the M coordinate of a Point.
  • ST_MakeLine - Crea una cadena de línea desde geometrías de punto, multipunto o de línea.
  • ST_MakePoint - Creates a 2D, 3DZ or 4D Point.
  • ST_MakePolygon - Creates a Polygon from a shell and optional list of holes.
  • ST_MakeSolid - Cast the geometry into a solid. No check is performed. To obtain a valid solid, the input geometry must be a closed Polyhedral Surface or a closed TIN.
  • ST_MakeValid - Attempts to make an invalid geometry valid without losing vertices.
  • ST_MemSize - Devuelve el tipo de geometría del valor de ST_Geometry.
  • ST_MemUnion - Aggregate function which unions geometries in a memory-efficent but slower way
  • ST_NDims - Devuelve la dimensión de las coordenadas del valor de ST_Geometry.
  • ST_NPoints - Devuelve el numero de puntos (vértices) en la geometría.
  • ST_NRings - Devuelva el número de anillos interiores de una geometría poligonal.
  • ST_Node - Nodes a collection of lines.
  • ST_NumGeometries - Devuelve el numero de puntos en la geometría. Funciona con todas las geometrías.
  • ST_NumPatches - Devuelve el número de caras en una superficie poliédrica. Devolverá nulo para geometrías no poliédricas.
  • ST_Orientation - Determine surface orientation
  • ST_PatchN - Devuelve el tipo de geometría del valor de ST_Geometry.
  • ST_PointFromWKB - Crea una geometría desde un WKB con el SRID dado.
  • ST_PointN - Devuelve el número de puntos en un valor ST_LineString o ST_CircularString.
  • ST_PointOnSurface - Computes a point guaranteed to lie in a polygon, or on a geometry.
  • ST_Points - Devuelve un MultiPoint que contiene todas las coordenadas de una geometría.
  • ST_Polygon - Creates a Polygon from a LineString with a specified SRID.
  • ST_RemovePoint - Remove a point from a linestring.
  • ST_RemoveRepeatedPoints - Returns a version of a geometry with duplicate points removed.
  • ST_Reverse - Devuelve la geometría con el orden de vértice invertido.
  • ST_Rotate - Rotates a geometry about an origin point.
  • ST_RotateX - Rotates a geometry about the X axis.
  • ST_RotateY - Rotates a geometry about the Y axis.
  • ST_RotateZ - Rotates a geometry about the Z axis.
  • ST_Scale - Scales a geometry by given factors.
  • ST_Scroll - Change start point of a closed LineString.
  • ST_SetPoint - Reemplace el punto de una cadena de línea con un punto dado.
  • ST_ShiftLongitude - Shifts the longitude coordinates of a geometry between -180..180 and 0..360.
  • ST_SnapToGrid - Ajusta todos los puntos de la geometría de entrada a una cuadrícula regular.
  • ST_StartPoint - Returns the first point of a LineString.
  • ST_StraightSkeleton - Compute a straight skeleton from a geometry
  • ST_SwapOrdinates - Returns a version of the given geometry with given ordinate values swapped.
  • ST_SymDifference - Computes a geometry representing the portions of geometries A and B that do not intersect.
  • ST_Tesselate - Perform surface Tesselation of a polygon or polyhedralsurface and returns as a TIN or collection of TINS
  • ST_TransScale - Translates and scales a geometry by given offsets and factors.
  • ST_Translate - Translates a geometry by given offsets.
  • ST_UnaryUnion - Computes the union of the components of a single geometry.
  • ST_Union - Computes a geometry representing the point-set union of the input geometries.
  • ST_Volume - Computes the volume of a 3D solid. If applied to surface (even closed) geometries will return 0.
  • ST_WrapX - Wrap a geometry around an X value.
  • ST_X - Returns the X coordinate of a Point.
  • ST_XMax - Returns the X maxima of a 2D or 3D bounding box or a geometry.
  • ST_XMin - Returns the X minima of a 2D or 3D bounding box or a geometry.
  • ST_Y - Returns the Y coordinate of a Point.
  • ST_YMax - Returns the Y maxima of a 2D or 3D bounding box or a geometry.
  • ST_YMin - Returns the Y minima of a 2D or 3D bounding box or a geometry.
  • ST_Z - Returns the Z coordinate of a Point.
  • ST_ZMax - Returns the Z maxima of a 2D or 3D bounding box or a geometry.
  • ST_ZMin - Returns the Z minima of a 2D or 3D bounding box or a geometry.
  • ST_Zmflag - Devuelve la dimensión de las coordenadas del valor de ST_Geometry.
  • TG_Equals - Devuelve true si dos topogeometries están compuestas de las mismas primitivas topologicas.
  • TG_Intersects - Devuelve verdadero si cualquier par de primitivas de las dos topogeometries se intersectan.
  • UpdateGeometrySRID - Updates the SRID of all features in a geometry column, and the table metadata.
  • geometry_overlaps_nd - Returns TRUE if A's n-D bounding box intersects B's n-D bounding box.
  • overlaps_nd_geometry_gidx - Returns TRUE if a geometry's (cached) n-D bounding box intersects a n-D float precision bounding box (GIDX).
  • overlaps_nd_gidx_geometry - Returns TRUE if a n-D float precision bounding box (GIDX) intersects a geometry's (cached) n-D bounding box.
  • overlaps_nd_gidx_gidx - Returns TRUE if two n-D float precision bounding boxes (GIDX) intersect each other.
  • postgis_sfcgal_full_version - Returns the full version of SFCGAL in use including CGAL and Boost versions
  • postgis_sfcgal_version - Returns the version of SFCGAL in use

12.9. PostGIS Curved Geometry Support Functions

The functions given below are PostGIS functions that can use CIRCULARSTRING, CURVEPOLYGON, and other curved geometry types

  • AddGeometryColumn - Suprime una columna de geometrías de una tabla espacial.
  • Box2D - Returns a BOX2D representing the 2D extent of a geometry.
  • Box3D - Returns a BOX3D representing the 3D extent of a geometry.
  • DropGeometryColumn - Suprime una columna de geometrías de una tabla espacial.
  • GeometryType - Devuelve el tipo de geometría del valor de ST_Geometry.
  • PostGIS_AddBBox - Add bounding box to the geometry.
  • PostGIS_DropBBox - Drop the bounding box cache from the geometry.
  • PostGIS_HasBBox - Returns TRUE if the bbox of this geometry is cached, FALSE otherwise.
  • ST_3DExtent - Aggregate function that returns the 3D bounding box of geometries.
  • ST_Affine - Apply a 3D affine transformation to a geometry.
  • ST_AsBinary - Return the OGC/ISO Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
  • ST_AsEWKB - Return the Extended Well-Known Binary (EWKB) representation of the geometry with SRID meta data.
  • ST_AsEWKT - Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.
  • ST_AsHEXEWKB - Returns a Geometry in HEXEWKB format (as text) using either little-endian (NDR) or big-endian (XDR) encoding.
  • ST_AsSVG - Returns SVG path data for a geometry.
  • ST_AsText - Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.
  • ST_ClusterDBSCAN - Window function that returns a cluster id for each input geometry using the DBSCAN algorithm.
  • ST_ClusterWithin - Aggregate function that clusters geometries by separation distance.
  • ST_ClusterWithinWin - Window function that returns a cluster id for each input geometry, clustering using separation distance.
  • ST_Collect - Creates a GeometryCollection or Multi* geometry from a set of geometries.
  • ST_CoordDim - Devuelve la dimensión de las coordenadas del valor de ST_Geometry.
  • ST_CurveToLine - Converts a geometry containing curves to a linear geometry.
  • ST_Distance - Returns the distance between two geometry or geography values.
  • ST_Dump - Returns a set of geometry_dump rows for the components of a geometry.
  • ST_DumpPoints - Devuelve un resumen de texto del contenido de la geometría.
  • ST_EndPoint - Devuelve el número de puntos en un valor ST_LineString o ST_CircularString.
  • ST_EstimatedExtent - Returns the estimated extent of a spatial table.
  • ST_FlipCoordinates - Returns a version of a geometry with X and Y axis flipped.
  • ST_Force2D - Forzar las geometrías en un "modo de 2 dimensiones".
  • ST_ForceCurve - Relanzar una geometría en su tipo curvo, si corresponde.
  • ST_ForceSFS - Fuerza las geometrías para usar sólo los tipos de geometría SFS 1.1.
  • ST_Force3D - Forzar las geometrías en modo XYZ. Este es un alias para ST_Force3DZ.
  • ST_Force3DM - Fuerza las geometrías en modo XYM.
  • ST_Force3DZ - Fuerza las geometrías en modo XYZ.
  • ST_Force4D - Fuerza las geometrías en modo XYZM.
  • ST_ForceCollection - Convertir la geometría en una GEOMETRYCOLLECTION.
  • ST_GeoHash - Return a GeoHash representation of the geometry.
  • ST_GeogFromWKB - Crea una instancia "geography" desde la representación de una geometría en "Well-Known Binary" (WKB) o "Extended Well-Known Binary" (EWKB).
  • ST_GeomFromEWKB - Devuelve un valor especifico de ST_Geometry desde una representación " Extended Well-Known Binary" (EWKB).
  • ST_GeomFromEWKT - Devuelve un valor especificado ST_Geometry desde una representación "Extended Well-Known Text" (EWKT).
  • ST_GeomFromText - Devuelve un valor especifico de ST_Geometry desde una representación "Extended Well-Known Binary" (EWKB).
  • ST_GeomFromWKB - Crea una instancia de geometría desde la representación de una geometría en "Well-Known Binary" (WKB) y un SRID opcional.
  • ST_GeometryN - Devuelve el tipo de geometría del valor de ST_Geometry.
  • = - Returns TRUE if the coordinates and coordinate order geometry/geography A are the same as the coordinates and coordinate order of geometry/geography B.
  • &<| - Returns TRUE if A's bounding box overlaps or is below B's.
  • ST_HasArc - Tests if a geometry contains a circular arc
  • ST_Intersects - Tests if two geometries intersect (they have at least one point in common)
  • ST_IsClosed - Devuelve TRUE si los puntos de inicio y final de una LINESTRINGson coincidentes. Para superficies poliedricas si son cerradas (volumetricas).
  • ST_IsCollection - Devuelve True si la Geometría es una colección vacía, polígono vacio, punto vacío etc.
  • ST_IsEmpty - Tests if a geometry is empty.
  • ST_LineToCurve - Converts a linear geometry to a curved geometry.
  • ST_MemSize - Devuelve el tipo de geometría del valor de ST_Geometry.
  • ST_NPoints - Devuelve el numero de puntos (vértices) en la geometría.
  • ST_NRings - Devuelva el número de anillos interiores de una geometría poligonal.
  • ST_PointFromWKB - Crea una geometría desde un WKB con el SRID dado.
  • ST_PointN - Devuelve el número de puntos en un valor ST_LineString o ST_CircularString.
  • ST_Points - Devuelve un MultiPoint que contiene todas las coordenadas de una geometría.
  • ST_Rotate - Rotates a geometry about an origin point.
  • ST_RotateZ - Rotates a geometry about the Z axis.
  • ST_SRID - Returns the spatial reference identifier for a geometry.
  • ST_Scale - Scales a geometry by given factors.
  • ST_SetSRID - Set the SRID on a geometry.
  • ST_StartPoint - Returns the first point of a LineString.
  • ST_Summary - Devuelve un resumen de texto del contenido de la geometría.
  • ST_SwapOrdinates - Returns a version of the given geometry with given ordinate values swapped.
  • ST_TransScale - Translates and scales a geometry by given offsets and factors.
  • ST_Transform - Return a new geometry with coordinates transformed to a different spatial reference system.
  • ST_Translate - Translates a geometry by given offsets.
  • ST_XMax - Returns the X maxima of a 2D or 3D bounding box or a geometry.
  • ST_XMin - Returns the X minima of a 2D or 3D bounding box or a geometry.
  • ST_YMax - Returns the Y maxima of a 2D or 3D bounding box or a geometry.
  • ST_YMin - Returns the Y minima of a 2D or 3D bounding box or a geometry.
  • ST_ZMax - Returns the Z maxima of a 2D or 3D bounding box or a geometry.
  • ST_ZMin - Returns the Z minima of a 2D or 3D bounding box or a geometry.
  • ST_Zmflag - Devuelve la dimensión de las coordenadas del valor de ST_Geometry.
  • UpdateGeometrySRID - Updates the SRID of all features in a geometry column, and the table metadata.
  • ~(box2df,box2df) - Returns TRUE if a 2D float precision bounding box (BOX2DF) contains another 2D float precision bounding box (BOX2DF).
  • ~(box2df,geometry) - Returns TRUE if a 2D float precision bounding box (BOX2DF) contains a geometry's 2D bonding box.
  • ~(geometry,box2df) - Returns TRUE if a geometry's 2D bonding box contains a 2D float precision bounding box (GIDX).
  • && - Returns TRUE if A's 2D bounding box intersects B's 2D bounding box.
  • &&& - Returns TRUE if A's n-D bounding box intersects B's n-D bounding box.
  • @(box2df,box2df) - Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into another 2D float precision bounding box.
  • @(box2df,geometry) - Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into a geometry's 2D bounding box.
  • @(geometry,box2df) - Returns TRUE if a geometry's 2D bounding box is contained into a 2D float precision bounding box (BOX2DF).
  • &&(box2df,box2df) - Returns TRUE if two 2D float precision bounding boxes (BOX2DF) intersect each other.
  • &&(box2df,geometry) - Returns TRUE if a 2D float precision bounding box (BOX2DF) intersects a geometry's (cached) 2D bounding box.
  • &&(geometry,box2df) - Returns TRUE if a geometry's (cached) 2D bounding box intersects a 2D float precision bounding box (BOX2DF).
  • &&&(geometry,gidx) - Returns TRUE if a geometry's (cached) n-D bounding box intersects a n-D float precision bounding box (GIDX).
  • &&&(gidx,geometry) - Returns TRUE if a n-D float precision bounding box (GIDX) intersects a geometry's (cached) n-D bounding box.
  • &&&(gidx,gidx) - Returns TRUE if two n-D float precision bounding boxes (GIDX) intersect each other.

12.10. PostGIS Polyhedral Surface Support Functions

The functions given below are PostGIS functions that can use POLYHEDRALSURFACE, POLYHEDRALSURFACEM geometries

  • AddGeometryColumn - Suprime una columna de geometrías de una tabla espacial.
  • Box2D - Returns a BOX2D representing the 2D extent of a geometry.
  • Box3D - Returns a BOX3D representing the 3D extent of a geometry.
  • DropGeometryColumn - Suprime una columna de geometrías de una tabla espacial.
  • GeometryType - Devuelve el tipo de geometría del valor de ST_Geometry.
  • PostGIS_AddBBox - Add bounding box to the geometry.
  • PostGIS_DropBBox - Drop the bounding box cache from the geometry.
  • PostGIS_HasBBox - Returns TRUE if the bbox of this geometry is cached, FALSE otherwise.
  • ST_3DExtent - Aggregate function that returns the 3D bounding box of geometries.
  • ST_Affine - Apply a 3D affine transformation to a geometry.
  • ST_AsBinary - Return the OGC/ISO Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
  • ST_AsEWKB - Return the Extended Well-Known Binary (EWKB) representation of the geometry with SRID meta data.
  • ST_AsEWKT - Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.
  • ST_AsHEXEWKB - Returns a Geometry in HEXEWKB format (as text) using either little-endian (NDR) or big-endian (XDR) encoding.
  • ST_AsSVG - Returns SVG path data for a geometry.
  • ST_AsText - Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.
  • ST_ClusterDBSCAN - Window function that returns a cluster id for each input geometry using the DBSCAN algorithm.
  • ST_ClusterWithin - Aggregate function that clusters geometries by separation distance.
  • ST_ClusterWithinWin - Window function that returns a cluster id for each input geometry, clustering using separation distance.
  • ST_Collect - Creates a GeometryCollection or Multi* geometry from a set of geometries.
  • ST_CoordDim - Devuelve la dimensión de las coordenadas del valor de ST_Geometry.
  • ST_CurveToLine - Converts a geometry containing curves to a linear geometry.
  • ST_Distance - Returns the distance between two geometry or geography values.
  • ST_Dump - Returns a set of geometry_dump rows for the components of a geometry.
  • ST_DumpPoints - Devuelve un resumen de texto del contenido de la geometría.
  • ST_EndPoint - Devuelve el número de puntos en un valor ST_LineString o ST_CircularString.
  • ST_EstimatedExtent - Returns the estimated extent of a spatial table.
  • ST_FlipCoordinates - Returns a version of a geometry with X and Y axis flipped.
  • ST_Force2D - Forzar las geometrías en un "modo de 2 dimensiones".
  • ST_ForceCurve - Relanzar una geometría en su tipo curvo, si corresponde.
  • ST_ForceSFS - Fuerza las geometrías para usar sólo los tipos de geometría SFS 1.1.
  • ST_Force3D - Forzar las geometrías en modo XYZ. Este es un alias para ST_Force3DZ.
  • ST_Force3DM - Fuerza las geometrías en modo XYM.
  • ST_Force3DZ - Fuerza las geometrías en modo XYZ.
  • ST_Force4D - Fuerza las geometrías en modo XYZM.
  • ST_ForceCollection - Convertir la geometría en una GEOMETRYCOLLECTION.
  • ST_GeoHash - Return a GeoHash representation of the geometry.
  • ST_GeogFromWKB - Crea una instancia "geography" desde la representación de una geometría en "Well-Known Binary" (WKB) o "Extended Well-Known Binary" (EWKB).
  • ST_GeomFromEWKB - Devuelve un valor especifico de ST_Geometry desde una representación " Extended Well-Known Binary" (EWKB).
  • ST_GeomFromEWKT - Devuelve un valor especificado ST_Geometry desde una representación "Extended Well-Known Text" (EWKT).
  • ST_GeomFromText - Devuelve un valor especifico de ST_Geometry desde una representación "Extended Well-Known Binary" (EWKB).
  • ST_GeomFromWKB - Crea una instancia de geometría desde la representación de una geometría en "Well-Known Binary" (WKB) y un SRID opcional.
  • ST_GeometryN - Devuelve el tipo de geometría del valor de ST_Geometry.
  • = - Returns TRUE if the coordinates and coordinate order geometry/geography A are the same as the coordinates and coordinate order of geometry/geography B.
  • &<| - Returns TRUE if A's bounding box overlaps or is below B's.
  • ST_HasArc - Tests if a geometry contains a circular arc
  • ST_Intersects - Tests if two geometries intersect (they have at least one point in common)
  • ST_IsClosed - Devuelve TRUE si los puntos de inicio y final de una LINESTRINGson coincidentes. Para superficies poliedricas si son cerradas (volumetricas).
  • ST_IsCollection - Devuelve True si la Geometría es una colección vacía, polígono vacio, punto vacío etc.
  • ST_IsEmpty - Tests if a geometry is empty.
  • ST_LineToCurve - Converts a linear geometry to a curved geometry.
  • ST_MemSize - Devuelve el tipo de geometría del valor de ST_Geometry.
  • ST_NPoints - Devuelve el numero de puntos (vértices) en la geometría.
  • ST_NRings - Devuelva el número de anillos interiores de una geometría poligonal.
  • ST_PointFromWKB - Crea una geometría desde un WKB con el SRID dado.
  • ST_PointN - Devuelve el número de puntos en un valor ST_LineString o ST_CircularString.
  • ST_Points - Devuelve un MultiPoint que contiene todas las coordenadas de una geometría.
  • ST_Rotate - Rotates a geometry about an origin point.
  • ST_RotateZ - Rotates a geometry about the Z axis.
  • ST_SRID - Returns the spatial reference identifier for a geometry.
  • ST_Scale - Scales a geometry by given factors.
  • ST_SetSRID - Set the SRID on a geometry.
  • ST_StartPoint - Returns the first point of a LineString.
  • ST_Summary - Devuelve un resumen de texto del contenido de la geometría.
  • ST_SwapOrdinates - Returns a version of the given geometry with given ordinate values swapped.
  • ST_TransScale - Translates and scales a geometry by given offsets and factors.
  • ST_Transform - Return a new geometry with coordinates transformed to a different spatial reference system.
  • ST_Translate - Translates a geometry by given offsets.
  • ST_XMax - Returns the X maxima of a 2D or 3D bounding box or a geometry.
  • ST_XMin - Returns the X minima of a 2D or 3D bounding box or a geometry.
  • ST_YMax - Returns the Y maxima of a 2D or 3D bounding box or a geometry.
  • ST_YMin - Returns the Y minima of a 2D or 3D bounding box or a geometry.
  • ST_ZMax - Returns the Z maxima of a 2D or 3D bounding box or a geometry.
  • ST_ZMin - Returns the Z minima of a 2D or 3D bounding box or a geometry.
  • ST_Zmflag - Devuelve la dimensión de las coordenadas del valor de ST_Geometry.
  • UpdateGeometrySRID - Updates the SRID of all features in a geometry column, and the table metadata.
  • ~(box2df,box2df) - Returns TRUE if a 2D float precision bounding box (BOX2DF) contains another 2D float precision bounding box (BOX2DF).
  • ~(box2df,geometry) - Returns TRUE if a 2D float precision bounding box (BOX2DF) contains a geometry's 2D bonding box.
  • ~(geometry,box2df) - Returns TRUE if a geometry's 2D bonding box contains a 2D float precision bounding box (GIDX).
  • && - Returns TRUE if A's 2D bounding box intersects B's 2D bounding box.
  • &&& - Returns TRUE if A's n-D bounding box intersects B's n-D bounding box.
  • @(box2df,box2df) - Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into another 2D float precision bounding box.
  • @(box2df,geometry) - Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into a geometry's 2D bounding box.
  • @(geometry,box2df) - Returns TRUE if a geometry's 2D bounding box is contained into a 2D float precision bounding box (BOX2DF).
  • &&(box2df,box2df) - Returns TRUE if two 2D float precision bounding boxes (BOX2DF) intersect each other.
  • &&(box2df,geometry) - Returns TRUE if a 2D float precision bounding box (BOX2DF) intersects a geometry's (cached) 2D bounding box.
  • &&(geometry,box2df) - Returns TRUE if a geometry's (cached) 2D bounding box intersects a 2D float precision bounding box (BOX2DF).
  • &&&(geometry,gidx) - Returns TRUE if a geometry's (cached) n-D bounding box intersects a n-D float precision bounding box (GIDX).
  • &&&(gidx,geometry) - Returns TRUE if a n-D float precision bounding box (GIDX) intersects a geometry's (cached) n-D bounding box.
  • &&&(gidx,gidx) - Returns TRUE if two n-D float precision bounding boxes (GIDX) intersect each other.

12.11. PostGIS Function Support Matrix

Below is an alphabetical listing of spatial specific functions in PostGIS and the kinds of spatial types they work with or OGC/SQL compliance they try to conform to.

  • A means the function works with the type or subtype natively.
  • A means it works but with a transform cast built-in using cast to geometry, transform to a "best srid" spatial ref and then cast back. Results may not be as expected for large areas or areas at poles and may accumulate floating point junk.
  • A means the function works with the type because of a auto-cast to another such as to box3d rather than direct type support.
  • A means the function only available if PostGIS compiled with SFCGAL support.
  • A means the function support is provided by SFCGAL if PostGIS compiled with SFCGAL support, otherwise GEOS/built-in support.
  • geom - Basic 2D geometry support (x,y).
  • geog - Basic 2D geography support (x,y).
  • 2.5D - basic 2D geometries in 3 D/4D space (has Z or M coord).
  • PS - Polyhedral surfaces
  • T - Triangles and Triangulated Irregular Network surfaces (TIN)

Functiongeomgeog2.5DCurvesSQL MMPST
Box2D     
Box3D    
GeometryType    
PostGIS_AddBBox       
PostGIS_DropBBox       
PostGIS_HasBBox       
ST_3DArea    
ST_3DClosestPoint       
ST_3DConvexHull     
ST_3DDFullyWithin       
ST_3DDWithin      
ST_3DDifference    
ST_3DDistance      
ST_3DExtent    
ST_3DIntersection    
ST_3DIntersects    
ST_3DLength       
ST_3DLineInterpolatePoint       
ST_3DLongestLine       
ST_3DMakeBox       
ST_3DMaxDistance       
ST_3DPerimeter       
ST_3DShortestLine       
ST_3DUnion    
ST_AddMeasure       
ST_AddPoint       
ST_Affine    
ST_AlphaShape       
ST_Angle       
ST_ApproximateMedialAxis     
ST_Area     
ST_AsBinary
ST_AsEWKB    
ST_AsEWKT  
ST_AsEncodedPolyline       
ST_AsFlatGeobuf       
ST_AsGML  
ST_AsGeoJSON     
ST_AsGeobuf       
ST_AsHEXEWKB      
ST_AsKML     
ST_AsLatLonText       
ST_AsMARC21       
ST_AsMVT       
ST_AsMVTGeom       
ST_AsSVG      
ST_AsTWKB       
ST_AsText     
ST_AsX3D     
ST_Azimuth      
ST_BdMPolyFromText       
ST_BdPolyFromText       
ST_Boundary       
ST_BoundingDiagonal       
ST_Box2dFromGeoHash       
ST_Buffer      
ST_BuildArea       
ST_CPAWithin       
ST_Centroid      
ST_ChaikinSmoothing       
ST_ClipByBox2D       
ST_ClosestPoint      
ST_ClosestPointOfApproach       
ST_ClusterDBSCAN       
ST_ClusterIntersecting       
ST_ClusterIntersectingWin       
ST_ClusterKMeans       
ST_ClusterWithin       
ST_ClusterWithinWin       
ST_Collect      
ST_CollectionExtract       
ST_CollectionHomogenize       
ST_ConcaveHull       
ST_ConstrainedDelaunayTriangles       
ST_Contains       
ST_ContainsProperly       
ST_ConvexHull       
ST_CoordDim  
ST_CoverageInvalidEdges       
ST_CoverageSimplify       
ST_CoverageUnion       
ST_CoveredBy      
ST_Covers      
ST_Crosses       
ST_CurveToLine     
ST_DFullyWithin       
ST_DWithin      
ST_DelaunayTriangles      
ST_Difference       
ST_Dimension    
ST_Disjoint       
ST_Distance     
ST_DistanceCPA       
ST_DistanceSphere       
ST_DistanceSpheroid       
ST_Dump    
ST_DumpPoints    
ST_DumpRings       
ST_DumpSegments      
ST_EndPoint     
ST_Envelope       
ST_Equals       
ST_EstimatedExtent       
ST_Expand     
ST_Extent     
ST_ExteriorRing       
ST_Extrude     
ST_FilterByM       
ST_FlipCoordinates    
ST_Force2D      
ST_ForceCurve      
ST_ForceLHR     
ST_ForcePolygonCCW       
ST_ForcePolygonCW       
ST_ForceRHR       
ST_ForceSFS    
ST_Force3D      
ST_Force3DM       
ST_Force3DZ      
ST_Force4D      
ST_ForceCollection      
ST_FrechetDistance       
ST_FromFlatGeobuf        
ST_FromFlatGeobufToTable       
ST_GMLToSQL       
ST_GeneratePoints       
ST_GeoHash       
ST_GeogFromText        
ST_GeogFromWKB        
ST_GeographyFromText        
ST_GeomCollFromText       
ST_GeomFromEWKB    
ST_GeomFromEWKT    
ST_GeomFromGML     
ST_GeomFromGeoHash       
ST_GeomFromGeoJSON       
ST_GeomFromKML       
ST_GeomFromMARC21       
ST_GeomFromTWKB       
ST_GeomFromText      
ST_GeomFromWKB      
ST_GeometricMedian       
ST_GeometryFromText       
ST_GeometryN  
ST_GeometryType      
|>>       
<<|       
~       
@       
=      
<<       
|&>       
&<|       
&<       
&>       
>>       
~=       
ST_HasArc      
ST_HausdorffDistance       
ST_Hexagon       
ST_HexagonGrid       
ST_InteriorRingN       
ST_InterpolatePoint       
ST_Intersection     
ST_Intersects    
ST_InverseTransformPipeline       
ST_IsClosed    
ST_IsCollection      
ST_IsEmpty      
ST_IsPlanar     
ST_IsPolygonCCW       
ST_IsPolygonCW       
ST_IsRing       
ST_IsSimple       
ST_IsSolid     
ST_IsValid       
ST_IsValidDetail       
ST_IsValidReason       
ST_IsValidTrajectory       
ST_LargestEmptyCircle       
ST_Length      
ST_Length2D       
ST_LengthSpheroid       
ST_Letters       
ST_LineCrossingDirection       
ST_LineExtend       
ST_LineFromEncodedPolyline       
ST_LineFromMultiPoint       
ST_LineFromText       
ST_LineFromWKB       
ST_LineInterpolatePoint     
ST_LineInterpolatePoints     
ST_LineLocatePoint      
ST_LineMerge       
ST_LineSubstring     
ST_LineToCurve      
ST_LinestringFromWKB       
ST_LocateAlong       
ST_LocateBetween       
ST_LocateBetweenElevations       
ST_LongestLine       
ST_M       
ST_MLineFromText       
ST_MPointFromText       
ST_MPolyFromText       
ST_MakeBox2D       
ST_MakeEnvelope       
ST_MakeLine       
ST_MakePoint       
ST_MakePointM       
ST_MakePolygon       
ST_MakeSolid     
ST_MakeValid       
ST_MaxDistance       
ST_MaximumInscribedCircle       
ST_MemSize    
ST_MemUnion       
ST_MinimumBoundingCircle       
ST_MinimumBoundingRadius       
ST_MinimumClearance       
ST_MinimumClearanceLine       
ST_MinkowskiSum       
ST_Multi       
ST_NDims       
ST_NPoints      
ST_NRings      
ST_Node       
ST_Normalize       
ST_NumGeometries    
ST_NumInteriorRing       
ST_NumInteriorRings       
ST_NumPatches      
ST_NumPoints       
ST_OffsetCurve       
ST_OptimalAlphaShape       
ST_OrderingEquals       
ST_Orientation       
ST_OrientedEnvelope       
ST_Overlaps       
ST_PatchN      
ST_Perimeter      
ST_Perimeter2D       
ST_Point       
ST_PointFromGeoHash        
ST_PointFromText       
ST_PointFromWKB     
ST_PointInsideCircle       
ST_PointM       
ST_PointN     
ST_PointOnSurface       
ST_PointZ       
ST_PointZM       
ST_Points      
ST_Polygon       
ST_PolygonFromText       
ST_Polygonize       
ST_Project      
ST_QuantizeCoordinates       
ST_ReducePrecision       
ST_Relate       
ST_RelateMatch        
ST_RemovePoint       
ST_RemoveRepeatedPoints       
ST_Reverse       
ST_Rotate    
ST_RotateX     
ST_RotateY     
ST_RotateZ    
ST_SRID      
ST_Scale    
ST_Scroll       
ST_Segmentize      
ST_SetEffectiveArea       
ST_SetPoint       
ST_SetSRID       
ST_SharedPaths       
ST_ShiftLongitude     
ST_ShortestLine      
ST_Simplify       
ST_SimplifyPolygonHull       
ST_SimplifyPreserveTopology       
ST_SimplifyVW       
ST_Snap       
ST_SnapToGrid       
ST_Split       
ST_Square       
ST_SquareGrid       
ST_StartPoint     
ST_StraightSkeleton     
ST_Subdivide       
ST_Summary    
ST_SwapOrdinates    
ST_SymDifference       
ST_Tesselate     
ST_TileEnvelope       
ST_Touches       
ST_TransScale      
ST_Transform     
ST_TransformPipeline       
ST_Translate      
ST_TriangulatePolygon       
ST_UnaryUnion       
ST_Union       
ST_Volume    
ST_VoronoiLines       
ST_VoronoiPolygons       
ST_WKBToSQL       
ST_WKTToSQL       
ST_Within       
ST_WrapX       
ST_X       
ST_XMax      
ST_XMin      
ST_Y       
ST_YMax      
ST_YMin      
ST_Z       
ST_ZMax      
ST_ZMin      
ST_Zmflag      
~(box2df,box2df)       
~(box2df,geometry)       
~(geometry,box2df)       
<#>       
<<#>>       
<<->>       
|=|       
<->      
&&      
&&&    
@(box2df,box2df)       
@(box2df,geometry)       
@(geometry,box2df)       
&&(box2df,box2df)       
&&(box2df,geometry)       
&&(geometry,box2df)       
&&&(geometry,gidx)    
&&&(gidx,geometry)    
&&&(gidx,gidx)     
postgis.enable_outdb_rasters        
postgis.gdal_datapath        
postgis.gdal_enabled_drivers        
postgis.gdal_vsi_options        
postgis_sfcgal_full_version      
postgis_sfcgal_version      
postgis_srs        
postgis_srs_all        
postgis_srs_codes        
postgis_srs_search       

12.12. New, Enhanced or changed PostGIS Functions

12.12.1. PostGIS Functions new or enhanced in 3.4

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 3.4

  • PostGIS_GEOS_Compiled_Version - Availability: 3.4.0 Returns the version number of the GEOS library against which PostGIS was built.
  • ST_ClusterIntersectingWin - Availability: 3.4.0 Window function that returns a cluster id for each input geometry, clustering input geometries into connected sets.
  • ST_ClusterWithinWin - Availability: 3.4.0 Window function that returns a cluster id for each input geometry, clustering using separation distance.
  • ST_CoverageInvalidEdges - Availability: 3.4.0 Window function that finds locations where polygons fail to form a valid coverage.
  • ST_CoverageSimplify - Availability: 3.4.0 Window function that simplifies the edges of a polygonal coverage.
  • ST_CoverageUnion - Availability: 3.4.0 - requires GEOS >= 3.8.0 Computes the union of a set of polygons forming a coverage by removing shared edges.
  • ST_InverseTransformPipeline - Availability: 3.4.0 Return a new geometry with coordinates transformed to a different spatial reference system using the inverse of a defined coordinate transformation pipeline.
  • ST_LargestEmptyCircle - Availability: 3.4.0. Computes the largest circle not overlapping a geometry.
  • ST_LineExtend - Availability: 3.4.0 Returns a line with the last and first segments extended the specified distance(s).
  • ST_TransformPipeline - Availability: 3.4.0 Return a new geometry with coordinates transformed to a different spatial reference system using a defined coordinate transformation pipeline.
  • postgis_srs - Availability: 3.4.0 Return a metadata record for the requested authority and srid.
  • postgis_srs_all - Availability: 3.4.0 Return metadata records for every spatial reference system in the underlying Proj database.
  • postgis_srs_codes - Availability: 3.4.0 Return the list of SRS codes associated with the given authority.
  • postgis_srs_search - Availability: 3.4.0 Return metadata records for projected coordinate systems that have areas of useage that fully contain the bounds parameter.

Functions enhanced in PostGIS 3.4

  • PostGIS_Full_Version - Enhanced: 3.4.0 now includes extra PROJ configurations NETWORK_ENABLED, URL_ENDPOINT and DATABASE_PATH of proj.db location Reports full PostGIS version and build configuration infos.
  • PostGIS_PROJ_Version - Enhanced: 3.4.0 now includes NETWORK_ENABLED, URL_ENDPOINT and DATABASE_PATH of proj.db location Returns the version number of the PROJ4 library.
  • ST_AsSVG - Enhanced: 3.4.0 to support all curve types Returns SVG path data for a geometry.
  • ST_ClosestPoint - Enhanced: 3.4.0 - Support for geography. Returns the 2D point on g1 that is closest to g2. This is the first point of the shortest line from one geometry to the other.
  • ST_LineSubstring - Enhanced: 3.4.0 - Support for geography was introduced. Returns the part of a line between two fractional locations.
  • ST_Project - Enhanced: 3.4.0 Allow geometry arguments and two-point form omitting azimuth. Returns a point projected from a start point by a distance and bearing (azimuth).
  • ST_ShortestLine - Enhanced: 3.4.0 - support for geography. Returns the 2D shortest line between two geometries

Functions changed in PostGIS 3.4

  • PostGIS_Extensions_Upgrade - Changed: 3.4.0 to add target_version argument. Packages and upgrades PostGIS extensions (e.g. postgis_raster, postgis_topology, postgis_sfcgal) to given or latest version.

12.12.2. PostGIS Functions new or enhanced in 3.3

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 3.3

  • ST_3DConvexHull - Disponibilidad: 2.1.0 Computes the 3D convex hull of a geometry.
  • ST_3DUnion - Availability: 3.3.0 aggregate variant was added Perform 3D union.
  • ST_AlphaShape - Availability: 3.3.0 - requires SFCGAL >= 1.4.1. Computes an Alpha-shape enclosing a geometry
  • ST_AsMARC21 - Availability: 3.3.0 Returns geometry as a MARC21/XML record with a geographic datafield (034).
  • ST_GeomFromMARC21 - Availability: 3.3.0, requires libxml2 2.6+ Takes MARC21/XML geographic data as input and returns a PostGIS geometry object.
  • ST_Letters - Disponibilidad: 2.1.0 Returns the input letters rendered as geometry with a default start position at the origin and default text height of 100.
  • ST_OptimalAlphaShape - Availability: 3.3.0 - requires SFCGAL >= 1.4.1. Computes an Alpha-shape enclosing a geometry using an "optimal" alpha value.
  • ST_SimplifyPolygonHull - Availability: 3.3.0. Computes a simplifed topology-preserving outer or inner hull of a polygonal geometry.
  • ST_TriangulatePolygon - Availability: 3.3.0. Computes the constrained Delaunay triangulation of polygons
  • postgis_sfcgal_full_version - Disponibilidad: 2.1.0 Returns the full version of SFCGAL in use including CGAL and Boost versions

Functions enhanced in PostGIS 3.3

  • ST_ConcaveHull - Enhanced: 3.3.0, GEOS native implementation enabled for GEOS 3.11+ Computes a possibly concave geometry that contains all input geometry vertices
  • ST_LineMerge - Enhanced: 3.3.0 accept a directed parameter. Return the lines formed by sewing together a MultiLineString.

Functions changed in PostGIS 3.3

  • PostGIS_Extensions_Upgrade - Changed: 3.3.0 support for upgrades from any PostGIS version. Does not work on all systems. Packages and upgrades PostGIS extensions (e.g. postgis_raster, postgis_topology, postgis_sfcgal) to given or latest version.

12.12.3. PostGIS Functions new or enhanced in 3.2

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 3.2

  • ST_AsFlatGeobuf - Availability: 3.2.0 Return a FlatGeobuf representation of a set of rows.
  • ST_DumpSegments - Disponibilidad: 2.2.0 Devuelve un resumen de texto del contenido de la geometría.
  • ST_FromFlatGeobuf - Availability: 3.2.0 Reads FlatGeobuf data.
  • ST_FromFlatGeobufToTable - Availability: 3.2.0 Creates a table based on the structure of FlatGeobuf data.
  • ST_Scroll - Availability: 3.2.0 Change start point of a closed LineString.
  • postgis.gdal_vsi_options - Disponibilidad: 2.2.0 A string configuration to set options used when working with an out-db raster.

Functions enhanced in PostGIS 3.2

  • ST_ClusterKMeans - Enhanced: 3.2.0 Support for max_radius Window function that returns a cluster id for each input geometry using the K-means algorithm.
  • ST_MakeValid - Enhanced: 3.2.0, added algorithm options, 'linework' and 'structure' which requires GEOS >= 3.10.0. Attempts to make an invalid geometry valid without losing vertices.
  • ST_Point - Enhanced: 3.2.0 srid as an extra optional argument was added. Older installs require combining with ST_SetSRID to mark the srid on the geometry. Creates a Point with X, Y and SRID values.
  • ST_PointM - Enhanced: 3.2.0 srid as an extra optional argument was added. Older installs require combining with ST_SetSRID to mark the srid on the geometry. Creates a Point with X, Y, M and SRID values.
  • ST_PointZ - Enhanced: 3.2.0 srid as an extra optional argument was added. Older installs require combining with ST_SetSRID to mark the srid on the geometry. Creates a Point with X, Y, Z and SRID values.
  • ST_PointZM - Enhanced: 3.2.0 srid as an extra optional argument was added. Older installs require combining with ST_SetSRID to mark the srid on the geometry. Creates a Point with X, Y, Z, M and SRID values.
  • ST_RemovePoint - Enhanced: 3.2.0 Remove a point from a linestring.
  • ST_RemoveRepeatedPoints - Enhanced: 3.2.0 Returns a version of a geometry with duplicate points removed.
  • ST_StartPoint - Enhanced: 3.2.0 returns a point for all geometries. Prior behavior returns NULLs if input was not a LineString. Returns the first point of a LineString.

Functions changed in PostGIS 3.2

  • ST_Boundary - Changed: 3.2.0 support for TIN, does not use geos, does not linearize curves Devuelve el cierre del limite combinatorio de esta geometría.

12.12.4. PostGIS Functions new or enhanced in 3.1

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 3.1

  • ST_Hexagon - Disponibilidad: 2.1.0 Returns a single hexagon, using the provided edge size and cell coordinate within the hexagon grid space.
  • ST_HexagonGrid - Disponibilidad: 2.1.0 Returns a set of hexagons and cell indices that completely cover the bounds of the geometry argument.
  • ST_MaximumInscribedCircle - Availability: 3.1.0. Computes the largest circle contained within a geometry.
  • ST_ReducePrecision - Availability: 3.1.0. Returns a valid geometry with points rounded to a grid tolerance.
  • ST_Square - Disponibilidad: 2.1.0 Returns a single square, using the provided edge size and cell coordinate within the square grid space.
  • ST_SquareGrid - Disponibilidad: 2.1.0 Returns a set of grid squares and cell indices that completely cover the bounds of the geometry argument.

Functions enhanced in PostGIS 3.1

  • ST_AsEWKT - Enhanced: 3.1.0 support for optional precision parameter. Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.
  • ST_ClusterKMeans - Enhanced: 3.1.0 Support for 3D geometries and weights Window function that returns a cluster id for each input geometry using the K-means algorithm.
  • ST_Difference - Enhanced: 3.1.0 accept a gridSize parameter. Computes a geometry representing the part of geometry A that does not intersect geometry B.
  • ST_Intersection - Enhanced: 3.1.0 accept a gridSize parameter Computes a geometry representing the shared portion of geometries A and B.
  • ST_MakeValid - Enhanced: 3.1.0, added removal of Coordinates with NaN values. Attempts to make an invalid geometry valid without losing vertices.
  • ST_Subdivide - Enhanced: 3.1.0 accept a gridSize parameter. Computes a rectilinear subdivision of a geometry.
  • ST_SymDifference - Enhanced: 3.1.0 accept a gridSize parameter. Computes a geometry representing the portions of geometries A and B that do not intersect.
  • ST_TileEnvelope - Mejorada: 2.0.0 se agregó el parámetro por defecto opcional srid. Creates a rectangular Polygon in Web Mercator (SRID:3857) using the XYZ tile system.
  • ST_UnaryUnion - Enhanced: 3.1.0 accept a gridSize parameter. Computes the union of the components of a single geometry.
  • ST_Union - Enhanced: 3.1.0 accept a gridSize parameter. Computes a geometry representing the point-set union of the input geometries.

Functions changed in PostGIS 3.1

  • ST_Force3D - Changed: 3.1.0. Added support for supplying a non-zero Z value. Forzar las geometrías en modo XYZ. Este es un alias para ST_Force3DZ.
  • ST_Force3DM - Changed: 3.1.0. Added support for supplying a non-zero M value. Fuerza las geometrías en modo XYM.
  • ST_Force3DZ - Changed: 3.1.0. Added support for supplying a non-zero Z value. Fuerza las geometrías en modo XYZ.
  • ST_Force4D - Changed: 3.1.0. Added support for supplying non-zero Z and M values. Fuerza las geometrías en modo XYZM.

12.12.5. PostGIS Functions new or enhanced in 3.0

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 3.0

  • ST_3DLineInterpolatePoint - Disponibilidad: 2.0.0 Returns a point interpolated along a 3D line at a fractional location.
  • ST_ConstrainedDelaunayTriangles - Disponibilidad: 2.1.0 Return a constrained Delaunay triangulation around the given input geometry.
  • ST_TileEnvelope - Disponibilidad: 2.1.0 Creates a rectangular Polygon in Web Mercator (SRID:3857) using the XYZ tile system.

Functions enhanced in PostGIS 3.0

  • ST_AsMVT - Enhanced: 3.0 - added support for Feature ID. Aggregate function returning a MVT representation of a set of rows.
  • ST_Contains - Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Tests if every point of B lies in A, and their interiors have a point in common
  • ST_ContainsProperly - Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Tests if every point of B lies in the interior of A
  • ST_CoveredBy - Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Tests if every point of A lies in B
  • ST_Covers - Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Tests if every point of B lies in A
  • ST_Crosses - Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Tests if two geometries have some, but not all, interior points in common
  • ST_CurveToLine - Enhanced: 3.0.0 implemented a minimum number of segments per linearized arc to prevent topological collapse. Converts a geometry containing curves to a linear geometry.
  • ST_Disjoint - Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Tests if two geometries have no points in common
  • ST_Equals - Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Tests if two geometries include the same set of points
  • ST_GeneratePoints - Enhanced: 3.0.0, added seed parameter Generates random points contained in a Polygon or MultiPolygon.
  • ST_GeomFromGeoJSON - Enhanced: 3.0.0 parsed geometry defaults to SRID=4326 if not specified otherwise. Toma como entrada una representación geojson de una geometría y devuelve un objeto geométrico PostGIS
  • ST_LocateBetween - Enhanced: 3.0.0 - added support for POLYGON, TIN, TRIANGLE. Returns the portions of a geometry that match a measure range.
  • ST_LocateBetweenElevations - Enhanced: 3.0.0 - added support for POLYGON, TIN, TRIANGLE. Returns the portions of a geometry that lie in an elevation (Z) range.
  • ST_Overlaps - Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Tests if two geometries have the same dimension and intersect, but each has at least one point not in the other
  • ST_Relate - Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Tests if two geometries have a topological relationship matching an Intersection Matrix pattern, or computes their Intersection Matrix
  • ST_Segmentize - Enhanced: 3.0.0 Segmentize geometry now produces equal-length subsegments Returns a modified geometry/geography having no segment longer than a given distance.
  • ST_Touches - Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Tests if two geometries have at least one point in common, but their interiors do not intersect
  • ST_Within - Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION Tests if every point of A lies in B, and their interiors have a point in common

Functions changed in PostGIS 3.0

  • PostGIS_Extensions_Upgrade - Changed: 3.0.0 to repackage loose extensions and support postgis_raster. Packages and upgrades PostGIS extensions (e.g. postgis_raster, postgis_topology, postgis_sfcgal) to given or latest version.
  • ST_3DDistance - Changed: 3.0.0 - SFCGAL version removed Returns the 3D cartesian minimum distance (based on spatial ref) between two geometries in projected units.
  • ST_3DIntersects - Changed: 3.0.0 SFCGAL backend removed, GEOS backend supports TINs. Tests if two geometries spatially intersect in 3D - only for points, linestrings, polygons, polyhedral surface (area)
  • ST_Area - Changed: 3.0.0 - does not depend on SFCGAL anymore. Returns the area of a polygonal geometry.
  • ST_AsGeoJSON - Changed: 3.0.0 support records as input Return a geometry as a GeoJSON element.
  • ST_AsGeoJSON - Changed: 3.0.0 output SRID if not EPSG:4326. Return a geometry as a GeoJSON element.
  • ST_AsKML - Changed: 3.0.0 - Removed the "versioned" variant signature Return the geometry as a KML element.
  • ST_Distance - Changed: 3.0.0 - does not depend on SFCGAL anymore. Returns the distance between two geometry or geography values.
  • ST_Intersection - Changed: 3.0.0 does not depend on SFCGAL. Computes a geometry representing the shared portion of geometries A and B.
  • ST_Intersects - Changed: 3.0.0 SFCGAL version removed and native support for 2D TINS added. Tests if two geometries intersect (they have at least one point in common)
  • ST_Union - Changed: 3.0.0 does not depend on SFCGAL. Computes a geometry representing the point-set union of the input geometries.

12.12.6. PostGIS Functions new or enhanced in 2.5

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 2.5

  • PostGIS_Extensions_Upgrade - Availability: 2.5.0 Packages and upgrades PostGIS extensions (e.g. postgis_raster, postgis_topology, postgis_sfcgal) to given or latest version.
  • ST_Angle - Availability: 2.5.0 Returns the angle between two vectors defined by 3 or 4 points, or 2 lines.
  • ST_ChaikinSmoothing - Availability: 2.5.0 Returns a smoothed version of a geometry, using the Chaikin algorithm
  • ST_FilterByM - Availability: 2.5.0 Removes vertices based on their M value
  • ST_LineInterpolatePoints - Availability: 2.5.0 Returns points interpolated along a line at a fractional interval.
  • ST_OrientedEnvelope - Availability: 2.5.0. Returns a minimum-area rectangle containing a geometry.
  • ST_QuantizeCoordinates - Availability: 2.5.0 Sets least significant bits of coordinates to zero

Functions enhanced in PostGIS 2.5

  • ST_AsMVT - Enhanced: 2.5.0 - added support parallel query. Aggregate function returning a MVT representation of a set of rows.
  • ST_AsText - Enhanced: 2.5 - optional parameter precision introduced. Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.
  • ST_Buffer - Enhanced: 2.5.0 - ST_Buffer geometry support was enhanced to allow for side buffering specification side=both|left|right. Computes a geometry covering all points within a given distance from a geometry.
  • ST_GeomFromGeoJSON - Enhanced: 2.5.0 can now accept json and jsonb as inputs. Toma como entrada una representación geojson de una geometría y devuelve un objeto geométrico PostGIS
  • ST_GeometricMedian - Enhanced: 2.5.0 Added support for M as weight of points. Returns the geometric median of a MultiPoint.
  • ST_Intersects - Enhanced: 2.5.0 Supports GEOMETRYCOLLECTION. Tests if two geometries intersect (they have at least one point in common)
  • ST_OffsetCurve - Enhanced: 2.5 - added support for GEOMETRYCOLLECTION and MULTILINESTRING Returns an offset line at a given distance and side from an input line.
  • ST_Scale - Enhanced: 2.5.0 support for scaling relative to a local origin (origin parameter) was introduced. Scales a geometry by given factors.
  • ST_Split - Enhanced: 2.5.0 support for splitting a polygon by a multiline was introduced. Returns a collection of geometries created by splitting a geometry by another geometry.
  • ST_Subdivide - Enhanced: 2.5.0 reuses existing points on polygon split, vertex count is lowered from 8 to 5. Computes a rectilinear subdivision of a geometry.

12.12.7. PostGIS Functions new or enhanced in 2.4

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 2.4

  • ST_AsGeobuf - Availability: 2.4.0 Return a Geobuf representation of a set of rows.
  • ST_AsMVT - Availability: 2.4.0 Aggregate function returning a MVT representation of a set of rows.
  • ST_AsMVTGeom - Availability: 2.4.0 Transforms a geometry into the coordinate space of a MVT tile.
  • ST_Centroid - Availability: 2.4.0 support for geography was introduced. Returns the geometric center of a geometry.
  • ST_ForcePolygonCCW - Availability: 2.4.0 Orienta todos los aros exteriores en sentido contrario a las agujas del reloj y todos los aros interiores en sentido horario.
  • ST_ForcePolygonCW - Availability: 2.4.0 Orienta todos los anillos exteriores en el sentido de las agujas del reloj y todos los anillos interiores en sentido contrario a las agujas del reloj.
  • ST_FrechetDistance - Availability: 2.4.0 - requires GEOS >= 3.7.0 Returns the Fréchet distance between two geometries.
  • ST_IsPolygonCCW - Disponibilidad: 2.2.0 Devuelve true si todos los aros exteriores están orientados hacia la izquierda y todos los aros interiores están orientados hacia la derecha.
  • ST_IsPolygonCW - Disponibilidad: 2.2.0 Devuelve true si todos los aros exteriores están orientados hacia la derecha y todos los aros interiores están orientados en sentido contrario a las agujas del reloj.

Functions enhanced in PostGIS 2.4

  • ST_AsTWKB - Enhanced: 2.4.0 memory and speed improvements. Returns the geometry as TWKB, aka "Tiny Well-Known Binary"
  • ST_Covers - Enhanced: 2.4.0 Support for polygon in polygon and line in polygon added for geography type Tests if every point of B lies in A
  • ST_CurveToLine - Enhanced: 2.4.0 added support for max-deviation and max-angle tolerance, and for symmetric output. Converts a geometry containing curves to a linear geometry.
  • ST_Project - Enhanced: 2.4.0 Allow negative distance and non-normalized azimuth. Returns a point projected from a start point by a distance and bearing (azimuth).
  • ST_Reverse - Mejorada: 2.4.0 se introdujo el soporte para curvas. Devuelve la geometría con el orden de vértice invertido.

Functions changed in PostGIS 2.4

  • = - Changed: 2.4.0, in prior versions this was bounding box equality not a geometric equality. If you need bounding box equality, use instead. Returns TRUE if the coordinates and coordinate order geometry/geography A are the same as the coordinates and coordinate order of geometry/geography B.
  • ST_Node - Changed: 2.4.0 this function uses GEOSNode internally instead of GEOSUnaryUnion. This may cause the resulting linestrings to have a different order and direction compared to PostGIS < 2.4. Nodes a collection of lines.

12.12.8. PostGIS Functions new or enhanced in 2.3

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 2.3

  • &&&(geometry,gidx) - Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced. Requires PostgreSQL 9.5+. Returns TRUE if a geometry's (cached) n-D bounding box intersects a n-D float precision bounding box (GIDX).
  • &&&(gidx,geometry) - Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced. Requires PostgreSQL 9.5+. Returns TRUE if a n-D float precision bounding box (GIDX) intersects a geometry's (cached) n-D bounding box.
  • &&&(gidx,gidx) - Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced. Requires PostgreSQL 9.5+. Returns TRUE if two n-D float precision bounding boxes (GIDX) intersect each other.
  • &&(box2df,box2df) - Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced. Requires PostgreSQL 9.5+. Returns TRUE if two 2D float precision bounding boxes (BOX2DF) intersect each other.
  • &&(box2df,geometry) - Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced. Requires PostgreSQL 9.5+. Returns TRUE if a 2D float precision bounding box (BOX2DF) intersects a geometry's (cached) 2D bounding box.
  • &&(geometry,box2df) - Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced. Requires PostgreSQL 9.5+. Returns TRUE if a geometry's (cached) 2D bounding box intersects a 2D float precision bounding box (BOX2DF).
  • @(box2df,box2df) - Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced. Requires PostgreSQL 9.5+. Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into another 2D float precision bounding box.
  • @(box2df,geometry) - Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced. Requires PostgreSQL 9.5+. Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into a geometry's 2D bounding box.
  • @(geometry,box2df) - Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced. Requires PostgreSQL 9.5+. Returns TRUE if a geometry's 2D bounding box is contained into a 2D float precision bounding box (BOX2DF).
  • ST_ClusterDBSCAN - Availability: 2.3.0 Window function that returns a cluster id for each input geometry using the DBSCAN algorithm.
  • ST_ClusterKMeans - Availability: 2.3.0 Window function that returns a cluster id for each input geometry using the K-means algorithm.
  • ST_GeneratePoints - Disponibilidad: 2.3.0 Generates random points contained in a Polygon or MultiPolygon.
  • ST_GeometricMedian - Disponibilidad: 2.3.0 Returns the geometric median of a MultiPoint.
  • ST_MakeLine - Disponibilidad: 2.3.0 - Se introdujo soporte para elementos de entrada multipunto Crea una cadena de línea desde geometrías de punto, multipunto o de línea.
  • ST_MinimumBoundingRadius - Disponibilidad: 2.3.0 Returns the center point and radius of the smallest circle that contains a geometry.
  • ST_MinimumClearance - Disponibilidad: 2.3.0 Returns the minimum clearance of a geometry, a measure of a geometry's robustness.
  • ST_MinimumClearanceLine - Availability: 2.3.0 - requires GEOS >= 3.6.0 Returns the two-point LineString spanning a geometry's minimum clearance.
  • ST_Normalize - Disponibilidad: 2.3.0 Devuelve la geometría en su forma canónica.
  • ST_Points - Disponibilidad: 2.3.0 Devuelve un MultiPoint que contiene todas las coordenadas de una geometría.
  • ST_VoronoiLines - Disponibilidad: 2.3.0 Returns the boundaries of the Voronoi diagram of the vertices of a geometry.
  • ST_VoronoiPolygons - Disponibilidad: 2.3.0 Returns the cells of the Voronoi diagram of the vertices of a geometry.
  • ST_WrapX - Availability: 2.3.0 requires GEOS Wrap a geometry around an X value.
  • ~(box2df,box2df) - Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced. Requires PostgreSQL 9.5+. Returns TRUE if a 2D float precision bounding box (BOX2DF) contains another 2D float precision bounding box (BOX2DF).
  • ~(box2df,geometry) - Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced. Requires PostgreSQL 9.5+. Returns TRUE if a 2D float precision bounding box (BOX2DF) contains a geometry's 2D bonding box.
  • ~(geometry,box2df) - Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced. Requires PostgreSQL 9.5+. Returns TRUE if a geometry's 2D bonding box contains a 2D float precision bounding box (GIDX).

Functions enhanced in PostGIS 2.3

  • ST_Contains - Enhanced: 2.3.0 Enhancement to PIP short-circuit extended to support MultiPoints with few points. Prior versions only supported point in polygon. Tests if every point of B lies in A, and their interiors have a point in common
  • ST_Covers - Enhanced: 2.3.0 Enhancement to PIP short-circuit for geometry extended to support MultiPoints with few points. Prior versions only supported point in polygon. Tests if every point of B lies in A
  • ST_Expand - Enhanced: 2.3.0 support was added to expand a box by different amounts in different dimensions. Returns a bounding box expanded from another bounding box or a geometry.
  • ST_Intersects - Enhanced: 2.3.0 Enhancement to PIP short-circuit extended to support MultiPoints with few points. Prior versions only supported point in polygon. Tests if two geometries intersect (they have at least one point in common)
  • ST_Segmentize - Enhanced: 2.3.0 Segmentize geography now produces equal-length subsegments Returns a modified geometry/geography having no segment longer than a given distance.
  • ST_Transform - Enhanced: 2.3.0 support for direct PROJ.4 text was introduced. Return a new geometry with coordinates transformed to a different spatial reference system.
  • ST_Within - Enhanced: 2.3.0 Enhancement to PIP short-circuit for geometry extended to support MultiPoints with few points. Prior versions only supported point in polygon. Tests if every point of A lies in B, and their interiors have a point in common

Functions changed in PostGIS 2.3

  • ST_PointN - Cambiado: 2.3.0: indexación negativa disponible (-1 es el último punto) Devuelve el número de puntos en un valor ST_LineString o ST_CircularString.

12.12.9. PostGIS Functions new or enhanced in 2.2

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 2.2

  • <<#>> - Availability: 2.2.0 -- KNN only available for PostgreSQL 9.1+ Returns the n-D distance between A and B bounding boxes.
  • <<->> - Availability: 2.2.0 -- KNN only available for PostgreSQL 9.1+ Returns the n-D distance between the centroids of A and B bounding boxes.
  • ST_3DDifference - Disponibilidad: 2.2.0 Perform 3D difference
  • ST_3DUnion - Disponibilidad: 2.2.0 Perform 3D union.
  • ST_ApproximateMedialAxis - Disponibilidad: 2.2.0 Compute the approximate medial axis of an areal geometry.
  • ST_AsEncodedPolyline - Disponibilidad: 2.2.0 Returns an Encoded Polyline from a LineString geometry.
  • ST_AsTWKB - Disponibilidad: 2.2.0 Returns the geometry as TWKB, aka "Tiny Well-Known Binary"
  • ST_BoundingDiagonal - Disponibilidad: 2.2.0 Devuelve la diagonal del cuadro delimitador de la geometría suministrada.
  • ST_CPAWithin - Availability: 2.2.0 Tests if the closest point of approach of two trajectories is within the specified distance.
  • ST_ClipByBox2D - Availability: 2.2.0 Computes the portion of a geometry falling within a rectangle.
  • ST_ClosestPointOfApproach - Availability: 2.2.0 Returns a measure at the closest point of approach of two trajectories.
  • ST_ClusterIntersecting - Availability: 2.2.0 Aggregate function that clusters input geometries into connected sets.
  • ST_ClusterWithin - Availability: 2.2.0 Aggregate function that clusters geometries by separation distance.
  • ST_DistanceCPA - Availability: 2.2.0 Returns the distance between the closest point of approach of two trajectories.
  • ST_ForceCurve - Disponibilidad: 2.2.0 Relanzar una geometría en su tipo curvo, si corresponde.
  • ST_IsPlanar - Availability: 2.2.0: This was documented in 2.1.0 but got accidentally left out in 2.1 release. Check if a surface is or not planar
  • ST_IsSolid - Disponibilidad: 2.2.0 Test if the geometry is a solid. No validity check is performed.
  • ST_IsValidTrajectory - Availability: 2.2.0 Tests if the geometry is a valid trajectory.
  • ST_LineFromEncodedPolyline - Disponibilidad: 2.2.0 Crea un LineString desde una polilínea codificada.
  • ST_MakeSolid - Disponibilidad: 2.2.0 Cast the geometry into a solid. No check is performed. To obtain a valid solid, the input geometry must be a closed Polyhedral Surface or a closed TIN.
  • ST_RemoveRepeatedPoints - Disponibilidad: 2.2.0 Returns a version of a geometry with duplicate points removed.
  • ST_SetEffectiveArea - Disponibilidad: 2.2.0 Sets the effective area for each vertex, using the Visvalingam-Whyatt algorithm.
  • ST_SimplifyVW - Disponibilidad: 2.2.0 Returns a simplified version of a geometry, using the Visvalingam-Whyatt algorithm
  • ST_Subdivide - Availability: 2.2.0 Computes a rectilinear subdivision of a geometry.
  • ST_SwapOrdinates - Disponibilidad: 2.2.0 Returns a version of the given geometry with given ordinate values swapped.
  • ST_Volume - Disponibilidad: 2.2.0 Computes the volume of a 3D solid. If applied to surface (even closed) geometries will return 0.
  • postgis.enable_outdb_rasters - Disponibilidad: 2.2.0 A boolean configuration option to enable access to out-db raster bands.
  • postgis.gdal_datapath - Disponibilidad: 2.2.0 A configuration option to assign the value of GDAL's GDAL_DATA option. If not set, the environmentally set GDAL_DATA variable is used.
  • postgis.gdal_enabled_drivers - Disponibilidad: 2.2.0 A configuration option to set the enabled GDAL drivers in the PostGIS environment. Affects the GDAL configuration variable GDAL_SKIP.
  • |=| - Availability: 2.2.0. Index-supported only available for PostgreSQL 9.5+ Returns the distance between A and B trajectories at their closest point of approach.

Functions enhanced in PostGIS 2.2

  • <-> - Enhanced: 2.2.0 -- True KNN ("K nearest neighbor") behavior for geometry and geography for PostgreSQL 9.5+. Note for geography KNN is based on sphere rather than spheroid. For PostgreSQL 9.4 and below, geography support is new but only supports centroid box. Returns the 2D distance between A and B.
  • ST_Area - Enhanced: 2.2.0 - measurement on spheroid performed with GeographicLib for improved accuracy and robustness. Requires PROJ >= 4.9.0 to take advantage of the new feature. Returns the area of a polygonal geometry.
  • ST_AsX3D - Enhanced: 2.2.0: Support for GeoCoordinates and axis (x/y, long/lat) flipping. Look at options for details. Returns a Geometry in X3D xml node element format: ISO-IEC-19776-1.2-X3DEncodings-XML
  • ST_Azimuth - Enhanced: 2.2.0 measurement on spheroid performed with GeographicLib for improved accuracy and robustness. Requires PROJ >= 4.9.0 to take advantage of the new feature. Returns the north-based azimuth of a line between two points.
  • ST_Distance - Enhanced: 2.2.0 - measurement on spheroid performed with GeographicLib for improved accuracy and robustness. Requires PROJ >= 4.9.0 to take advantage of the new feature. Returns the distance between two geometry or geography values.
  • ST_Scale - Enhanced: 2.2.0 support for scaling all dimension (factor parameter) was introduced. Scales a geometry by given factors.
  • ST_Split - Enhanced: 2.2.0 support for splitting a line by a multiline, a multipoint or (multi)polygon boundary was introduced. Returns a collection of geometries created by splitting a geometry by another geometry.
  • ST_Summary - Mejorado: 2.2.0 agregó soporte para TIN y curvas Devuelve un resumen de texto del contenido de la geometría.

Functions changed in PostGIS 2.2

  • <-> - Changed: 2.2.0 -- For PostgreSQL 9.5 users, old Hybrid syntax may be slower, so you'll want to get rid of that hack if you are running your code only on PostGIS 2.2+ 9.5+. See examples below. Returns the 2D distance between A and B.
  • ST_3DClosestPoint - Changed: 2.2.0 - if 2 2D geometries are input, a 2D point is returned (instead of old behavior assuming 0 for missing Z). In case of 2D and 3D, Z is no longer assumed to be 0 for missing Z. Returns the 3D point on g1 that is closest to g2. This is the first point of the 3D shortest line.
  • ST_3DDistance - Changed: 2.2.0 - In case of 2D and 3D, Z is no longer assumed to be 0 for missing Z. Returns the 3D cartesian minimum distance (based on spatial ref) between two geometries in projected units.
  • ST_3DLongestLine - Changed: 2.2.0 - if 2 2D geometries are input, a 2D point is returned (instead of old behavior assuming 0 for missing Z). In case of 2D and 3D, Z is no longer assumed to be 0 for missing Z. Returns the 3D longest line between two geometries
  • ST_3DMaxDistance - Changed: 2.2.0 - In case of 2D and 3D, Z is no longer assumed to be 0 for missing Z. Returns the 3D cartesian maximum distance (based on spatial ref) between two geometries in projected units.
  • ST_3DShortestLine - Changed: 2.2.0 - if 2 2D geometries are input, a 2D point is returned (instead of old behavior assuming 0 for missing Z). In case of 2D and 3D, Z is no longer assumed to be 0 for missing Z. Returns the 3D shortest line between two geometries
  • ST_DistanceSphere - Changed: 2.2.0 In prior versions this used to be called ST_Distance_Sphere Returns minimum distance in meters between two lon/lat geometries using a spherical earth model.
  • ST_DistanceSpheroid - Changed: 2.2.0 In prior versions this was called ST_Distance_Spheroid Returns the minimum distance between two lon/lat geometries using a spheroidal earth model.
  • ST_Equals - Changed: 2.2.0 Returns true even for invalid geometries if they are binary equal Tests if two geometries include the same set of points
  • ST_LengthSpheroid - Changed: 2.2.0 In prior versions this was called ST_Length_Spheroid and had the alias ST_3DLength_Spheroid Returns the 2D or 3D length/perimeter of a lon/lat geometry on a spheroid.
  • ST_MemSize - Changed: 2.2.0 name changed to ST_MemSize to follow naming convention. Devuelve el tipo de geometría del valor de ST_Geometry.
  • ST_PointInsideCircle - Changed: 2.2.0 In prior versions this was called ST_Point_Inside_Circle Tests if a point geometry is inside a circle defined by a center and radius

12.12.10. PostGIS Functions new or enhanced in 2.1

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 2.1

  • ST_3DArea - Disponibilidad: 2.1.0 Computes area of 3D surface geometries. Will return 0 for solids.
  • ST_3DIntersection - Disponibilidad: 2.1.0 Perform 3D intersection
  • ST_Box2dFromGeoHash - Disponibilidad: 2.1.0 Devuelve un BOX2D de una cadena de GeoHash.
  • ST_DelaunayTriangles - Disponibilidad: 2.1.0 Returns the Delaunay triangulation of the vertices of a geometry.
  • ST_Extrude - Disponibilidad: 2.1.0 Extrude a surface to a related volume
  • ST_ForceLHR - Disponibilidad: 2.1.0 Force LHR orientation
  • ST_GeomFromGeoHash - Disponibilidad: 2.1.0 Devuelve una geometría de una cadena de GeoHash.
  • ST_MinkowskiSum - Disponibilidad: 2.1.0 Performs Minkowski sum
  • ST_Orientation - Disponibilidad: 2.1.0 Determine surface orientation
  • ST_PointFromGeoHash - Disponibilidad: 2.1.0 Devuelve un punto de una cadena de GeoHash.
  • ST_StraightSkeleton - Disponibilidad: 2.1.0 Compute a straight skeleton from a geometry
  • ST_Tesselate - Disponibilidad: 2.1.0 Perform surface Tesselation of a polygon or polyhedralsurface and returns as a TIN or collection of TINS
  • postgis_sfcgal_version - Disponibilidad: 2.1.0 Returns the version of SFCGAL in use

Functions enhanced in PostGIS 2.1

  • ST_AsGML - Enhanced: 2.1.0 id support was introduced, for GML 3. Return the geometry as a GML version 2 or 3 element.
  • ST_Boundary - Mejorado: 2.1.0 Se ha introducido soporte para Triangle Devuelve el cierre del limite combinatorio de esta geometría.
  • ST_DWithin - Enhanced: 2.1.0 improved speed for geography. See Making Geography faster for details. Tests if two geometries are within a given distance
  • ST_DWithin - Enhanced: 2.1.0 support for curved geometries was introduced. Tests if two geometries are within a given distance
  • ST_Distance - Enhanced: 2.1.0 improved speed for geography. See Making Geography faster for details. Returns the distance between two geometry or geography values.
  • ST_Distance - Enhanced: 2.1.0 - support for curved geometries was introduced. Returns the distance between two geometry or geography values.
  • ST_DumpPoints - Enhanced: 2.1.0 Faster speed. Reimplemented as native-C. Devuelve un resumen de texto del contenido de la geometría.
  • ST_MakeValid - Enhanced: 2.1.0, added support for GEOMETRYCOLLECTION and MULTIPOINT. Attempts to make an invalid geometry valid without losing vertices.
  • ST_Segmentize - Mejorada: 2.1.0 se introdujo el soporte para geography. Returns a modified geometry/geography having no segment longer than a given distance.
  • ST_Summary - Mejorada: 2.1.0 Indicador S para señalar si tiene un sistema de referencia espacial conocido Devuelve un resumen de texto del contenido de la geometría.

Functions changed in PostGIS 2.1

  • ST_EstimatedExtent - Changed: 2.1.0. Up to 2.0.x this was called ST_Estimated_Extent. Returns the estimated extent of a spatial table.
  • ST_Force2D - Cambiado: 2.1.0. Hasta la 2.0.x esto se llamaba ST_Force_2D. Forzar las geometrías en un "modo de 2 dimensiones".
  • ST_Force3D - Cambiado: 2.1.0. Hasta la 2.0.x esto se llamaba ST_Force_3D. Forzar las geometrías en modo XYZ. Este es un alias para ST_Force3DZ.
  • ST_Force3DM - Cambiado: 2.1.0. Hasta la 2.0.x esto se llamaba ST_Force_3DM. Fuerza las geometrías en modo XYM.
  • ST_Force3DZ - Cambiado: 2.1.0. Hasta la 2.0.x esto se llamaba ST_Force_3DZ. Fuerza las geometrías en modo XYZ.
  • ST_Force4D - Cambiado: 2.1.0. Hasta la 2.0.x esto se llamaba ST_Force_4D. Fuerza las geometrías en modo XYZM.
  • ST_ForceCollection - Cambiado: 2.1.0. Hasta la 2.0.x esto se llamaba ST_Force_Collection. Convertir la geometría en una GEOMETRYCOLLECTION.
  • ST_LineInterpolatePoint - Cambiado: 2.1.0. Hasta 2.0. x esto se llamaba ST_Line_Interpolate_Point. Returns a point interpolated along a line at a fractional location.
  • ST_LineLocatePoint - Modificado: 2.1.0. Hasta 2.0.x esto se llamaba ST_Line_Locate_Point. Returns the fractional location of the closest point on a line to a point.
  • ST_LineSubstring - Modificado: 2.1.0. Hasta 2.0.x esto se llamaba ST_Line_Substring. Returns the part of a line between two fractional locations.
  • ST_Segmentize - Changed: 2.1.0 As a result of the introduction of geography support, the usage ST_Segmentize('LINESTRING(1 2, 3 4)', 0.5) causes an ambiguous function error. The input needs to be properly typed as a geometry or geography. Use ST_GeomFromText, ST_GeogFromText or a cast to the required type (e.g. ST_Segmentize('LINESTRING(1 2, 3 4)'::geometry, 0.5) ) Returns a modified geometry/geography having no segment longer than a given distance.

12.12.11. PostGIS Functions new or enhanced in 2.0

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 2.0

  • &&& - Disponibilidad: 2.0.0 Returns TRUE if A's n-D bounding box intersects B's n-D bounding box.
  • <#> - Availability: 2.0.0 -- KNN only available for PostgreSQL 9.1+ Returns the 2D distance between A and B bounding boxes.
  • <-> - Availability: 2.0.0 -- Weak KNN provides nearest neighbors based on geometry centroid distances instead of true distances. Exact results for points, inexact for all other types. Available for PostgreSQL 9.1+ Returns the 2D distance between A and B.
  • ST_3DClosestPoint - Disponibilidad: 2.0.0 Returns the 3D point on g1 that is closest to g2. This is the first point of the 3D shortest line.
  • ST_3DDFullyWithin - Availability: 2.0.0 Tests if two 3D geometries are entirely within a given 3D distance
  • ST_3DDWithin - Availability: 2.0.0 Tests if two 3D geometries are within a given 3D distance
  • ST_3DDistance - Disponibilidad: 2.0.0 Returns the 3D cartesian minimum distance (based on spatial ref) between two geometries in projected units.
  • ST_3DIntersects - Availability: 2.0.0 Tests if two geometries spatially intersect in 3D - only for points, linestrings, polygons, polyhedral surface (area)
  • ST_3DLongestLine - Disponibilidad: 2.0.0 Returns the 3D longest line between two geometries
  • ST_3DMaxDistance - Disponibilidad: 2.0.0 Returns the 3D cartesian maximum distance (based on spatial ref) between two geometries in projected units.
  • ST_3DShortestLine - Disponibilidad: 2.0.0 Returns the 3D shortest line between two geometries
  • ST_AsLatLonText - Disponibilidad: 2.0 Return the Degrees, Minutes, Seconds representation of the given point.
  • ST_AsX3D - Availability: 2.0.0: ISO-IEC-19776-1.2-X3DEncodings-XML Returns a Geometry in X3D xml node element format: ISO-IEC-19776-1.2-X3DEncodings-XML
  • ST_CollectionHomogenize - Disponibilidad: 2.0.0 Returns the simplest representation of a geometry collection.
  • ST_ConcaveHull - Disponibilidad: 2.0.0 Computes a possibly concave geometry that contains all input geometry vertices
  • ST_FlipCoordinates - Disponibilidad: 2.0.0 Returns a version of a geometry with X and Y axis flipped.
  • ST_GeomFromGeoJSON - Disponibilidad: 2.0.0 necesita de - JSON-C >= 0.9 Toma como entrada una representación geojson de una geometría y devuelve un objeto geométrico PostGIS
  • ST_InterpolatePoint - Disponibilidad: 2.0.0 Devuelve el valor de la dimensión medida de una geometría en el punto cerrado al punto proporcionado.
  • ST_IsValidDetail - Availability: 2.0.0 Returns a valid_detail row stating if a geometry is valid or if not a reason and a location.
  • ST_IsValidReason - Availability: 2.0 version taking flags. Returns text stating if a geometry is valid, or a reason for invalidity.
  • ST_MakeLine - Disponibilidad: 2.0.0 - Se introdujo el soporte de una cadena lineal como elemento de entrada Crea una cadena de línea desde geometrías de punto, multipunto o de línea.
  • ST_MakeValid - Availability: 2.0.0 Attempts to make an invalid geometry valid without losing vertices.
  • ST_Node - Availability: 2.0.0 Nodes a collection of lines.
  • ST_NumPatches - Disponibilidad: 2.0.0 Devuelve el número de caras en una superficie poliédrica. Devolverá nulo para geometrías no poliédricas.
  • ST_OffsetCurve - Disponibilidad: 2.0 Returns an offset line at a given distance and side from an input line.
  • ST_PatchN - Disponibilidad: 2.0.0 Devuelve el tipo de geometría del valor de ST_Geometry.
  • ST_Perimeter - Availability 2.0.0: Support for geography was introduced Returns the length of the boundary of a polygonal geometry or geography.
  • ST_Project - Disponibilidad: 2.0.0 Returns a point projected from a start point by a distance and bearing (azimuth).
  • ST_RelateMatch - Availability: 2.0.0 Tests if a DE-9IM Intersection Matrix matches an Intersection Matrix pattern
  • ST_SharedPaths - Disponibilidad: 2.0.0 Returns a collection containing paths shared by the two input linestrings/multilinestrings.
  • ST_Snap - Disponibilidad: 2.0.0 Ajusta segmentos y vértices de la geometría de entrada a vértices de una geometría de referencia.
  • ST_Split - Availability: 2.0.0 requires GEOS Returns a collection of geometries created by splitting a geometry by another geometry.
  • ST_UnaryUnion - Availability: 2.0.0 Computes the union of the components of a single geometry.

Functions enhanced in PostGIS 2.0

  • && - Mejorado: 2.0.0 soporte para superficies poliédricas fue introducida. Returns TRUE if A's 2D bounding box intersects B's 2D bounding box.
  • AddGeometryColumn - Mejorada: 2.0.0 introducción del argumento use_typmod. El valor predeterminado es crearcolumnas de geometrías basadas en typmod en lugar de las basadas en restricciones. Suprime una columna de geometrías de una tabla espacial.
  • Box2D - Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Returns a BOX2D representing the 2D extent of a geometry.
  • Box3D - Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Returns a BOX3D representing the 3D extent of a geometry.
  • GeometryType - Mejorado: 2.0.0 se introdujo soporte para superficies poliédricas, Triangulos y TIN. Devuelve el tipo de geometría del valor de ST_Geometry.
  • Populate_Geometry_Columns - Mejorado: 2.0.0 el argumento opcional use_typmod fue introducido y permite controlar si las columnas se crean con modificadores de tipo o con restricciones de tipo check. Ensures geometry columns are defined with type modifiers or have appropriate spatial constraints.
  • ST_3DExtent - Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Aggregate function that returns the 3D bounding box of geometries.
  • ST_Affine - Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Apply a 3D affine transformation to a geometry.
  • ST_Area - Enhanced: 2.0.0 - support for 2D polyhedral surfaces was introduced. Returns the area of a polygonal geometry.
  • ST_AsBinary - Mejorado: 2.0.0 soporte para superficies poliédricas, triángulos y TIN fue introducida. Return the OGC/ISO Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
  • ST_AsBinary - Enhanced: 2.0.0 support for higher coordinate dimensions was introduced. Return the OGC/ISO Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
  • ST_AsBinary - Enhanced: 2.0.0 support for specifying endian with geography was introduced. Return the OGC/ISO Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
  • ST_AsEWKB - Mejorado: 2.0.0 soporte para superficies poliédricas, triángulos y TIN fue introducida. Return the Extended Well-Known Binary (EWKB) representation of the geometry with SRID meta data.
  • ST_AsEWKT - Enhanced: 2.0.0 support for Geography, Polyhedral surfaces, Triangles and TIN was introduced. Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.
  • ST_AsGML - Enhanced: 2.0.0 prefix support was introduced. Option 4 for GML3 was introduced to allow using LineString instead of Curve tag for lines. GML3 Support for Polyhedral surfaces and TINS was introduced. Option 32 was introduced to output the box. Return the geometry as a GML version 2 or 3 element.
  • ST_AsKML - Enhanced: 2.0.0 - Add prefix namespace, use default and named args Return the geometry as a KML element.
  • ST_Azimuth - Enhanced: 2.0.0 support for geography was introduced. Returns the north-based azimuth of a line between two points.
  • ST_Dimension - Mejora: 2.0.0 se introdujeron soporte de superficies poliédricas y TIN. No lanza una excepción si se envia una geometría vacía. Devuelve la dimensión de las coordenadas del valor de ST_Geometry.
  • ST_Dump - Mejorado: 2.0.0 se introdujo soporte para superficies poliédricas, Triangulos y TIN. Returns a set of geometry_dump rows for the components of a geometry.
  • ST_DumpPoints - Mejorado: 2.0.0 se introdujo soporte para superficies poliédricas, Triangulos y TIN. Devuelve un resumen de texto del contenido de la geometría.
  • ST_Expand - Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Returns a bounding box expanded from another bounding box or a geometry.
  • ST_Extent - Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Aggregate function that returns the bounding box of geometries.
  • ST_Force2D - Mejorado: 2.0.0 soporte para superficies poliédricas fue introducida. Forzar las geometrías en un "modo de 2 dimensiones".
  • ST_Force3D - Mejorado: 2.0.0 soporte para superficies poliédricas fue introducida. Forzar las geometrías en modo XYZ. Este es un alias para ST_Force3DZ.
  • ST_Force3DZ - Mejorado: 2.0.0 soporte para superficies poliédricas fue introducida. Fuerza las geometrías en modo XYZ.
  • ST_ForceCollection - Mejorado: 2.0.0 soporte para superficies poliédricas fue introducida. Convertir la geometría en una GEOMETRYCOLLECTION.
  • ST_ForceRHR - Mejorado: 2.0.0 soporte para superficies poliédricas fue introducida. Fuerza la orientación de los vértices en un polígono para seguir la regla de la mano derecha.
  • ST_GMLToSQL - Mejora: 2.0.0 se introdujeron soporte de superficies poliédricas y TIN. Devuelve un valor especifico ST_Geometry desde una representación GML. Esto es un alias de ST_GeomFromGML
  • ST_GMLToSQL - Mejorada: 2.0.0 se agregó el parámetro por defecto opcional srid. Devuelve un valor especifico ST_Geometry desde una representación GML. Esto es un alias de ST_GeomFromGML
  • ST_GeomFromEWKB - Mejora: 2.0.0 se introdujeron soporte de superficies poliédricas y TIN. Devuelve un valor especifico de ST_Geometry desde una representación " Extended Well-Known Binary" (EWKB).
  • ST_GeomFromEWKT - Mejora: 2.0.0 se introdujeron soporte de superficies poliédricas y TIN. Devuelve un valor especificado ST_Geometry desde una representación "Extended Well-Known Text" (EWKT).
  • ST_GeomFromGML - Mejora: 2.0.0 se introdujeron soporte de superficies poliédricas y TIN. Toma una representación GML como entrada de una geometría y extrae un objeto geométrico PostGIS
  • ST_GeomFromGML - Mejorada: 2.0.0 se agregó el parámetro por defecto opcional srid. Toma una representación GML como entrada de una geometría y extrae un objeto geométrico PostGIS
  • ST_GeometryN - Mejorado: 2.0.0 se introdujo soporte para superficies poliédricas, Triangulos y TIN. Devuelve el tipo de geometría del valor de ST_Geometry.
  • ST_GeometryType - Mejora: 2.0.0 se introdujo soporte de superficies poliédricas. Devuelve el tipo de geometría del valor de ST_Geometry.
  • ST_IsClosed - Mejora: 2.0.0 se introdujo soporte de superficies poliédricas. Devuelve TRUE si los puntos de inicio y final de una LINESTRINGson coincidentes. Para superficies poliedricas si son cerradas (volumetricas).
  • ST_MakeEnvelope - Mejorado: 2.0: Se introdujo capacidad de especificar una caja sin especificar un SRID. Crea un polígono rectangular formado a partir de los mínimos y máximos especificados. Los valores de entrada deben estar en el SRS especificado en el SRID.
  • ST_MakeValid - Enhanced: 2.0.1, speed improvements Attempts to make an invalid geometry valid without losing vertices.
  • ST_NPoints - Mejora: 2.0.0 se introdujo soporte de superficies poliédricas. Devuelve el numero de puntos (vértices) en la geometría.
  • ST_NumGeometries - Mejorado: 2.0.0 se introdujo soporte para superficies poliédricas, Triangulos y TIN. Devuelve el numero de puntos en la geometría. Funciona con todas las geometrías.
  • ST_Relate - Enhanced: 2.0.0 - added support for specifying boundary node rule. Tests if two geometries have a topological relationship matching an Intersection Matrix pattern, or computes their Intersection Matrix
  • ST_Rotate - Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Rotates a geometry about an origin point.
  • ST_Rotate - Enhanced: 2.0.0 additional parameters for specifying the origin of rotation were added. Rotates a geometry about an origin point.
  • ST_RotateX - Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Rotates a geometry about the X axis.
  • ST_RotateY - Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Rotates a geometry about the Y axis.
  • ST_RotateZ - Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Rotates a geometry about the Z axis.
  • ST_Scale - Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Scales a geometry by given factors.
  • ST_ShiftLongitude - Mejora: 2.0.0 se introdujeron soporte de superficies poliédricas y TIN. Shifts the longitude coordinates of a geometry between -180..180 and 0..360.
  • ST_Summary - Mejorado: 2.0.0 agregó soporte para geography Devuelve un resumen de texto del contenido de la geometría.
  • ST_Transform - Enhanced: 2.0.0 support for Polyhedral surfaces was introduced. Return a new geometry with coordinates transformed to a different spatial reference system.

Functions changed in PostGIS 2.0

  • AddGeometryColumn - Cambiado: 2.0.0 Esta función ya no se actualiza desde geometry_columns ya que geometry_columns es una vista que se lee dede los catálogos del sistema. Por defecto tampoco crea las restricciones, sino que utiliza el modificador de tipo de PostgreSQL. Así que para la construcción de una columna de tipo POINT en wgs84 con esta función ejemplo que hoy es equivalente a: ALTER TABLE some_table ADD COLUMN geom geometry(Point,4326); Suprime una columna de geometrías de una tabla espacial.
  • AddGeometryColumn - Cambiado: 2.0.0 Si necesitas el comportamiento antiguo de restricciones, utiliza el valor predeterminado use_typmod, pero cambiala a false. Suprime una columna de geometrías de una tabla espacial.
  • AddGeometryColumn - Cambiado: 2.0.0 Las Vistas ya no pueden ser registradas manualmente en geometry_columns, no obstante las vistas se que construyan a partir de geometrías typmod de las tablas de geometrías y sean utilizadas ​​sin funciones wrapper se registraran correctamente porque heredan el comportamiento typmod de su columna de la tabla padre. Las vistas que utilizan funciones de geometría que devuelvan geometrías necesitarán de transformación cast a geometrías typmod para esta columnas de geometrías de la vista y que se registren correctamente en geometry_columns. Consulta . Suprime una columna de geometrías de una tabla espacial.
  • DropGeometryColumn - Cambiado: 2.0.0 Se proporciona esta función para la compatibilidad con versiones anteriores. Ahora que geometry_columns es una vista y no un catálogo del sistema, se puede eliminar una columna de geometría como cualquier otra columna de la tabla utilizando ALTER TABLE Suprime una columna de geometrías de una tabla espacial.
  • DropGeometryTable - Cambiado: 2.0.0 Se proporciona esta función para la compatibilidad con versiones anteriores. Ahora que geometry_columns es una vista y no un catálogo del sistema, se puede borrar una tabla con columnas de geometría como cualquier otra tabla utilizando DROP TABLE Borra una tabla y todas sus referencias en la tabla geómetra_columns.
  • Populate_Geometry_Columns - Cambiado: 2.0.0 Por defecto, ahora utiliza modificadores de tipo en lugar de restricciones de tipo check para limitar los tipos de geometría. Puedes seguir utilizando el comportamiento de las restricciones check con el uso de la nueva variable use_typmod y estableciéndolo a false. Ensures geometry columns are defined with type modifiers or have appropriate spatial constraints.
  • ST_3DExtent - Changed: 2.0.0 In prior versions this used to be called ST_Extent3D Aggregate function that returns the 3D bounding box of geometries.
  • ST_3DLength - Changed: 2.0.0 In prior versions this used to be called ST_Length3D Returns the 3D length of a linear geometry.
  • ST_3DMakeBox - Changed: 2.0.0 In prior versions this used to be called ST_MakeBox3D Creates a BOX3D defined by two 3D point geometries.
  • ST_3DPerimeter - Changed: 2.0.0 In prior versions this used to be called ST_Perimeter3D Returns the 3D perimeter of a polygonal geometry.
  • ST_AsBinary - Changed: 2.0.0 Inputs to this function can not be unknown -- must be geometry. Constructs such as ST_AsBinary('POINT(1 2)') are no longer valid and you will get an n st_asbinary(unknown) is not unique error. Code like that needs to be changed to ST_AsBinary('POINT(1 2)'::geometry);. If that is not possible, then install legacy.sql. Return the OGC/ISO Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
  • ST_AsGML - Changed: 2.0.0 use default named args Return the geometry as a GML version 2 or 3 element.
  • ST_AsGeoJSON - Changed: 2.0.0 support default args and named args. Return a geometry as a GeoJSON element.
  • ST_AsSVG - Changed: 2.0.0 to use default args and support named args Returns SVG path data for a geometry.
  • ST_EndPoint - Cambiado: 2.0.0 ya no funciona con multilinestrings de geometrías simples. En versiones anteriores de PostGIS -- una linea simple multilinestring funciona sin problemas con esta función y devuelve el punto inicial. En la version 2.0.0 simplemente devuelve NULL como con cualquier multilinestring. La antigua version era una función sin documentar, pero la gente que asumía que tenia sus datos almacenados en LINESTRING pueden experimentar este comportamiento ahora de resultado NULL en la version 2.0. Devuelve el número de puntos en un valor ST_LineString o ST_CircularString.
  • ST_GeomFromText - Cambiado: 2.0.0 En las versiones anteriores de PostGIS ST_GeomFromText('GEOMETRYCOLLECTION(EMPTY)') estaba permitido. Esto no esta permitido ahora en PostGIS 2.0.0 para ajustarse mejor a las normas SQL/MM. Esto debería ser escrito como ST_GeomFromText('GEOMETRYCOLLECTION EMPTY') Devuelve un valor especifico de ST_Geometry desde una representación "Extended Well-Known Binary" (EWKB).
  • ST_GeometryN - Cambiado: 2.0.0 Versiones anteriores devuelven NULL para geometrias simples. Esto ha sido cambiado para devolver la geometría en el caso de ST_GeometryN(..,1) . Devuelve el tipo de geometría del valor de ST_Geometry.
  • ST_IsEmpty - Cambiado: 2.0.0 En las versiones anteriores de PostGIS ST_GeomFromText('GEOMETRYCOLLECTION(EMPTY)') estaba permitido. Esto no esta permitido ahora en PostGIS 2.0.0 para ajustarse mejor a las normas SQL/MM. Tests if a geometry is empty.
  • ST_Length - Changed: 2.0.0 Breaking change -- in prior versions applying this to a MULTI/POLYGON of type geography would give you the perimeter of the POLYGON/MULTIPOLYGON. In 2.0.0 this was changed to return 0 to be in line with geometry behavior. Please use ST_Perimeter if you want the perimeter of a polygon Returns the 2D length of a linear geometry.
  • ST_LocateAlong - Modificado: 2.0.0 en versiones anteriores éste solía llamarse ST_Locate_Along_Measure. El nombre anterior ha quedado obsoleto y se eliminará en el futuro, pero aún está disponible. Returns the point(s) on a geometry that match a measure value.
  • ST_LocateBetween - Modificado: 2.0.0 en versiones anteriores éste solía llamarse ST_Locate_Along_Measure. El nombre anterior ha quedado obsoleto y se eliminará en el futuro, pero aún está disponible. Returns the portions of a geometry that match a measure range.
  • ST_NumGeometries - Cambiado: 2.0.0 En versiones anteriores esto devolvería NULL si la geometría no era de tipo collection/MULTI. 2.0.0+ devuelve 1 para geometrías simples, por ejemplo, POLYGON, LINESTRING, POINT. Devuelve el numero de puntos en la geometría. Funciona con todas las geometrías.
  • ST_NumInteriorRings - Cambiado: 2.0.0 - En versiones anteriores permitiría pasar un multipolígono, devolviendo el número de anillos interiores de primer polígono. Devuelva el número de anillos interiores de una geometría poligonal.
  • ST_PointN - Cambiado: 2.0.0 ya no funciona con una sola geometría multilinestrings. En versiones antiguas de PostGIS -- una sola línea MultiLineString trabajaría felizmente con esta función y regresaría el punto de inicio. En 2.0.0 sólo devuelve NULL como cualquier otro MultiLineString. Devuelve el número de puntos en un valor ST_LineString o ST_CircularString.
  • ST_StartPoint - Cambiado: 2.0.0 ya no funciona con multilinestrings de geometrías simples. En versiones anteriores de PostGIS -- una linea simple multilinestring funciona sin problemas con esta función y devuelve el punto inicial. En la version 2.0.0 simplemente devuelve NULL como con cualquier multilinestring. La antigua version era una función sin documentar, pero la gente que asumía que tenia sus datos almacenados en LINESTRING pueden experimentar este comportamiento ahora de resultado NULL en la version 2.0. Returns the first point of a LineString.

12.12.12. PostGIS Functions new or enhanced in 1.5

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 1.5

  • && - Availability: 1.5.0 support for geography was introduced. Returns TRUE if A's 2D bounding box intersects B's 2D bounding box.
  • PostGIS_LibXML_Version - Availability: 1.5 Returns the version number of the libxml2 library.
  • ST_AddMeasure - Disponibilidad: 1.5.0 Interpolates measures along a linear geometry.
  • ST_AsBinary - Availability: 1.5.0 geography support was introduced. Return the OGC/ISO Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
  • ST_AsGML - Availability: 1.5.0 geography support was introduced. Return the geometry as a GML version 2 or 3 element.
  • ST_AsGeoJSON - Availability: 1.5.0 geography support was introduced. Return a geometry as a GeoJSON element.
  • ST_AsText - Availability: 1.5 - support for geography was introduced. Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.
  • ST_Buffer - Availability: 1.5 - ST_Buffer was enhanced to support different endcaps and join types. These are useful for example to convert road linestrings into polygon roads with flat or square edges instead of rounded edges. Thin wrapper for geography was added. Computes a geometry covering all points within a given distance from a geometry.
  • ST_ClosestPoint - Disponibilidad: 1.5.0 Returns the 2D point on g1 that is closest to g2. This is the first point of the shortest line from one geometry to the other.
  • ST_CollectionExtract - Disponibilidad: 1.5.0 Given a geometry collection, returns a multi-geometry containing only elements of a specified type.
  • ST_Covers - Availability: 1.5 - support for geography was introduced. Tests if every point of B lies in A
  • ST_DFullyWithin - Availability: 1.5.0 Tests if two geometries are entirely within a given distance
  • ST_DWithin - Availability: 1.5.0 support for geography was introduced Tests if two geometries are within a given distance
  • ST_Distance - Availability: 1.5.0 geography support was introduced in 1.5. Speed improvements for planar to better handle large or many vertex geometries Returns the distance between two geometry or geography values.
  • ST_DistanceSphere - Availability: 1.5 - support for other geometry types besides points was introduced. Prior versions only work with points. Returns minimum distance in meters between two lon/lat geometries using a spherical earth model.
  • ST_DistanceSpheroid - Availability: 1.5 - support for other geometry types besides points was introduced. Prior versions only work with points. Returns the minimum distance between two lon/lat geometries using a spheroidal earth model.
  • ST_DumpPoints - Disponibilidad: 1.2.2 Devuelve un resumen de texto del contenido de la geometría.
  • ST_Envelope - Disponibilidad: 1.5.0 comportamiento modificado para devolver doble precisión en vez de float4. Devuelve una geometría que representa la caja en doble precisión (float8) de la geometría dada.
  • ST_Expand - Availability: 1.5.0 behavior changed to output double precision instead of float4 coordinates. Returns a bounding box expanded from another bounding box or a geometry.
  • ST_GMLToSQL - Disponibilidad: 1.5, requiere libxml2 1.6+ Devuelve un valor especifico ST_Geometry desde una representación GML. Esto es un alias de ST_GeomFromGML
  • ST_GeomFromGML - Disponibilidad: 1.5, requiere libxml2 1.6+ Toma una representación GML como entrada de una geometría y extrae un objeto geométrico PostGIS
  • ST_GeomFromKML - Availability: 1.5, requires libxml2 2.6+ Toma una representación de una geometría KML de entrada y devuelve un objeto geométrico PostGIS
  • ST_HausdorffDistance - Disponibilidad: 1.5.0 Returns the Hausdorff distance between two geometries.
  • ST_Intersection - Availability: 1.5 support for geography data type was introduced. Computes a geometry representing the shared portion of geometries A and B.
  • ST_Intersects - Availability: 1.5 support for geography was introduced. Tests if two geometries intersect (they have at least one point in common)
  • ST_Length - Availability: 1.5.0 geography support was introduced in 1.5. Returns the 2D length of a linear geometry.
  • ST_LongestLine - Disponibilidad: 1.5.0 Returns the 2D longest line between two geometries.
  • ST_MakeEnvelope - Disponibilidad: 1.5 Crea un polígono rectangular formado a partir de los mínimos y máximos especificados. Los valores de entrada deben estar en el SRS especificado en el SRID.
  • ST_MaxDistance - Disponibilidad: 1.5.0 Returns the 2D largest distance between two geometries in projected units.
  • ST_ShortestLine - Disponibilidad: 1.5.0 Returns the 2D shortest line between two geometries
  • ~= - Availability: 1.5.0 changed behavior Returns TRUE if A's bounding box is the same as B's.

12.12.13. PostGIS Functions new or enhanced in 1.4

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 1.4

  • Populate_Geometry_Columns - Disponibilidad: 1.4.0 Ensures geometry columns are defined with type modifiers or have appropriate spatial constraints.
  • ST_Collect - Disponibilidad: 1.4.0 - ST_MakeLine (geomarray) fue introducido. Las Funciones agregadas ST_MakeLine se mejoraron para manejar más puntos más rápido. Creates a GeometryCollection or Multi* geometry from a set of geometries.
  • ST_ContainsProperly - Availability: 1.4.0 Tests if every point of B lies in the interior of A
  • ST_GeoHash - Disponibilidad: 1.4.0 Return a GeoHash representation of the geometry.
  • ST_IsValidReason - Availability: 1.4 Returns text stating if a geometry is valid, or a reason for invalidity.
  • ST_LineCrossingDirection - Availability: 1.4 Returns a number indicating the crossing behavior of two LineStrings
  • ST_LocateBetweenElevations - Disponibilidad: 1.4.0 Returns the portions of a geometry that lie in an elevation (Z) range.
  • ST_MakeLine - Disponibilidad: 1.4.0 - ST_MakeLine (geomarray) fue introducido. Las Funciones agregadas ST_MakeLine se mejoraron para manejar más puntos más rápido. Crea una cadena de línea desde geometrías de punto, multipunto o de línea.
  • ST_MinimumBoundingCircle - Disponibilidad: 1.4.0 Returns the smallest circle polygon that contains a geometry.
  • ST_Union - Availability: 1.4.0 - ST_Union was enhanced. ST_Union(geomarray) was introduced and also faster aggregate collection in PostgreSQL. Computes a geometry representing the point-set union of the input geometries.

12.12.14. PostGIS Functions new or enhanced in 1.3

The functions given below are PostGIS functions that were added or enhanced.

Functions new in PostGIS 1.3

  • ST_AsGML - Disponibilidad: 1.3.2 Return the geometry as a GML version 2 or 3 element.
  • ST_AsGeoJSON - Disponibilidad: 1.3.4 Return a geometry as a GeoJSON element.
  • ST_CurveToLine - Availability: 1.3.0 Converts a geometry containing curves to a linear geometry.
  • ST_LineToCurve - Availability: 1.3.0 Converts a linear geometry to a curved geometry.
  • ST_SimplifyPreserveTopology - Disponibilidad: 1.3.3 Returns a simplified and valid version of a geometry, using the Douglas-Peucker algorithm.