As funções descritas abaixo são as que um usuário do PostGIS devem precisar. Existem outras funções que são necessárias para suportar os objetos PostGIS mas que não são de uso comum pelo usuário.
![]() | |
O PostGIS iniciou uma transição da convenção de nomenclatura existente para uma convenção em torno do SQL-MM. Como resultado, a maioria das funções que você conhece e ama foram renomeadas usando o padrão de tipo espacial (com o prefixo ST). As funções anteriores ainda existem, porém não são listadas nesta documentação onde as funções atualizadas são equivalentes. As funções que não possuem prefixo ST_ não listadas nesta documentação estão obsoletas e serão removidas em futuros lançamentos, então PAREM DE UTILIZÁ-LAS. |
Essa seção lista os tipos de dados PostgreSQL instalados pelo PostGIS. Note que descrevemos que o comportamento desses é muito importante , especialmente quando designando suas próprias funções.
Each data type describes its type casting behavior. A type cast converts values of one data type into another type. PostgreSQL allows defining casting behavior for custom types, along with the functions used to convert type values. Casts can have automatic behavior, which allows automatic conversion of a function argument to a type supported by the function.
Some casts have explicit behavior, which means the cast must be specified using the syntax CAST(myval As sometype)
or myval::sometype
. Explicit casting avoids the issue of ambiguous casts, which can occur when using an overloaded function which does not support a given type. For example, a function may accept a box2d or a box3d, but not a geometry. Since geometry has an automatic cast to both box types, this produces an "ambiguous function" error. To prevent the error use an explicit cast to the desired box type.
All data types can be cast to text
, so this does not need to be specified explicitly.
geometry_dump
rows for the components of a geometry.geometry_dump
rows for the exterior and interior rings of a Polygon.VERDADEIRO
se os pontos de começo e fim da LINESTRING
são coincidentes. Para superfície poliédrica está fechada (volumétrica). valid_detail
row stating if a geometry is valid or if not a reason and a location.LINESTRING
de uma WKB com o SRID dadoVERDADE
se a caixa limitadora 2D de A intersecta a caixa limitadora 2D de B. TRUE
if a geometry's (cached) 2D bounding box intersects a 2D float precision bounding box (BOX2DF).TRUE
if a 2D float precision bounding box (BOX2DF) intersects a geometry's (cached) 2D bounding box.TRUE
if two 2D float precision bounding boxes (BOX2DF) intersect each other.VERDADE
se a caixa limitadora n-D de A intersecta a caixa limitadora n-D de B. TRUE
if a geometry's (cached) n-D bounding box intersects a n-D float precision bounding box (GIDX).TRUE
if a n-D float precision bounding box (GIDX) intersects a geometry's (cached) n-D bounding box.TRUE
if two n-D float precision bounding boxes (GIDX) intersect each other.VERDADE
se a caixa limitadora de A sobrepõe ou está à esquerda de B. VERDADE
se a caixa limitadora de A sobrepõe ou está abaixo de B. VERDADE
se a caixa limitadora de A sobrepõe ou está à direita de B. VERDADE
se uma caixa limitadora de A está estritamente à esquerda da de B.VERDADE
se uma caixa limitadora de A está estritamente abaixo da de B.TRUE
if the coordinates and coordinate order geometry/geography A are the same as the coordinates and coordinate order of geometry/geography B.TRUE
if A's bounding box is strictly to the right of B's.VERDADE
se uma caixa limitadora de A está contida pela de B.TRUE
if a geometry's 2D bounding box is contained into a 2D float precision bounding box (BOX2DF).TRUE
if a 2D float precision bounding box (BOX2DF) is contained into a geometry's 2D bounding box.TRUE
if a 2D float precision bounding box (BOX2DF) is contained into another 2D float precision bounding box.VERDADE
se a caixa limitadora de A sobrepõe ou está acima de B. VERDADE
se uma caixa limitadora de A está estritamente acima da de B.VERDADE
se uma caixa limitadora de A contém a de B.TRUE
if a geometry's 2D bonding box contains a 2D float precision bounding box (GIDX).TRUE
if a 2D float precision bounding box (BOX2DF) contains a geometry's 2D bonding box.TRUE
if a 2D float precision bounding box (BOX2DF) contains another 2D float precision bounding box (BOX2DF).VERDADE
se a caixa limitadora de A é a mesma de B.ST_Length
ST_Perimeter
.These functions operate on sets of polygonal geometry that form "implicit coverages". To form a valid coverage polygons must not overlap, and the vertices of adjacent edges must match exactly. Coverages are fast to process, and can be operated on with window functions, which retain the coverage topology inside the window partition while altering the edges.
These functions change the position and shape of geometries using affine transformations.
These functions produce or operate on bounding boxes. They can also provide and accept geometry values, by using automatic or explicit casts.
See also Section 12.7, “PostGIS Box Functions”.
SFCGAL é uma biblioteca wrapper C++ em torno do CGAL que fornece funções 2D e 3D avançadas. Para robustez, coordenadas de geometria têm a representação exata de número racional.
As instruções de instalação da biblioteca, podem ser encontradas na página inicial do SFCGAL http://www.sfcgal.org. Para carregar as funções, crie uma extensão postgis_sfcgal.
Esse módulo e funções pl/pgsql associadas foram implementadas para fornecer suporte de fechamento requerido pela especificação Web Feature Service.
![]() | |
Os usuários devem usar serializable transaction level, senão o mecanismo de fechamento irá quebrar. |
Essa seção lista as Grandes Variáveis Unificadas Personalizadas (GUC) do PostGIS personalizado. Elas podem ser globalmente configuradas, por banco de dados, por sessão ou por transação. A melhor configuração a nível global ou database.