PostGIS Manual | ||
---|---|---|
Prev | Chapter 5. PostGIS Reference |
The "<&" operator returns true if A's bounding box overlaps or is to the right of B's bounding box.
The "&>" operator returns true if A's bounding box overlaps or is to the left of B's bounding box.
The "<<" operator returns true if A's bounding box is strictly to the right of B's bounding box.
The ">>" operator returns true if A's bounding box is strictly to the left of B's bounding box.
The "~=" operator is the "same as" operator. It tests actual geometric equality of two features. So if A and B are the same feature, vertex-by-vertex, the operator returns true.
The "~" operator returns true of A's bounding box is completely contained by B's bounding box.
The "&&" operator is the "overlaps" operator. If A's bounding boux overlaps B's bounding box the operator returns true.
Returns the area of the geometry if it is a polygon or multi-polygon.
Returns the geometry in the OGC "well-known-binary" format, using little-endian encoding. This is useful in binary cursors to pull data out of the database without converting it to a string representation.
Returns the geometry in the OGC "well-known-binary" format, using big-endian encoding. This is useful in binary cursors to pull data out of the database without converting it to a string representation.
Returns a BOX3D representing the maximum extents of the geometry.
The extent() function is an "aggregate" function in the terminology of PostgreSQL. That means that it operators on lists of data, in the same way the sum() and mean() functions do. For example, "SELECT EXTENT(GEOM) FROM GEOMTABLE" will return a BOX3D giving the maximum extend of all features in the table. Similarly, "SELECT EXTENT(GEOM) FROM GEOMTABLE GROUP BY CATEGORY" will return one extent result for each category.
The syntax is find_srid(<db/schema>, <table>, <column>) and the function returns the integer SRID of the specified column by searching through the GEOMETRY_COLUMNS table. If the geometry column has not been properly added with the AddGeometryColumns() function, this function will not work either.
Converts the geometry into a GEOMETRYCOLLECTION. This is useful for simplifying the WKB representation.
Forces the geometries into a "2-dimensional mode" so that all output representations will only have the X and Y coordinates. This is useful for force OGC-compliant output (since OGC only specifies 2-D geometries).
Forces the geometries into a "3-dimensional mode" so that all output representations will have the X, Y and Z coordinates.
Returns the 2-dimensional length of the geometry if it is a linestring or multi-linestring.
Returns the 3-dimensional length of the geometry if it is a linestring or multi-linestring.
Calculates the length of of a geometry on an elipsoid. This is useful if the coordinates of the geometry are in latitude/longitude and a length is desired without reprojection. The elipsoid is a separate database type and can be constructed as follows:
SPHEROID[<NAME>,<SEMI-MAJOR
AXIS>,<INVERSE FLATTENING>] Eg:
SPHEROID["GRS_1980",6378137,298.257222101]
SELECT
length_spheroid(geometry_column,'SPHEROID["GRS_1980",6378137,298.257222101]')
from geometry_table;
Calculates the length of of a geometry on an elipsoid, taking the elevation into account. This is just like length_spheroid except vertical coordinates (expressed in the same units as the spheroid axes) are used to calculate the extra distance vertical displacement adds.
Returns the amount of space (in bytes) the geometry takes.
Returns the number of points in the geometry.
If the geometry is a polygon or multi-polygon returns the number of rings.
Returns the number of objects stored in the geometry. This is useful for MULTI-geometries and GEOMETRYCOLLECTIONs.
Returns the 2-dimensional perimeter of the geometry, if it is a polygon or multi-polygon.
Returns the 3-dimensional perimeter of the geometry, if it is a polygon or multi-polygon.
The syntax for this functions is point_inside_circle(<geometry>,<circle_center_x>,<circle_center_y>,<radius>). Returns the true if the geometry is a point and is inside the circle. Returns false otherwise.
Returns the version number of the PostGIS functions installed in this database.
Returns a text summary of the contents of the geometry.
Translates the geometry to a new location using the numeric parameters as offsets. Ie: translate(geom,X,Y,Z).
Returns true if any part of B is within the bounding box of A.