PostgreSQL PostGIS Geometry/Geography/Box Types | |
---|---|
box2d The type representing a 2-dimensional bounding box. | |
box3d The type representing a 3-dimensional bounding box. | |
geometry geografia é um tipo de dado espacial usado para representar uma característica no sistema de coordenada da terra-redonda. | |
geometry_dump A composite type used to describe the parts of complex geometry. | |
geography The type representing spatial features with geodetic (ellipsoidal) coordinate systems. |
Funções de Gestão | |
---|---|
AddGeometryColumn
3d
Remove uma coluna geometria de uma spatial table.
| |
DropGeometryColumn
3d
Remove uma coluna geometria de uma spatial table.
| |
DropGeometryTable
Derruba uma table e todas suas referências em geometry_columns.
| |
Find_SRID (a_schema_name, a_table_name, a_geomfield_name) Returns the SRID defined for a geometry column. | |
Populate_Geometry_Columns
Ensures geometry columns are defined with type modifiers or have appropriate spatial constraints.
| |
UpdateGeometrySRID
3d
Updates the SRID of all features in a geometry column, and the table metadata.
|
Construtores de geometria | |
---|---|
ST_Collect
3d
Creates a GeometryCollection or Multi* geometry from a set of geometries.
| |
ST_LineFromMultiPoint 3d (aMultiPoint) Cria uma linestring de um multiponto geométrico. | |
ST_MakeEnvelope (xmin, ymin, xmax, ymax, srid=unknown) Cria um polígono retangular formado a partir dos mínimos e máximos dados. Os valores de entrada devem ser em SRS especificados pelo SRID. | |
ST_MakeLine
3d
Cria uma Linestring de ponto, multiponto ou linha das geometrias.
| |
ST_MakePoint
3d
Creates a 2D, 3DZ or 4D Point.
| |
ST_MakePointM (x, y, m) Cria um ponto com uma coordenada x y e medida. | |
ST_MakePolygon
3d
Creates a Polygon from a shell and optional list of holes.
| |
ST_Point
mm
Creates a Point with X, Y and SRID values.
| |
ST_PointZ (x, y, z, srid=unknown) Creates a Point with X, Y, Z and SRID values. | |
ST_PointM (x, y, m, srid=unknown) Creates a Point with X, Y, M and SRID values. | |
ST_PointZM (x, y, z, m, srid=unknown) Creates a Point with X, Y, Z, M and SRID values. | |
ST_Polygon mm 3d (lineString, srid) Creates a Polygon from a LineString with a specified SRID. | |
ST_TileEnvelope (tileZoom, tileX, tileY, bounds=SRID=3857;LINESTRING(-20037508.342789 -20037508.342789,20037508.342789 20037508.342789), margin=0.0) Creates a rectangular Polygon in Web Mercator (SRID:3857) using the XYZ tile system. | |
ST_HexagonGrid (size, bounds) Returns a set of hexagons and cell indices that completely cover the bounds of the geometry argument. | |
ST_Hexagon (size, cell_i, cell_j, origin) Returns a single hexagon, using the provided edge size and cell coordinate within the hexagon grid space. | |
ST_SquareGrid (size, bounds) Returns a set of grid squares and cell indices that completely cover the bounds of the geometry argument. | |
ST_Square (size, cell_i, cell_j, origin) Returns a single square, using the provided edge size and cell coordinate within the square grid space. | |
ST_Letters ( letters, font) Returns the input letters rendered as geometry with a default start position at the origin and default text height of 100. |
Acessors de Geometria | |
---|---|
GeometryType 3d (geomA) Retorna o tipo de geometria de valor ST_Geometry. | |
ST_Boundary mm 3d (geomA) Retorna o encerramento da borda combinatória dessa geometria. | |
ST_BoundingDiagonal 3d (geom, fits=false) Retorna a diagonal da geometria fornecida da caixa limitada. | |
ST_CoordDim mm 3d (geomA) Retorna a dimensão da coordenada do valor ST_Geometry. | |
ST_Dimension mm (g) Retorna a dimensão da coordenada do valor ST_Geometry. | |
ST_Dump 3d (g1) Returns a set of geometry_dump rows for the components of a geometry. | |
ST_DumpPoints 3d (geom) Retorna um texto resumo dos conteúdos da geometria. | |
ST_DumpSegments 3d (geom) Retorna um texto resumo dos conteúdos da geometria. | |
ST_DumpRings 3d (a_polygon) Returns a set of geometry_dump rows for the exterior and interior rings of a Polygon. | |
ST_EndPoint mm 3d (g) Retorna o número de pontos em um valor ST_LineString ou ST_CircularString. | |
ST_Envelope mm (g1) Retorna uma geometria representando a precisão da dobrada (float8) da caixa limitada da geometria fornecida. | |
ST_ExteriorRing mm 3d (a_polygon) Retorna o número de anéis interiores de um polígono. | |
ST_GeometryN mm 3d (geomA, n) Retorna o tipo de geometria de valor ST_Geometry. | |
ST_GeometryType mm 3d (g1) Retorna o tipo de geometria de valor ST_Geometry. | |
ST_HasArc 3d (geomA) Tests if a geometry contains a circular arc | |
ST_InteriorRingN mm 3d (a_polygon, n) Retorna o número de anéis interiores de um polígono. | |
ST_NumCurves mm 3d (a_compoundcurve) Return the number of component curves in a CompoundCurve. | |
ST_CurveN mm 3d (a_compoundcurve, index) Returns the Nth component curve geometry of a CompoundCurve. | |
ST_IsClosed mm 3d (g) Retorna VERDADEIRO se os pontos de começo e fim da LINESTRING são coincidentes. Para superfície poliédrica está fechada (volumétrica). | |
ST_IsCollection 3d (g) Retorna verdadeiro se essa geometria é uma coleção vazia, polígono, ponto etc. | |
ST_IsEmpty mm (geomA) Tests if a geometry is empty. | |
ST_IsPolygonCCW 3d (geom) Tests if Polygons have exterior rings oriented counter-clockwise and interior rings oriented clockwise. | |
ST_IsPolygonCW 3d (geom) Tests if Polygons have exterior rings oriented clockwise and interior rings oriented counter-clockwise. | |
ST_IsRing mm (g) Tests if a LineString is closed and simple. | |
ST_IsSimple mm 3d (geomA) Retorna (VERDADEIRA) se essa geometria não tem nenhum ponto irregular, como auto intersecção ou tangenciação. | |
ST_M mm 3d (a_point) Returns the M coordinate of a Point. | |
ST_MemSize 3d (geomA) Retorna o tipo de geometria de valor ST_Geometry. | |
ST_NDims 3d (g1) Retorna a dimensão da coordenada do valor ST_Geometry. | |
ST_NPoints 3d (g1) Retorna o número de pontos (vértices) em uma geometria. | |
ST_NRings 3d (geomA) Retorna o número de anéis interiores de um polígono. | |
ST_NumGeometries mm 3d (geom) Retorna o número de pontos em uma geometria. Funciona para todas as geometrias. | |
ST_NumInteriorRings mm (a_polygon) Retorna o número de anéis interiores de um polígono. | |
ST_NumInteriorRing (a_polygon) Retorna o número de anéis interiores de um polígono na geometria. Sinônimo para ST_NumInteriorRings. | |
ST_NumPatches mm 3d (g1) Retorna o número de faces em uma superfícies poliédrica. Retornará nulo para geometrias não poliédricas. | |
ST_NumPoints mm (g1) Retorna o número de pontos em um valor ST_LineString ou ST_CircularString. | |
ST_PatchN mm 3d (geomA, n) Retorna o tipo de geometria de valor ST_Geometry. | |
ST_PointN mm 3d (a_linestring, n) Retorna o número de pontos em um valor ST_LineString ou ST_CircularString. | |
ST_Points 3d (geom) Retorna uma multilinestring contendo todas as coordenadas de uma geometria. | |
ST_StartPoint mm 3d (geomA) Returns the first point of a LineString. | |
ST_Summary
G
Retorna um texto resumo dos conteúdos da geometria.
| |
ST_X mm 3d (a_point) Returns the X coordinate of a Point. | |
ST_Y mm 3d (a_point) Returns the Y coordinate of a Point. | |
ST_Z mm 3d (a_point) Returns the Z coordinate of a Point. | |
ST_Zmflag 3d (geomA) Retorna a dimensão da coordenada do valor ST_Geometry. | |
ST_HasZ 1 3d (geom) Checks if a geometry has a Z dimension. | |
ST_HasM 1 3d (geom) Checks if a geometry has an M (measure) dimension. |
Editores de geometria | |
---|---|
ST_AddPoint
3d
Adicione um ponto para uma LineString.
| |
ST_CollectionExtract
Given a geometry collection, returns a multi-geometry containing only elements of a specified type.
| |
ST_CollectionHomogenize (collection) Returns the simplest representation of a geometry collection. | |
ST_CurveToLine mm 3d (curveGeom, tolerance, tolerance_type, flags) Converts a geometry containing curves to a linear geometry. | |
ST_Scroll 3d (linestring, point) Change start point of a closed LineString. | |
ST_FlipCoordinates 3d (geom) Returns a version of a geometry with X and Y axis flipped. | |
ST_Force2D 3d (geomA) Força a geometria para o modo de 2 dimensões. | |
ST_Force3D 3d (geomA, Zvalue = 0.0) Força a geometria para um modo XYZ. Este é um apelido para a função ST_Force_3DZ. | |
ST_Force3DZ 3d (geomA, Zvalue = 0.0) Força as geometrias para o modo XYZ. | |
ST_Force3DM (geomA, Mvalue = 0.0) Força as geometrias para o modo XYM. | |
ST_Force4D 3d (geomA, Zvalue = 0.0, Mvalue = 0.0) Força as geometrias para o modo XYZM. | |
ST_ForceCollection 3d (geomA) Converte a geometria para um GEOMETRYCOLLECTION. | |
ST_ForceCurve 3d (g) Converte para cima uma geometria para seu tipo curvo, se aplicável. | |
ST_ForcePolygonCCW 3d (geom) Orients all exterior rings counter-clockwise and all interior rings clockwise. | |
ST_ForcePolygonCW 3d (geom) Orients all exterior rings clockwise and all interior rings counter-clockwise. | |
ST_ForceSFS
3d
Força as geometrias a utilizarem os tipos disponíveis na especificação SFS 1.1.
| |
ST_ForceRHR 3d (g) Força a orientação dos vértices em um polígono a seguir a regra da mão direita. | |
ST_LineExtend (line, distance_forward, distance_backward=0.0) Returns a line extended forwards and backwards by specified distances. | |
ST_LineToCurve 3d (geomANoncircular) Converts a linear geometry to a curved geometry. | |
ST_Multi (geom) Restitui a geometria como uma MULTI* geometria. | |
ST_Normalize (geom) Retorna a geometria na sua forma canônica. | |
ST_Project
G
Returns a point projected from a start point by a distance and bearing (azimuth).
| |
ST_QuantizeCoordinates (g, prec_x, prec_y, prec_z, prec_m) Sets least significant bits of coordinates to zero | |
ST_RemovePoint 3d (linestring, offset) Remove a point from a linestring. | |
ST_RemoveRepeatedPoints 3d (geom, tolerance) Returns a version of a geometry with duplicate points removed. | |
ST_RemoveIrrelevantPointsForView 1 (geom, bounds, cartesian_hint = false) Removes points that are irrelevant for rendering a specific rectangluar view of a geometry. | |
ST_RemoveSmallParts 1 (geom, minSizeX, minSizeY) Removes small parts (polygon rings or linestrings) of a geometry. | |
ST_Reverse 3d (g1) Retorna a geometria com a ordem dos vértices revertida. | |
ST_Segmentize
G
Returns a modified geometry/geography having no segment longer than a given distance.
| |
ST_SetPoint 3d (linestring, zerobasedposition, point) Substitui ponto de uma linestring com um dado ponto. | |
ST_ShiftLongitude 3d (geom) Shifts the longitude coordinates of a geometry between -180..180 and 0..360. | |
ST_WrapX 3d (geom, wrap, move) Envolve uma geometria em torno de um valor X. | |
ST_SnapToGrid
3d
Rompe todos os pontos da geometria de entrada para uma rede regular.
| |
ST_Snap (input, reference, tolerance) Rompe segmentos e vértices de geometria de entrada para vértices de uma geometria de referência. | |
ST_SwapOrdinates 3d (geom, ords) Retorna uma versão da geometria dada com os valores ordenados dados trocados. |
Geometry Validation | |
---|---|
ST_IsValid
mm
Tests if a geometry is well-formed in 2D.
| |
ST_IsValidDetail (geom, flags) Returns a valid_detail row stating if a geometry is valid or if not a reason and a location. | |
ST_IsValidReason
Returns text stating if a geometry is valid, or a reason for invalidity.
| |
ST_MakeValid
3d
Attempts to make an invalid geometry valid without losing vertices.
|
Spatial Reference System Functions | |
---|---|
ST_InverseTransformPipeline (geom, pipeline, to_srid) Return a new geometry with coordinates transformed to a different spatial reference system using the inverse of a defined coordinate transformation pipeline. | |
ST_SetSRID (geom, srid) Set the SRID on a geometry. | |
ST_SRID mm (g1) Returns the spatial reference identifier for a geometry. | |
ST_Transform
mm
Return a new geometry with coordinates transformed to a different spatial reference system.
| |
ST_TransformPipeline (g1, pipeline, to_srid) Return a new geometry with coordinates transformed to a different spatial reference system using a defined coordinate transformation pipeline. | |
postgis_srs_codes (auth_name) Return the list of SRS codes associated with the given authority. | |
postgis_srs (auth_name, auth_srid) Return a metadata record for the requested authority and srid. | |
postgis_srs_all () Return metadata records for every spatial reference system in the underlying Proj database. | |
postgis_srs_search (bounds, auth_name=EPSG) Return metadata records for projected coordinate systems that have areas of usage that fully contain the bounds parameter. |
Geometry Input | |
---|---|
ST_BdPolyFromText (WKT, srid) Constrói um polígono dada uma coleção arbitrária de linestrings fechadas como uma representação de texto de uma multilinestring bem conhecida. | |
ST_BdMPolyFromText (WKT, srid) Constrói um polígono dada uma coleção arbitrária de linestrings fechadas como uma representação de texto de uma multilinestring bem conhecida. | |
ST_GeogFromText G (EWKT) Retorna um valor de geografia específico de uma representação bem conhecida de texto ou estendida (WKT). | |
ST_GeographyFromText G (EWKT) Retorna um valor de geografia específico de uma representação bem conhecida de texto ou estendida (WKT). | |
ST_GeomCollFromText
mm
Makes a collection Geometry from collection WKT with the given SRID. If SRID is not given, it defaults to 0.
| |
ST_GeomFromEWKT 3d (EWKT) Retorna um valor ST_Geometry especifico da representação de texto estendida bem conhecida (EWKT). | |
ST_GeomFromMARC21 (marcxml) Takes MARC21/XML geographic data as input and returns a PostGIS geometry object. | |
ST_GeometryFromText
mm
Retorna um valor ST_Geometry especifico da representação de texto estendida bem conhecida (EWKT). Isso é um heterônimo para ST_GeomFromText
| |
ST_GeomFromText
mm
Retorna um valor ST_Geometry específico da representação de texto bem conhecida (WKT).
| |
ST_LineFromText
mm
Faz uma geometria de uma representação WKT com a SRID dada. Se a SRID não for dada, isso leva a 0.
| |
ST_MLineFromText
mm
Retorna um valor específico ST_MultiLineString de uma representação WKT.
| |
ST_MPointFromText
mm
Makes a Geometry from WKT with the given SRID. If SRID is not given, it defaults to 0.
| |
ST_MPolyFromText
mm
Makes a MultiPolygon Geometry from WKT with the given SRID. If SRID is not given, it defaults to 0.
| |
ST_PointFromText
mm
Faz um ponto de um WKT com o SRID dado. Se o SRID não for dado, isso leva a desconhecido.
| |
ST_PolygonFromText
mm
Makes a Geometry from WKT with the given SRID. If SRID is not given, it defaults to 0.
| |
ST_WKTToSQL mm (WKT) Retorna um valor ST_Geometry especifico da representação de texto estendida bem conhecida (EWKT). Isso é um heterônimo para ST_GeomFromText | |
ST_GeogFromWKB G (wkb) Cria uma ocasião geografia de uma geometria binária bem conhecida (WKB) ou binário estendido bem conhecido (EWKB). | |
ST_GeomFromEWKB 3d (EWKB) Retorna um valor ST_Geometry especifico da representação binária estendida bem conhecida (EWKB). | |
ST_GeomFromWKB
mm
Criar uma geometria exemplo de um representação bem conhecida de geometria binária (WKB) e SRID opcional.
| |
ST_LineFromWKB
mm
Faz uma LINESTRING de uma WKB com o SRID dado
| |
ST_LinestringFromWKB
mm
Faz uma geometria de uma WKB com o SRID dado.
| |
ST_PointFromWKB
mm
3d
Faz uma geometria a partir de um WKB com o SRID dado
| |
ST_WKBToSQL mm (WKB) Retorna um valor ST_Geometry especifico da representação de texto binário bem conhecida (WKB). Isso é um heterônimo para ST_GeomFromWKB que não pega nenhum srid | |
ST_Box2dFromGeoHash (geohash, precision=full_precision_of_geohash) Retorna uma CAIXA2D de uma string GeoHash. | |
ST_GeomFromGeoHash (geohash, precision=full_precision_of_geohash) Retorna uma geometria de uma string GeoHash. | |
ST_GeomFromGML
3d
Utiliza como entrada uma representação GML de geometria e como saída um objeto de geometria PostGIS
| |
ST_GeomFromGeoJSON
3d
Utiliza como entrada uma representação geojson de uma geometria e como saída um objeto de geometria PostGIS
| |
ST_GeomFromKML 3d (geomkml) Utiliza como entrada uma representação KML de geometria e como saída um objeto de geometria PostGIS | |
ST_GeomFromTWKB (twkb) Cria uma ocasião de uma TWKB ("Tiny Well-Known Binary") representação de geometria. | |
ST_GMLToSQL
mm
Retorna um valor ST_Geometry específico da representação GML. Esse é um heterônimo para ST_GeomFromGML
| |
ST_LineFromEncodedPolyline (polyline, precision=5) Cria uma LineString de uma Encoded Polyline. | |
ST_PointFromGeoHash (geohash, precision=full_precision_of_geohash) Retorna um ponto de uma string GeoHash. | |
ST_FromFlatGeobufToTable (schemaname, tablename, FlatGeobuf input data) Creates a table based on the structure of FlatGeobuf data. | |
ST_FromFlatGeobuf (Table reference, FlatGeobuf input data) Reads FlatGeobuf data. |
Geometry Output | |
---|---|
ST_AsEWKT
G
3d
Retorna a representação de texto bem conhecida (WKT) da geometria com os meta dados SRID.
| |
ST_AsText
mm
G
Retorna a representação de texto bem conhecida (WKT) da geometria/geografia sem os meta dados do SRID.
| |
ST_AsBinary
mm
G
3d
Return the OGC/ISO Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
| |
ST_AsEWKB
3d
Return the Extended Well-Known Binary (EWKB) representation of the geometry with SRID meta data.
| |
ST_AsHEXEWKB
3d
Retorna uma geometria no formato HEXEWKB (como texto) usando little-endian (NDR) ou big-endian (XDR) encoding.
| |
ST_AsEncodedPolyline (geom, precision=5) Retorna uma Polilinha Encoded de uma geometria LineString. | |
ST_AsFlatGeobuf
Return a FlatGeobuf representation of a set of rows.
| |
ST_AsGeobuf
Return a Geobuf representation of a set of rows.
| |
ST_AsGeoJSON
G
3d
Return a geometry or feature in GeoJSON format.
| |
ST_AsGML
mm
G
3d
Retorna a geometria como uma versão GML com 2 ou 3 elementos.
| |
ST_AsKML
G
3d
Retorna a geometria como uma versão GML com 2 ou 3 elementos.
| |
ST_AsLatLonText (pt, format='') Retorna a representação de Graus, Minutos, Segundos do ponto dado. | |
ST_AsMARC21 (geom, format='hdddmmss') Returns geometry as a MARC21/XML record with a geographic datafield (034). | |
ST_AsMVTGeom (geom, bounds, extent=4096, buffer=256, clip_geom=true) Transforms a geometry into the coordinate space of a MVT tile. | |
ST_AsMVT
Aggregate function returning a MVT representation of a set of rows.
| |
ST_AsSVG
G
Returns SVG path data for a geometry.
| |
ST_AsTWKB
Retorna a geometria como TWKB, também conhecido como "Tiny Well-Known Binary"
| |
ST_AsX3D 3d (g1, maxdecimaldigits=15, options=0) Retorna uma geometria em X3D nó xml formato do elemento: ISO-IEC-19776-1.2-X3DEncodings-XML | |
ST_GeoHash (geom, maxchars=full_precision_of_point) Retorna uma representação GeoHash da geometria. |
Operadores | |
---|---|
&&
G
Retorna VERDADE se a caixa limitadora 2D de A intersecta a caixa limitadora 2D de B.
| |
&&(geometry,box2df) (A, B) Returns TRUE if a geometry's (cached) 2D bounding box intersects a 2D float precision bounding box (BOX2DF). | |
&&(box2df,geometry) (A, B) Returns TRUE if a 2D float precision bounding box (BOX2DF) intersects a geometry's (cached) 2D bounding box. | |
&&(box2df,box2df) (A, B) Returns TRUE if two 2D float precision bounding boxes (BOX2DF) intersect each other. | |
&&& 3d (A, B) Retorna VERDADE se a caixa limitadora n-D de A intersecta a caixa limitadora n-D de B. | |
&&&(geometry,gidx) 3d (A, B) Returns TRUE if a geometry's (cached) n-D bounding box intersects a n-D float precision bounding box (GIDX). | |
&&&(gidx,geometry) 3d (A, B) Returns TRUE if a n-D float precision bounding box (GIDX) intersects a geometry's (cached) n-D bounding box. | |
&&&(gidx,gidx) 3d (A, B) Returns TRUE if two n-D float precision bounding boxes (GIDX) intersect each other. | |
&< (A, B) Retorna VERDADE se a caixa limitadora de A sobrepõe ou está à esquerda de B. | |
&<| (A, B) Retorna VERDADE se a caixa limitadora de A sobrepõe ou está abaixo de B. | |
&> (A, B) Retorna VERDADE se a caixa limitadora de A sobrepõe ou está à direita de B. | |
<< (A, B) Retorna VERDADE se uma caixa limitadora de A está estritamente à esquerda da de B. | |
<<| (A, B) Retorna VERDADE se uma caixa limitadora de A está estritamente abaixo da de B. | |
=
G
Returns TRUE if the coordinates and coordinate order geometry/geography A are the same as the coordinates and coordinate order of geometry/geography B.
| |
>> (A, B) Returns TRUE if A's bounding box is strictly to the right of B's. | |
@ (A, B) Retorna VERDADE se uma caixa limitadora de A está contida pela de B. | |
@(geometry,box2df) (A, B) Returns TRUE if a geometry's 2D bounding box is contained into a 2D float precision bounding box (BOX2DF). | |
@(box2df,geometry) (A, B) Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into a geometry's 2D bounding box. | |
@(box2df,box2df) (A, B) Returns TRUE if a 2D float precision bounding box (BOX2DF) is contained into another 2D float precision bounding box. | |
|&> (A, B) Retorna VERDADE se a caixa limitadora de A sobrepõe ou está acima de B. | |
|>> (A, B) Retorna VERDADE se uma caixa limitadora de A está estritamente acima da de B. | |
~ (A, B) Retorna VERDADE se uma caixa limitadora de A contém a de B. | |
~(geometry,box2df) (A, B) Returns TRUE if a geometry's 2D bonding box contains a 2D float precision bounding box (GIDX). | |
~(box2df,geometry) (A, B) Returns TRUE if a 2D float precision bounding box (BOX2DF) contains a geometry's 2D bonding box. | |
~(box2df,box2df) (A, B) Returns TRUE if a 2D float precision bounding box (BOX2DF) contains another 2D float precision bounding box (BOX2DF). | |
~= (A, B) Retorna VERDADE se a caixa limitadora de A é a mesma de B. | |
<->
G
Retorna a distância 2D entre A e B.
| |
|=| (A, B) Retorna a distância entre As trajetórias A e B ao ponto de aproximação mais perto. | |
<#> (A, B) Retorna a distância 2D entre as caixas limitadoras de A e B. | |
<<->> (A, B) Returns the n-D distance between the A and B geometries or bounding boxes |
Spatial Relationships | |
---|---|
ST_3DIntersects mm 3d (geomA, geomB) Tests if two geometries spatially intersect in 3D - only for points, linestrings, polygons, polyhedral surface (area) | |
ST_Contains mm (geomA, geomB) Tests if every point of B lies in A, and their interiors have a point in common | |
ST_ContainsProperly (geomA, geomB) Tests if every point of B lies in the interior of A | |
ST_CoveredBy
G
Tests if every point of A lies in B
| |
ST_Covers
G
Tests if every point of B lies in A
| |
ST_Crosses mm (g1, g2) Tests if two geometries have some, but not all, interior points in common | |
ST_Disjoint mm (A, B) Tests if two geometries have no points in common | |
ST_Equals mm (A, B) Tests if two geometries include the same set of points | |
ST_Intersects
mm
G
Tests if two geometries intersect (they have at least one point in common)
| |
ST_LineCrossingDirection (linestringA, linestringB) Returns a number indicating the crossing behavior of two LineStrings | |
ST_OrderingEquals mm (A, B) Tests if two geometries represent the same geometry and have points in the same directional order | |
ST_Overlaps mm (A, B) Tests if two geometries have the same dimension and intersect, but each has at least one point not in the other | |
ST_Relate
mm
Tests if two geometries have a topological relationship matching an Intersection Matrix pattern, or computes their Intersection Matrix
| |
ST_RelateMatch (intersectionMatrix, intersectionMatrixPattern) Tests if a DE-9IM Intersection Matrix matches an Intersection Matrix pattern | |
ST_Touches mm (A, B) Tests if two geometries have at least one point in common, but their interiors do not intersect | |
ST_Within mm (A, B) Tests if every point of A lies in B, and their interiors have a point in common | |
ST_3DDWithin mm 3d (g1, g2, distance_of_srid) Tests if two 3D geometries are within a given 3D distance | |
ST_3DDFullyWithin 3d (g1, g2, distance) Tests if two 3D geometries are entirely within a given 3D distance | |
ST_DFullyWithin (g1, g2, distance) Tests if a geometry is entirely inside a distance of another | |
ST_DWithin
G
Tests if two geometries are within a given distance
| |
ST_PointInsideCircle (a_point, center_x, center_y, radius) Tests if a point geometry is inside a circle defined by a center and radius |
Measurement Functions | |
---|---|
ST_Area
mm
G
Retorna o centro geométrico de uma geometria.
| |
ST_Azimuth
G
Retorna a menor linha 2-dimensional entre duas geometrias
| |
ST_Angle
Retorna a linha 3-dimensional mais longa entre duas geometrias
| |
ST_ClosestPoint
G
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_3DClosestPoint 3d (g1, g2) Retorna o ponto 3 dimensional em g1 que é o mais próximo de g2. Este é o primeiro ponto da linha mais curta em três dimensões. | |
ST_Distance
mm
G
Retorna a linha 3-dimensional mais longa entre duas geometrias
| |
ST_3DDistance mm 3d (g1, g2) Para tipo geometria, retorna a menor distância cartesiana 3-dimensional (baseado no sistema de referência espacial) entre duas geometrias em unidades projetadas. | |
ST_DistanceSphere (geomlonlatA, geomlonlatB, radius=6371008) Retorna a menor distância entre duas geometrias lon/lat dado um esferoide específico. As versões anteriores a 1.5 só suportam pontos. | |
ST_DistanceSpheroid (geomlonlatA, geomlonlatB, measurement_spheroid=WGS84) Retorna a menor distância entre duas geometrias lon/lat dado um esferoide específico. As versões anteriores a 1.5 só suportam pontos. | |
ST_FrechetDistance (g1, g2, densifyFrac = -1) Retorna a menor linha 3-dimensional entre duas geometrias | |
ST_HausdorffDistance
Retorna a menor linha 3-dimensional entre duas geometrias
| |
ST_Length
mm
G
Retorna o centro geométrico de uma geometria.
| |
ST_Length2D (a_2dlinestring) Retorna o comprimento 2-dimensional da geometria se for uma linestring ou multi-linestring. Isto é um heterônimo para ST_Length | |
ST_3DLength mm 3d (a_3dlinestring) Retorna o centro geométrico de uma geometria. | |
ST_LengthSpheroid 3d (a_geometry, a_spheroid) Retorna o centro geométrico de uma geometria. | |
ST_LongestLine (g1, g2) Retorna a linha 3-dimensional mais longa entre duas geometrias | |
ST_3DLongestLine 3d (g1, g2) Retorna a linha 3-dimensional mais longa entre duas geometrias | |
ST_MaxDistance (g1, g2) Retorna a maior distância 2-dimensional entre duas geometrias em unidades projetadas. | |
ST_3DMaxDistance 3d (g1, g2) Para tipo de geometria retorna a maior distância 3-dimensional cartesiana (baseada na referência espacial) entre duas geometrias em unidade projetadas. | |
ST_MinimumClearance (g) Retorna a liquidação mínima de uma geometria, uma medida de uma robustez de uma geometria. | |
ST_MinimumClearanceLine (g) Retorna a LineString de dois pontos abrangendo a liquidação mínima de uma geometria. | |
ST_Perimeter
mm
G
Returns the length of the boundary of a polygonal geometry or geography.
| |
ST_Perimeter2D (geomA) Returns the 2D perimeter of a polygonal geometry. Alias for ST_Perimeter. | |
ST_3DPerimeter mm 3d (geomA) Retorna o centro geométrico de uma geometria. | |
ST_ShortestLine
G
Retorna a menor linha 2-dimensional entre duas geometrias
| |
ST_3DShortestLine 3d (g1, g2) Retorna a menor linha 3-dimensional entre duas geometrias |
Overlay Functions | |
---|---|
ST_ClipByBox2D (geom, box) Computes the portion of a geometry falling within a rectangle. | |
ST_Difference mm g3.9 3d (geomA, geomB, gridSize = -1) Computes a geometry representing the part of geometry A that does not intersect geometry B. | |
ST_Intersection
mm
G
g3.9
3d
Computes a geometry representing the shared portion of geometries A and B.
| |
ST_MemUnion 3d (geomfield) Aggregate function which unions geometries in a memory-efficent but slower way | |
ST_Node 3d (geom) Nodes a collection of lines. | |
ST_Split (input, blade) Returns a collection of geometries created by splitting a geometry by another geometry. | |
ST_Subdivide g3.9 (geom, max_vertices=256, gridSize = -1) Computes a rectilinear subdivision of a geometry. | |
ST_SymDifference mm g3.9 3d (geomA, geomB, gridSize = -1) Computes a geometry representing the portions of geometries A and B that do not intersect. | |
ST_UnaryUnion g3.9 3d (geom, gridSize = -1) Computes the union of the components of a single geometry. | |
ST_Union
mm
g3.9
3d
Computes a geometry representing the point-set union of the input geometries.
|
Processamento de Geometria | |
---|---|
ST_Buffer
mm
G
Computes a geometry covering all points within a given distance from a geometry.
| |
ST_BuildArea (geom) Creates a polygonal geometry formed by the linework of a geometry. | |
ST_Centroid
mm
G
Retorna o centro geométrico de uma geometria.
| |
ST_ChaikinSmoothing 3d (geom, nIterations = 1, preserveEndPoints = false) Returns a smoothed version of a geometry, using the Chaikin algorithm | |
ST_ConcaveHull (param_geom, param_pctconvex, param_allow_holes = false) Computes a possibly concave geometry that contains all input geometry vertices | |
ST_ConvexHull mm 3d (geomA) Computes the convex hull of a geometry. | |
ST_DelaunayTriangles 3d (g1, tolerance = 0.0, flags = 0) Returns the Delaunay triangulation of the vertices of a geometry. | |
ST_FilterByM (geom, min, max = null, returnM = false) Removes vertices based on their M value | |
ST_GeneratePoints (g, npoints, seed = 0) Generates a multipoint of random points contained in a Polygon or MultiPolygon. | |
ST_GeometricMedian 3d (geom, tolerance = NULL, max_iter = 10000, fail_if_not_converged = false) Retorna a mediana de um MultiPonto. | |
ST_LineMerge
g3.11
Return the lines formed by sewing together a MultiLineString.
| |
ST_MaximumInscribedCircle g3.9 (geom) Retorna o centro geométrico de uma geometria. | |
ST_LargestEmptyCircle g3.9 (geom, tolerance=0.0, boundary=POINT EMPTY) Computes the largest circle not overlapping a geometry. | |
ST_MinimumBoundingCircle (geomA, num_segs_per_qt_circ=48) Returns the smallest circle polygon that contains a geometry. | |
ST_MinimumBoundingRadius (geom) Returns the center point and radius of the smallest circle that contains a geometry. | |
ST_OrientedEnvelope (geom) Returns a minimum-area rectangle containing a geometry. | |
ST_OffsetCurve (line, signed_distance, style_parameters='') Returns an offset line at a given distance and side from an input line. | |
ST_PointOnSurface mm 3d (g1) Computes a point guaranteed to lie in a polygon, or on a geometry. | |
ST_Polygonize
Computes a collection of polygons formed from the linework of a set of geometries.
| |
ST_ReducePrecision g3.9 (g, gridsize) Returns a valid geometry with points rounded to a grid tolerance. | |
ST_SharedPaths (lineal1, lineal2) Retorna uma coleção contendo caminhos compartilhados pelas duas linestrings/multilinestrings de entrada. | |
ST_Simplify
Returns a simplified representation of a geometry, using the Douglas-Peucker algorithm.
| |
ST_SimplifyPreserveTopology (geom, tolerance) Returns a simplified and valid representation of a geometry, using the Douglas-Peucker algorithm. | |
ST_SimplifyPolygonHull g3.11 (param_geom, vertex_fraction, is_outer = true) Computes a simplifed topology-preserving outer or inner hull of a polygonal geometry. | |
ST_SimplifyVW (geom, tolerance) Returns a simplified representation of a geometry, using the Visvalingam-Whyatt algorithm | |
ST_SetEffectiveArea (geom, threshold = 0, set_area = 1) Sets the effective area for each vertex, using the Visvalingam-Whyatt algorithm. | |
ST_TriangulatePolygon g3.11 (geom) Computes the constrained Delaunay triangulation of polygons | |
ST_VoronoiLines (geom, tolerance = 0.0, extend_to = NULL) Returns the boundaries of the Voronoi diagram of the vertices of a geometry. | |
ST_VoronoiPolygons (geom, tolerance = 0.0, extend_to = NULL) Returns the cells of the Voronoi diagram of the vertices of a geometry. |
Coverages | |
---|---|
ST_CoverageInvalidEdges g3.12 (geom, tolerance = 0) Window function that finds locations where polygons fail to form a valid coverage. | |
ST_CoverageSimplify g3.12 (geom, tolerance, simplifyBoundary = true) Window function that simplifies the edges of a polygonal coverage. | |
ST_CoverageUnion (geom) Computes the union of a set of polygons forming a coverage by removing shared edges. |
Affine Transformations | |
---|---|
ST_Affine
3d
Apply a 3D affine transformation to a geometry.
| |
ST_Rotate
3d
Rotates a geometry about an origin point.
| |
ST_RotateX 3d (geomA, rotRadians) Rotates a geometry about the X axis. | |
ST_RotateY 3d (geomA, rotRadians) Rotates a geometry about the Y axis. | |
ST_RotateZ 3d (geomA, rotRadians) Rotates a geometry about the Z axis. | |
ST_Scale
3d
Scales a geometry by given factors.
| |
ST_Translate
3d
Translates a geometry by given offsets.
| |
ST_TransScale 3d (geomA, deltaX, deltaY, XFactor, YFactor) Translates and scales a geometry by given offsets and factors. |
Clustering Functions | |
---|---|
ST_ClusterDBSCAN (geom, eps, minpoints) Window function that returns a cluster id for each input geometry using the DBSCAN algorithm. | |
ST_ClusterIntersecting (g) Aggregate function that clusters input geometries into connected sets. | |
ST_ClusterIntersectingWin (geom) Window function that returns a cluster id for each input geometry, clustering input geometries into connected sets. | |
ST_ClusterKMeans (geom, number_of_clusters, max_radius) Window function that returns a cluster id for each input geometry using the K-means algorithm. | |
ST_ClusterWithin (g, distance) Aggregate function that clusters geometries by separation distance. | |
ST_ClusterWithinWin (geom, distance) Window function that returns a cluster id for each input geometry, clustering using separation distance. |
Bounding Box Functions | |
---|---|
Box2D (geom) Returns a BOX2D representing the 2D extent of a geometry. | |
Box3D 3d (geom) Returns a BOX3D representing the 3D extent of a geometry. | |
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 (geomfield) Aggregate function that returns the bounding box of geometries. | |
ST_3DExtent 3d (geomfield) Aggregate function that returns the 3D bounding box of geometries. | |
ST_MakeBox2D (pointLowLeft, pointUpRight) Creates a BOX2D defined by two 2D point geometries. | |
ST_3DMakeBox (point3DLowLeftBottom, point3DUpRightTop) Creates a BOX3D defined by two 3D point geometries. | |
ST_XMax 3d (aGeomorBox2DorBox3D) Returns the X maxima of a 2D or 3D bounding box or a geometry. | |
ST_XMin 3d (aGeomorBox2DorBox3D) Returns the X minima of a 2D or 3D bounding box or a geometry. | |
ST_YMax 3d (aGeomorBox2DorBox3D) Returns the Y maxima of a 2D or 3D bounding box or a geometry. | |
ST_YMin 3d (aGeomorBox2DorBox3D) Returns the Y minima of a 2D or 3D bounding box or a geometry. | |
ST_ZMax 3d (aGeomorBox2DorBox3D) Returns the Z maxima of a 2D or 3D bounding box or a geometry. | |
ST_ZMin 3d (aGeomorBox2DorBox3D) Returns the Z minima of a 2D or 3D bounding box or a geometry. |
Referência linear | |
---|---|
ST_LineInterpolatePoint
G
3d
Returns a point interpolated along a line at a fractional location.
| |
ST_3DLineInterpolatePoint 3d (a_linestring, a_fraction) Returns a point interpolated along a 3D line at a fractional location. | |
ST_LineInterpolatePoints
G
3d
Returns points interpolated along a line at a fractional interval.
| |
ST_LineLocatePoint
G
Returns the fractional location of the closest point on a line to a point.
| |
ST_LineSubstring
G
3d
Returns the part of a line between two fractional locations.
| |
ST_LocateAlong mm (geom_with_measure, measure, offset = 0) Returns the point(s) on a geometry that match a measure value. | |
ST_LocateBetween mm (geom, measure_start, measure_end, offset = 0) Returns the portions of a geometry that match a measure range. | |
ST_LocateBetweenElevations 3d (geom, elevation_start, elevation_end) Returns the portions of a geometry that lie in an elevation (Z) range. | |
ST_InterpolatePoint 3d (linear_geom_with_measure, point) Retorna o valor da dimensão de medida da geometria no ponto fechado para o ponto fornecido. | |
ST_AddMeasure 3d (geom_mline, measure_start, measure_end) Interpolates measures along a linear geometry. |
Trajectory Functions | |
---|---|
ST_IsValidTrajectory 3d (line) Tests if the geometry is a valid trajectory. | |
ST_ClosestPointOfApproach 3d (track1, track2) Returns a measure at the closest point of approach of two trajectories. | |
ST_DistanceCPA 3d (track1, track2) Returns the distance between the closest point of approach of two trajectories. | |
ST_CPAWithin 3d (track1, track2, dist) Tests if the closest point of approach of two trajectories is within the specified distance. |
Version Functions | |
---|---|
PostGIS_Extensions_Upgrade (target_version=null) Packages and upgrades PostGIS extensions (e.g. postgis_raster, postgis_topology, postgis_sfcgal) to given or latest version. | |
PostGIS_Full_Version () Reports full PostGIS version and build configuration infos. | |
PostGIS_GEOS_Version () Returns the version number of the GEOS library. | |
PostGIS_GEOS_Compiled_Version () Returns the version number of the GEOS library against which PostGIS was built. | |
PostGIS_Liblwgeom_Version () Returns the version number of the liblwgeom library. This should match the version of PostGIS. | |
PostGIS_LibXML_Version () Returns the version number of the libxml2 library. | |
PostGIS_LibJSON_Version () Returns the version number of the libjson-c library. | |
PostGIS_Lib_Build_Date () Returns build date of the PostGIS library. | |
PostGIS_Lib_Version () Returns the version number of the PostGIS library. | |
PostGIS_PROJ_Version () Returns the version number of the PROJ4 library. | |
PostGIS_PROJ_Compiled_Version () Returns the version number of the PROJ library against which PostGIS was built. | |
PostGIS_Wagyu_Version () Returns the version number of the internal Wagyu library. | |
PostGIS_Scripts_Build_Date () Returns build date of the PostGIS scripts. | |
PostGIS_Scripts_Installed () Returns version of the PostGIS scripts installed in this database. | |
PostGIS_Scripts_Released () Returns the version number of the postgis.sql script released with the installed PostGIS lib. | |
PostGIS_Version () Returns PostGIS version number and compile-time options. |
Grandes Variáveis Unificadas Personalizadas do PostGIS (GUCs) | |
---|---|
postgis.backend O backend para fazer a manutenção de uma função onde GEOS e SFCGAL sobrepõe. Opções: geos ou sfcgal. Padrão para geos. | |
postgis.gdal_datapath Uma opção de configuração para designar o valor da opção GDAL_DATA do GDAL. Se não funcionar, a variável ambiental GDAL_DATA é usada. | |
postgis.gdal_enabled_drivers Uma opção de configuração para estabelecer os drivers GDAL ativados no ambiente POstGIS. Afeta a variável GDAL_SKIP do GDAL. | |
postgis.enable_outdb_rasters Uma opção de configuração booleana para ativar o acesso ao out-db raster bands. | |
postgis.gdal_vsi_options Uma opção de configuração booleana para ativar o acesso ao out-db raster bands. |
Troubleshooting Functions | |
---|---|
PostGIS_AddBBox (geomA) Adicionar o retângulo envolvente a geometria. | |
PostGIS_DropBBox (geomA) Exclui o cache de retângulos envolventes da geometria. | |
PostGIS_HasBBox (geomA) Retorna verdadeiro se o retângulo desta geometria está cacheado. FALSO caso contrário. |