]> granicus.if.org Git - postgis/commitdiff
Move over ST_GeomFromEWKT, ST_GeomFromEWKB and provide examples. Fix some miscellane...
authorRegina Obe <lr@pcorp.us>
Mon, 28 Jul 2008 12:07:47 +0000 (12:07 +0000)
committerRegina Obe <lr@pcorp.us>
Mon, 28 Jul 2008 12:07:47 +0000 (12:07 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2886 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference.xml
doc/reference_new.xml

index 796105e2baa0c9c67d44459e5331387e71a5a86c..acf34418d334707e20b863842429aa4b16a66a30 100644 (file)
@@ -1363,22 +1363,6 @@ GROUP BY gid, field1,field2;
       <title>Geometry Constructors</title>
 
       <variablelist>
-        <varlistentry id="ST_GeomFromEWKT">
-          <term>ST_GeomFromEWKT(text)</term>
-
-          <listitem>
-            <para>Makes a Geometry from EWKT.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry id="ST_GeomFromEWKB">
-          <term>ST_GeomFromEWKB(bytea)</term>
-
-          <listitem>
-            <para>Makes a Geometry from EWKB.</para>
-          </listitem>
-        </varlistentry>
-
         <varlistentry>
           <term>ST_MakePoint(&lt;x&gt;, &lt;y&gt;, [&lt;z&gt;],
           [&lt;m&gt;])</term>
index 9a26f15e75ab8cbdb849fe6edf7a4cf6872dfadc..e1fd4eccc29ccb68b559e3367670589f980ffc23 100644 (file)
@@ -872,7 +872,114 @@ FROM (SELECT ST_Buffer(ST_MakeLine(ST_MakePoint(21, 22),ST_MakePoint(-19, -18)),
                        <xref linkend="ST_BdMPolyFromText" />wrappers to
             this function with standard OGC interface</para>
                  </refsection>
-               </refentry>
+       </refentry>
+       <refentry id="ST_GeomFromEWKB">
+         <refnamediv>
+               <refname>ST_GeomFromEWKB</refname>
+               <refpurpose>Return a specified ST_Geometry value from Extended Well-Known Binary representation (EWKB).</refpurpose>
+         </refnamediv>
+       
+         <refsynopsisdiv>
+               <funcsynopsis>
+                 <funcprototype>
+                       <funcdef>geometery <function>ST_GeomFromEWKB</function></funcdef>
+                       <paramdef><type>bytea </type> <parameter>EWKB</parameter></paramdef>
+                 </funcprototype>
+               </funcsynopsis>
+         </refsynopsisdiv>
+       
+         <refsection>
+               <title>Description</title>
+               <para>Constructs a PostGIS ST_Geometry object from the OGC Extended Well-Known binary (EWKT) representation.</para>
+               <note>
+                       <para>The EWKB format is not an OGC standard, but a PostGIS specific format that includes the spatial reference system (SRID)
+                       identifier</para>
+               </note>
+         </refsection>
+       
+         <refsection>
+               <title>Examples</title>
+               <para>line string binary rep 0f 
+               LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932) in NAD 83 long lat (4269).</para>
+               <note><para>NOTE: Even though byte arrays are delimited with \ and may have ', we need to escape both out with \ and ''.  So it does not
+                       look exactly like its AsEWKB representation.</para></note>
+       <programlisting>
+       SELECT ST_GeomFromEWKB(E'\\001\\002\\000\\000 \\255\\020\\000\\000\\003\\000\\000\\000\\344J=
+       \\013B\\312Q\\300n\\303(\\010\\036!E@''\\277E''K
+       \\312Q\\300\\366{b\\235*!E@\\225|\\354.P\\312Q
+       \\300p\\231\\323e1!E@');
+       </programlisting>
+         </refsection>
+         <refsection>
+               <title>See Also</title>
+               <para><xref linkend="ST_AsBinary" />, <xref linkend="ST_AsEWKB" /></para>
+         </refsection>
+       </refentry>
+               
+       <refentry id="ST_GeomFromEWKT">
+         <refnamediv>
+               <refname>ST_GeomFromEWKT</refname>
+               <refpurpose>Return a specified ST_Geometry value from Extended Well-Known Text representation (EWKT).</refpurpose>
+         </refnamediv>
+       
+         <refsynopsisdiv>
+               <funcsynopsis>
+                 <funcprototype>
+                       <funcdef>geometery <function>ST_GeomFromEWKT</function></funcdef>
+                       <paramdef><type>text </type> <parameter>EWKT</parameter></paramdef>
+                 </funcprototype>
+               </funcsynopsis>
+         </refsynopsisdiv>
+       
+         <refsection>
+               <title>Description</title>
+               <para>Constructs a PostGIS ST_Geometry object from the OGC Extended Well-Known text (EWKT) representation.</para>
+               <note>
+                       <para>The EWKT format is not an OGC standard, but an PostGIS specific format that includes the spatial reference system (SRID)
+                       identifier</para>
+               </note>
+         </refsection>
+       
+         <refsection>
+               <title>Examples</title>
+       <programlisting>SELECT ST_GeomFromEWKT('SRID=4269;LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932)');
+       SELECT ST_GeomFromEWKT('SRID=4269;MULTILINESTRING((-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932))');
+       
+       SELECT ST_GeomFromEWKT('SRID=4269;POINT(-71.064544 42.28787)');
+       
+       SELECT ST_GeomFromEWKT('SRID=4269;POLYGON((-71.1776585052917 42.3902909739571,-71.1776820268866 42.3903701743239,
+       -71.1776063012595 42.3903825660754,-71.1775826583081 42.3903033653531,-71.1776585052917 42.3902909739571))');
+       
+       SELECT ST_GeomFromEWKT('SRID=4269;MULTIPOLYGON(((-71.1031880899493 42.3152774590236,
+       -71.1031627617667 42.3152960829043,-71.102923838298 42.3149156848307,
+       -71.1023097974109 42.3151969047397,-71.1019285062273 42.3147384934248,
+       -71.102505233663 42.3144722937587,-71.10277487471 42.3141658254797,
+       -71.103113945163 42.3142739188902,-71.10324876416 42.31402489987,
+       -71.1033002961013 42.3140393340215,-71.1033488797549 42.3139495090772,
+       -71.103396240451 42.3138632439557,-71.1041521907712 42.3141153348029,
+       -71.1041411411543 42.3141545014533,-71.1041287795912 42.3142114839058,
+       -71.1041188134329 42.3142693656241,-71.1041112482575 42.3143272556118,
+       -71.1041072845732 42.3143851580048,-71.1041057218871 42.3144430686681,
+       -71.1041065602059 42.3145009876017,-71.1041097995362 42.3145589148055,
+       -71.1041166403905 42.3146168544148,-71.1041258822717 42.3146748022936,
+       -71.1041375307579 42.3147318674446,-71.1041492906949 42.3147711126569,
+       -71.1041598612795 42.314808571739,-71.1042515013869 42.3151287620809,
+       -71.1041173835118 42.3150739481917,-71.1040809891419 42.3151344119048,
+       -71.1040438678912 42.3151191367447,-71.1040194562988 42.3151832057859,
+       -71.1038734225584 42.3151140942995,-71.1038446938243 42.3151006300338,
+       -71.1038315271889 42.315094347535,-71.1037393329282 42.315054824985,
+       -71.1035447555574 42.3152608696313,-71.1033436658644 42.3151648370544,
+       -71.1032580383161 42.3152269126061,-71.103223066939 42.3152517403219,
+       -71.1031880899493 42.3152774590236)),
+       ((-71.1043632495873 42.315113108546,-71.1043583974082 42.3151211109857,
+       -71.1043443253471 42.3150676015829,-71.1043850704575 42.3150793250568,-71.1043632495873 42.315113108546)))');
+       </programlisting>
+         </refsection>
+         <refsection>
+               <title>See Also</title>
+               <para><xref linkend="ST_AsEWKT" />, <xref linkend="ST_GeomFromText" />, <xref linkend="ST_GeomFromEWKT" /></para>
+         </refsection>
+       </refentry>
          <refentry id="ST_GeomFromText">
                  <refnamediv>
                        <refname>ST_GeomFromText</refname>
@@ -900,7 +1007,7 @@ FROM (SELECT ST_Buffer(ST_MakeLine(ST_MakePoint(21, 22),ST_MakePoint(-19, -18)),
                
                        <!-- optionally mention that this function uses indexes if appropriate -->
                        <note>
-                           <para>There are 2 variants of ST_GeomFromText function, the first takes no SRID and returns a geometry
+                               <para>There are 2 variants of ST_GeomFromText function, the first takes no SRID and returns a geometry
                                        with no defined spatial reference system.  The second takes a spatial reference id as the second argument
                                        and returns an ST_Geometry that includes this srid as part of its meta-data.  The srid must be defined
                                        in the spatial_ref_sys table.</para>
@@ -924,40 +1031,40 @@ FROM (SELECT ST_Buffer(ST_MakeLine(ST_MakePoint(21, 22),ST_MakePoint(-19, -18)),
                
                  <refsection>
                        <title>Examples</title>
-<programlisting>SELECT ST_GeomFromText('LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932)');
-SELECT ST_GeomFromText('LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932)',4269);
-
-SELECT ST_GeomFromText('MULTILINESTRING((-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932))');
-
-SELECT ST_GeomFromText('POINT(-71.064544 42.28787)');
-
-SELECT ST_GeomFromText('POLYGON((-71.1776585052917 42.3902909739571,-71.1776820268866 42.3903701743239,
--71.1776063012595 42.3903825660754,-71.1775826583081 42.3903033653531,-71.1776585052917 42.3902909739571))');
-
-SELECT ST_GeomFromText('MULTIPOLYGON(((-71.1031880899493 42.3152774590236,
--71.1031627617667 42.3152960829043,-71.102923838298 42.3149156848307,
--71.1023097974109 42.3151969047397,-71.1019285062273 42.3147384934248,
--71.102505233663 42.3144722937587,-71.10277487471 42.3141658254797,
--71.103113945163 42.3142739188902,-71.10324876416 42.31402489987,
--71.1033002961013 42.3140393340215,-71.1033488797549 42.3139495090772,
--71.103396240451 42.3138632439557,-71.1041521907712 42.3141153348029,
--71.1041411411543 42.3141545014533,-71.1041287795912 42.3142114839058,
--71.1041188134329 42.3142693656241,-71.1041112482575 42.3143272556118,
--71.1041072845732 42.3143851580048,-71.1041057218871 42.3144430686681,
--71.1041065602059 42.3145009876017,-71.1041097995362 42.3145589148055,
--71.1041166403905 42.3146168544148,-71.1041258822717 42.3146748022936,
--71.1041375307579 42.3147318674446,-71.1041492906949 42.3147711126569,
--71.1041598612795 42.314808571739,-71.1042515013869 42.3151287620809,
--71.1041173835118 42.3150739481917,-71.1040809891419 42.3151344119048,
--71.1040438678912 42.3151191367447,-71.1040194562988 42.3151832057859,
--71.1038734225584 42.3151140942995,-71.1038446938243 42.3151006300338,
--71.1038315271889 42.315094347535,-71.1037393329282 42.315054824985,
--71.1035447555574 42.3152608696313,-71.1033436658644 42.3151648370544,
--71.1032580383161 42.3152269126061,-71.103223066939 42.3152517403219,
--71.1031880899493 42.3152774590236)),
-((-71.1043632495873 42.315113108546,-71.1043583974082 42.3151211109857,
--71.1043443253471 42.3150676015829,-71.1043850704575 42.3150793250568,-71.1043632495873 42.315113108546)))',4326);
-</programlisting>
+       <programlisting>SELECT ST_GeomFromText('LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932)');
+       SELECT ST_GeomFromText('LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932)',4269);
+       
+       SELECT ST_GeomFromText('MULTILINESTRING((-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932))');
+       
+       SELECT ST_GeomFromText('POINT(-71.064544 42.28787)');
+       
+       SELECT ST_GeomFromText('POLYGON((-71.1776585052917 42.3902909739571,-71.1776820268866 42.3903701743239,
+       -71.1776063012595 42.3903825660754,-71.1775826583081 42.3903033653531,-71.1776585052917 42.3902909739571))');
+       
+       SELECT ST_GeomFromText('MULTIPOLYGON(((-71.1031880899493 42.3152774590236,
+       -71.1031627617667 42.3152960829043,-71.102923838298 42.3149156848307,
+       -71.1023097974109 42.3151969047397,-71.1019285062273 42.3147384934248,
+       -71.102505233663 42.3144722937587,-71.10277487471 42.3141658254797,
+       -71.103113945163 42.3142739188902,-71.10324876416 42.31402489987,
+       -71.1033002961013 42.3140393340215,-71.1033488797549 42.3139495090772,
+       -71.103396240451 42.3138632439557,-71.1041521907712 42.3141153348029,
+       -71.1041411411543 42.3141545014533,-71.1041287795912 42.3142114839058,
+       -71.1041188134329 42.3142693656241,-71.1041112482575 42.3143272556118,
+       -71.1041072845732 42.3143851580048,-71.1041057218871 42.3144430686681,
+       -71.1041065602059 42.3145009876017,-71.1041097995362 42.3145589148055,
+       -71.1041166403905 42.3146168544148,-71.1041258822717 42.3146748022936,
+       -71.1041375307579 42.3147318674446,-71.1041492906949 42.3147711126569,
+       -71.1041598612795 42.314808571739,-71.1042515013869 42.3151287620809,
+       -71.1041173835118 42.3150739481917,-71.1040809891419 42.3151344119048,
+       -71.1040438678912 42.3151191367447,-71.1040194562988 42.3151832057859,
+       -71.1038734225584 42.3151140942995,-71.1038446938243 42.3151006300338,
+       -71.1038315271889 42.315094347535,-71.1037393329282 42.315054824985,
+       -71.1035447555574 42.3152608696313,-71.1033436658644 42.3151648370544,
+       -71.1032580383161 42.3152269126061,-71.103223066939 42.3152517403219,
+       -71.1031880899493 42.3152774590236)),
+       ((-71.1043632495873 42.315113108546,-71.1043583974082 42.3151211109857,
+       -71.1043443253471 42.3150676015829,-71.1043850704575 42.3150793250568,-71.1043632495873 42.315113108546)))',4326);
+       </programlisting>
                  </refsection>
                  <refsection>
                        <title>See Also</title>