<title>Geometry Constructors</title>
<variablelist>
+
<varlistentry>
<term>GeomFromText(text,[<srid>])</term>
-
<listitem>
<para>Makes a Geometry from WKT with the given SRID. If SRID is
not give, it defaults to -1.</para>
</varlistentry>
<varlistentry>
- <term>GeomFromWKB(text,[<srid>])</term>
+ <term>GeomFromWKB(bytea,[<srid>])</term>
<listitem>
<para>Makes a Geometry from WKB with the given SRID. If SRID is
</varlistentry>
<varlistentry>
- <term>GeomFromWKB(text,[<srid>])</term>
+ <term>GeomFromWKB(bytea,[<srid>])</term>
<listitem>
<para>Makes a Geometry from WKB with the given SRID. If SRID is
</sect2>
<sect2>
- <title>Misurement functions</title>
+ <title>Misurement Functions</title>
<variablelist>
<varlistentry>
</sect2>
+ <sect2>
+ <title>Geometry Outputs</title>
+ <variablelist>
+
+ <varlistentry>
+ <term>AsBinary(geometry,{'NDR'|'XDR'})</term>
+
+ <listitem>
+ <para>Returns the geometry in the OGC "well-known-binary" format as a bytea, using little-endian (NDR) or big-endian (XDR) encoding. This is useful in binary cursors to pull data out of the database without converting it to a string representation.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>AsEWKT(geometry)</term>
+ <listitem>
+ <para>Returns a Geometry in EWKT format (as text).</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>AsEWKB(geometry, {'NDR'|'XDR'})</term>
+ <listitem>
+ <para>Returns a Geometry in EWKB format (as bytea) using either little-endian (NDR) or big-endian (XDR) encoding.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>AsSVG(geometry, [rel], [precision])</term>
+ <listitem>
+ <para>Return the geometry as an SVG path data. Use 1 as second argument to have the path data implemented in terms of relative moves, the default (or 0) uses absolute moves. Third argument may be used to reduce the maximum number of decimal digits used in output (defaults to 15). Point geometries will be rendered as cx/cy when 'rel' arg is 0, x/y when 'rel' is 1.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>AsGML(geometry, [precision])</term>
+ <listitem>
+ <para>Return the geometry as a GML element. Second argument may be used to reduce the maximum number of significant digits used in output (defaults to 15).</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </sect2>
+
+
<sect2>
<title>Geometry Constructors</title>
+
<variablelist>
+
<varlistentry>
- <term>MakePoint(<x>, <y>, [<z>], [<m>])</term>
+ <term>GeomFromEWKT(text)</term>
+ <listitem>
+ <para>Makes a Geometry from EWKT.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>GeomFromEWKB(bytea)</term>
+ <listitem>
+ <para>Makes a Geometry from EWKB.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>MakePoint(<x>, <y>, [<z>], [<m>])</term>
<listitem>
<para>Creates a 2d,3dz or 4d point geometry.</para>
</listitem>
<variablelist>
<varlistentry>
- <term>addBBOX(geometry)</term>
+ <term>AddBBOX(geometry)</term>
<listitem>
<para>Add bounding box to the geometry. This would make bounding
box based queries faster, but will increase the size of the
</varlistentry>
<varlistentry>
- <term>dropBBOX(geometry)</term>
+ <term>DropBBOX(geometry)</term>
<listitem>
<para>Drop the bounding box cache from the geometry.
This reduces geometry size, but makes bounding-box based
</varlistentry>
<varlistentry>
- <term>force_collection(geometry)</term>
+ <term>Force_collection(geometry)</term>
<listitem>
<para>Converts the geometry into a GEOMETRYCOLLECTION. This is
</varlistentry>
<varlistentry id="force_2d">
- <term>force_2d(geometry)</term>
+ <term>Force_2d(geometry)</term>
<listitem>
<para>Forces the geometries into a "2-dimensional mode" so that
</varlistentry>
<varlistentry id="force_3dz">
- <term>force_3dz(geometry)</term>
- <term>force_3d(geometry)</term>
+ <term>Force_3dz(geometry)</term>
+ <term>Force_3d(geometry)</term>
<listitem>
<para>Forces the geometries into XYZ mode.</para>
</varlistentry>
<varlistentry id="force_3dm">
- <term>force_3dm(geometry)</term>
+ <term>Force_3dm(geometry)</term>
<listitem>
<para>Forces the geometries into XYM mode.</para>
</varlistentry>
<varlistentry id="force_4d">
- <term>force_4d(geometry)</term>
+ <term>Force_4d(geometry)</term>
<listitem>
<para>Forces the geometries into XYZM mode.</para>
</varlistentry>
<varlistentry>
- <term>multi(geometry)</term>
+ <term>Multi(geometry)</term>
<listitem>
<para>Returns the geometry as a MULTI* geometry. If the geometry
</varlistentry>
<varlistentry>
- <term>transform(geometry,integer)</term>
+ <term>Transform(geometry,integer)</term>
<listitem>
<para>Returns a new geometry with its coordinates transformed to
</varlistentry>
<varlistentry>
- <term>translate(geometry,float8,float8,float8)</term>
+ <term>Translate(geometry,float8,float8,float8)</term>
<listitem>
<para>Translates the geometry to a new location using the numeric
</varlistentry>
<varlistentry>
- <term>simplify(geometry, tolerance)</term>
+ <term>Simplify(geometry, tolerance)</term>
<listitem>
<para>Returns a "simplified" version of the given geometry using
</varlistentry>
<varlistentry>
- <term>segmentize(geometry, maxlength)</term>
+ <term>Segmentize(geometry, maxlength)</term>
<listitem>
<para>Return a modified [multi]polygon having no ring segment
<title>Misc</title>
<variablelist>
- <varlistentry>
- <term>asBinary(geometry,'NDR')</term>
-
- <listitem>
- <para>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.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>asBinary(geometry,'XDR')</term>
-
- <listitem>
- <para>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.</para>
- </listitem>
- </varlistentry>
+ <varlistentry>
+ <term>Summary(geometry)</term>
+ <listitem>
+ <para>Returns a text summary of the contents of the geometry.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>box2d(geometry)</term>
+ <listitem>
+ <para>Returns a BOX2D representing the maximum extents of the geometry.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>box3d(geometry)</term>
+ <listitem>
+ <para>Returns a BOX3D representing the maximum extents of the geometry.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>extent(geometry set)</term>
+
+ <listitem>
+ <para>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.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="zmflag">
+ <term>zmflag(geometry)</term>
+ <listitem>
+ <para>Returns ZM (dimension semantic) flag of the geometries as a small int. Values are: 0=2d, 1=3dm, 2=3dz, 3=4d. </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="ndims">
+ <term>ndims(geometry)</term>
+ <listitem>
+ <para>Returns number of dimensions of the geometry as a small int. Values are: 2,3 or 4.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>nrings(geometry)</term>
+ <listitem>
+ <para>If the geometry is a polygon or multi-polygon returns the number of rings.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>npoints(geometry)</term>
+ <listitem>
+ <para>Returns the number of points in the geometry.</para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term>isvalid(geometry)</term>
</listitem>
</varlistentry>
- <varlistentry>
- <term>box3d(geometry)</term>
-
- <listitem>
- <para>Returns a BOX3D representing the maximum extents of the
- geometry.</para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term>expand(geometry, float)</term>
distance() queries, to add an index filter to the query.</para>
</listitem>
</varlistentry>
- <varlistentry>
- <term>extent(geometry set)</term>
-
- <listitem>
- <para>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.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>estimated_extent([schema], table, geocolumn)</term>
-
- <listitem>
- <para>
- Return the 'estimated' extent of the given spatial table.
- The estimated is taken from the geometry column's statistics
- gathered by running VACUUM ANALYZE, and is statistically
- about 95% of 'real' extent. The current schema will be
- used if not specified.
- </para>
- <para>NOTE: This is only available with PostgreSQL >= 8.0.0</para>
- </listitem>
- </varlistentry>
+ <varlistentry>
+ <term>estimated_extent([schema], table, geocolumn)</term>
+ <listitem>
+ <para> Return the 'estimated' extent of the given spatial table. The estimated is taken from the geometry column's statistics gathered by running VACUUM ANALYZE, and is statistically about 95% of 'real' extent. The current schema will be used if not specified. </para>
+ <para>NOTE: This is only available with PostgreSQL >= 8.0.0</para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term>find_srid(varchar,varchar,varchar)</term>
</listitem>
</varlistentry>
- <varlistentry id="zmflag">
- <term>zmflag(geometry)</term>
-
- <listitem>
- <para>Returns ZM (dimension semantic) flag of the geometries as
- a small int. Values are: 0=2d, 1=3dm, 2=3dz, 3=4d.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry id="ndims">
- <term>ndims(geometry)</term>
-
- <listitem>
- <para>Returns number of dimensions of the geometry as
- a small int. Values are: 2,3 or 4.
- </para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term>mem_size(geometry)</term>
</listitem>
</varlistentry>
- <varlistentry>
- <term>nrings(geometry)</term>
-
- <listitem>
- <para>If the geometry is a polygon or multi-polygon returns the
- number of rings.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>npoints(geometry)</term>
-
- <listitem>
- <para>Returns the number of points in the geometry.</para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term>numb_sub_objects(geometry)</term>
</listitem>
</varlistentry>
- <varlistentry>
- <term>summary(geometry)</term>
-
- <listitem>
- <para>Returns a text summary of the contents of the
- geometry.</para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term>xmin(box3d) ymin(box3d) zmin(box3d)</term>
</listitem>
</varlistentry>
- <varlistentry>
- <term>AsSVG(geometry, [rel], [precision])</term>
-
- <listitem>
- <para>Return the geometry as an SVG path data. Use 1 as second
- argument to have the path data implemented in terms of relative
- moves, the default (or 0) uses absolute moves. Third argument may
- be used to reduce the maximum number of decimal digits used in
- output (defaults to 15). Point geometries will be rendered as
- cx/cy when 'rel' arg is 0, x/y when 'rel' is 1.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>AsGML(geometry, [precision])</term>
-
- <listitem>
- <para>Return the geometry as a GML element.
- Second argument may be used to reduce the maximum number
- of significant digits used in output (defaults to 15).</para>
- </listitem>
- </varlistentry>
</variablelist>
</sect2>