From: Sandro Santilli Date: Wed, 27 Oct 2004 14:28:57 +0000 (+0000) Subject: Added constructors docs and intial organizzation for postgis extension functions. X-Git-Tag: pgis_1_0_0RC1~239 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7bcc10f31ed2cde3f2662403ce14763217cd08e6;p=postgis Added constructors docs and intial organizzation for postgis extension functions. git-svn-id: http://svn.osgeo.org/postgis/trunk@1052 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/postgis.xml b/doc/postgis.xml index d57785d58..2b0f53137 100644 --- a/doc/postgis.xml +++ b/doc/postgis.xml @@ -3346,188 +3346,203 @@ dimension - Other Functions + Postgis Extensions + + + Management Functions + + + DropGeometryTable([<schema_name>], + <table_name>) + + + Drops a table and all its references in geometry_columns. + Note: uses current_schema() on schema-aware pgsql installations if + schema is not provided. + + + + + update_geometry_stats([<table_name>, + <column_name>]) + + + Update statistics about spatial tables for use by the query + planner. You will also need to run "VACUUM ANALYZE [table_name] + [column_name]" for the statistics gathering process to be + complete. NOTE: starting with PostgreSQL 8.0 statistics gathering + is automatically performed running "VACUUM ANALYZE". + + - - DropGeometryTable([<schema_name>], - <table_name>) + postgis_version() - Drops a table and all its references in geometry_columns. - Note: uses current_schema() on schema-aware pgsql installations if - schema is not provided. + Returns the version number of the PostGIS functions + installed in this database (deprecated, use postgis_full_version() + instead). - update_geometry_stats([<table_name>, - <column_name>]) + postgis_lib_version() - Update statistics about spatial tables for use by the query - planner. You will also need to run "VACUUM ANALYZE [table_name] - [column_name]" for the statistics gathering process to be - complete. NOTE: starting with PostgreSQL 8.0 statistics gathering - is automatically performed running "VACUUM ANALYZE". + Returns the version number of the PostGIS library. - A &< B + postgis_scripts_installed() - The "&<" operator returns true if A's bounding box - overlaps or is to the left of B's bounding box. + Returns the version number of the postgis.sql script + installed in this database. - A &> B + postgis_scripts_released() - The "&>" operator returns true if A's bounding box - overlaps or is to the right of B's bounding box. + Returns the version number of the postgis.sql script + released with the installed postgis lib. - A << B + postgis_geos_version() - The "<<" operator returns true if A's bounding box is - strictly to the left of B's bounding box. + Returns the version number of the GEOS library, or NULL if + GEOS support is not enabled. - A >> B + postgis_proj_version() - The ">>" operator returns true if A's bounding box is - strictly to the right of B's bounding box. + Returns the version number of the PROJ4 library, or NULL if + PROJ4 support is not enabled. - A ~= B + postgis_uses_stats() - 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. + Returns true if STATS usage has been enabled, false + otherwise. - A @ B + postgis_full_version() - The "@" operator returns true if A's bounding box is - completely contained by B's bounding box. + Reports full postgis version and build configuration + infos. - - A ~ B + - - The "~" operator returns true if A's bounding box completely - contains B's bounding box. - - + - - A && B + + Operators + - - The "&&" operator is the "overlaps" operator. If A's - bounding boux overlaps B's bounding box the operator returns - true. - - + + A &< B - - area2d(geometry) + + The "&<" operator returns true if A's bounding box + overlaps or is to the left of B's bounding box. + + - - Returns the area of the geometry if it is a polygon or - multi-polygon. - - + + A &> B - - asbinary(geometry,'NDR') + + The "&>" operator returns true if A's bounding box + overlaps or is to the right of B's bounding box. + + - - 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. - - + + A << B - - isvalid(geometry) + + The "<<" operator returns true if A's bounding box is + strictly to the left of B's bounding box. + + - - returns true if this geometry is valid. - - + + A >> B - - asbinary(geometry,'XDR') + + The ">>" operator returns true if A's bounding box is + strictly to the right of B's bounding box. + + - - 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. - - + + A ~= B - - box3d(geometry) + + 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. + + - - Returns a BOX3D representing the maximum extents of the - geometry. - - + + A @ B - - expand(geometry, float) + + The "@" operator returns true if A's bounding box is + completely contained by B's bounding box. + + - - This function returns a bounding box expanded in all - directions from the bounding box of the input geometry, by an - amount specified in the second argument. Very useful for - distance() queries, to add an index filter to the query. - - + + A ~ B - - collect(geometry set) + + The "~" operator returns true if A's bounding box completely + contains B's bounding box. + + - - This function returns a GEOMETRYCOLLECTION object from a set - of geometries. The collect() 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 COLLECT(GEOM) FROM GEOMTABLE GROUP BY - ATTRCOLUMN" will return a separate GEOMETRYCOLLECTION for each - distinct value of ATTRCOLUMN. - - + + A && B - - memcollect(geometry set) + + The "&&" operator is the "overlaps" operator. If A's + bounding boux overlaps B's bounding box the operator returns + true. + + + + - - This does the the same of collect(geometry), only more - memory-friendly (uses less memory and more processor time). - - + + Misurement functions + + + + area2d(geometry) + + + Returns the area of the geometry if it is a polygon or + multi-polygon. + + distance_sphere(point, point) @@ -3551,89 +3566,6 @@ dimension - - extent(geometry set) - - - 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. - - - - - find_srid(varchar,varchar,varchar) - - - 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. - - - - - force_collection(geometry) - - - Converts the geometry into a GEOMETRYCOLLECTION. This is - useful for simplifying the WKB representation. - - - - - force_2d(geometry) - - - 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). - - - - - force_3dz(geometry) - force_3d(geometry) - - - Forces the geometries into XYZ mode. - - - - - force_3dm(geometry) - - - Forces the geometries into XYM mode. - - - - - force_4d(geometry) - - - Forces the geometries into XYZM mode. - - - - - zmflag(geometry) - - - Returns ZM (dimension semantic) flag of the geometries as - a small int. Values are: 0=2d, 1=3dm, 2=3dz, 3=4d. - - - - - length2d(geometry) @@ -3691,6 +3623,14 @@ FROM geometry_table; + + distance(geometry, geometry) + + + Returns the smaller distance between two geometries. + + + max_distance(linestring,linestring) @@ -3701,156 +3641,298 @@ FROM geometry_table; - mem_size(geometry) + perimeter(geometry) - Returns the amount of space (in bytes) the geometry - takes. + Returns the 2-dimensional perimeter of the geometry, if it + is a polygon or multi-polygon. - multi(geometry) + perimeter2d(geometry) - Returns the geometry as a MULTI* geometry. If the geometry - is already a MULTI*, it is returned unchanged. + Returns the 2-dimensional perimeter of the geometry, if it + is a polygon or multi-polygon. - nrings(geometry) + perimeter3d(geometry) - If the geometry is a polygon or multi-polygon returns the - number of rings. + Returns the 3-dimensional perimeter of the geometry, if it + is a polygon or multi-polygon. + + + + + + + Geometry Constructors + + + MakePoint(<x>, <y>, [<z>], [<m>]) + + + Creates a 2d,3dz or 4d point geometry. + + + + + MakePointM(<x>, <y>, <m>) + + + Creates a 3dm point geometry. + + + + + MakeLine(geometry set) + + + Creates a Linestring from a set of point geometries. + You might want to use a subselect to order points before + feeding them to this aggregate. + + + + + MakePoly(geometry set) + + + Aggregate. Creates a MultiPolygon from the costituent + linework of a set of geometries. Only available when compiled + agains GEOS >= 2.1.0. + + + + + LineFromMultiPoint(multipoint) + + + Creates a LineString from a MultiPoint geometry. + + + + + + + Misc + + + + asbinary(geometry,'NDR') + + + 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. + + + + + asbinary(geometry,'XDR') + + + 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. + + + + + isvalid(geometry) + + + returns true if this geometry is valid. + + + + + box3d(geometry) + + + Returns a BOX3D representing the maximum extents of the + geometry. + + + + + expand(geometry, float) + + + This function returns a bounding box expanded in all + directions from the bounding box of the input geometry, by an + amount specified in the second argument. Very useful for + distance() queries, to add an index filter to the query. + + + + + collect(geometry set) + + + This function returns a GEOMETRYCOLLECTION object from a set + of geometries. The collect() 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 COLLECT(GEOM) FROM GEOMTABLE GROUP BY + ATTRCOLUMN" will return a separate GEOMETRYCOLLECTION for each + distinct value of ATTRCOLUMN. + + + + + memcollect(geometry set) + + + This does the the same of collect(geometry), only more + memory-friendly (uses less memory and more processor time). + + + - npoints(geometry) + extent(geometry set) - Returns the number of points in 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. - numb_sub_objects(geometry) + find_srid(varchar,varchar,varchar) - Returns the number of objects stored in the geometry. This - is useful for MULTI-geometries and GEOMETRYCOLLECTIONs. + 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. - perimeter(geometry) + force_collection(geometry) - Returns the 2-dimensional perimeter of the geometry, if it - is a polygon or multi-polygon. + Converts the geometry into a GEOMETRYCOLLECTION. This is + useful for simplifying the WKB representation. - - perimeter2d(geometry) + + force_2d(geometry) - Returns the 2-dimensional perimeter of the geometry, if it - is a polygon or multi-polygon. + 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). - - perimeter3d(geometry) + + force_3dz(geometry) + force_3d(geometry) - Returns the 3-dimensional perimeter of the geometry, if it - is a polygon or multi-polygon. + Forces the geometries into XYZ mode. - - point_inside_circle(geometry,float,float,float) + + force_3dm(geometry) - 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. + Forces the geometries into XYM mode. - - postgis_version() + + force_4d(geometry) - Returns the version number of the PostGIS functions - installed in this database (deprecated, use postgis_full_version() - instead). + Forces the geometries into XYZM mode. - - postgis_lib_version() + + zmflag(geometry) - Returns the version number of the PostGIS library. + Returns ZM (dimension semantic) flag of the geometries as + a small int. Values are: 0=2d, 1=3dm, 2=3dz, 3=4d. + + - postgis_scripts_installed() + mem_size(geometry) - Returns the version number of the postgis.sql script - installed in this database. + Returns the amount of space (in bytes) the geometry + takes. - postgis_scripts_released() + multi(geometry) - Returns the version number of the postgis.sql script - released with the installed postgis lib. + Returns the geometry as a MULTI* geometry. If the geometry + is already a MULTI*, it is returned unchanged. - postgis_geos_version() + nrings(geometry) - Returns the version number of the GEOS library, or NULL if - GEOS support is not enabled. + If the geometry is a polygon or multi-polygon returns the + number of rings. - postgis_proj_version() + npoints(geometry) - Returns the version number of the PROJ4 library, or NULL if - PROJ4 support is not enabled. + Returns the number of points in the geometry. - postgis_uses_stats() + numb_sub_objects(geometry) - Returns true if STATS usage has been enabled, false - otherwise. + Returns the number of objects stored in the geometry. This + is useful for MULTI-geometries and GEOMETRYCOLLECTIONs. - postgis_full_version() + point_inside_circle(geometry,float,float,float) - Reports full postgis version and build configuration - infos. + 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. @@ -3970,7 +4052,10 @@ FROM geometry_table; - + + + +