]> granicus.if.org Git - postgis/commitdiff
Move over ST_MakePointM, miscellaneous typo fixes
authorRegina Obe <lr@pcorp.us>
Thu, 25 Sep 2008 12:10:41 +0000 (12:10 +0000)
committerRegina Obe <lr@pcorp.us>
Thu, 25 Sep 2008 12:10:41 +0000 (12:10 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3006 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference.xml
doc/reference_new.xml

index 5dcdedd3c2c515f79420f3c456f541b1d3296f92..99699889dc76ce551cc71b85f5cf67e8540240e3 100644 (file)
@@ -997,14 +997,6 @@ GROUP BY gid, field1,field2;
       <title>Geometry Constructors</title>
 
       <variablelist>
-        <varlistentry>
-          <term>ST_MakePointM(&lt;x&gt;, &lt;y&gt;, &lt;m&gt;)</term>
-
-          <listitem>
-            <para>Creates a 3dm point geometry.</para>
-          </listitem>
-        </varlistentry>
-
         <varlistentry>
           <term>ST_MakeBox2D(&lt;LL&gt;, &lt;UR&gt;)</term>
 
index 1e7a69d063cb948c377a00bfeefacf78e415bde7..69f1e5b2afcb6eab95bdda09dcc4d84ad5f148f5 100644 (file)
@@ -885,7 +885,7 @@ Check constraints:
                        
 <programlisting>--A buffered point approximates a circle
 -- A buffered point forcing approximation of 
--- 4 points per circle looks like poly with 16 sides
+-- 4 points per circle is poly with 16 sides
 SELECT ST_NPoints(ST_Buffer(ST_GeomFromText('POINT(1 2)'), 10)) As promisingcircle_pcount, 
 ST_NPoints(ST_Buffer(ST_GeomFromText('POINT(1 2)'), 10, 4)) As lamecircle_pcount;
 
@@ -894,7 +894,7 @@ promisingcircle_pcount | lamecircle_pcount
                         33 |                17
 
 --A lighter but lamer circle 
--- only 2 points per quarter circle
+-- only 2 points per quarter circle is an octagon
 --Below is a 100 meter octagon
 -- Note coordinates are in NAD 83 long lat which we transform
 to Mass state plane meter and then buffer to get measurements in meters;
@@ -908,7 +908,7 @@ POLYGON((236057.59057465 900908.759918696,236028.301252769 900838.049240578,235
 900908.759918696,235886.879896532 900979.470596815,235957.59057465 901008.759918
 696,236028.301252769 900979.470596815,236057.59057465 900908.759918696))
 
---Buffer is often also used as a poor mans polygon fixer or a sometimes speedier unioner
+--Buffer is often also used as a poor man's polygon fixer or a sometimes speedier unioner
 --Sometimes able to fix invalid polygons - using below
 -- using below on anything but a polygon will result in empty geometry
 -- and for geometry collections kill anything in the collection that is not a polygon
@@ -1425,7 +1425,7 @@ SELECT userpoints.id, ST_MakeLine(startpoint, endpoint) As drawn_line
                        <para><xref linkend="ST_GeomFromText" />, <xref linkend="ST_MakePoint" /></para>
                </refsection>
        </refentry>     
-<refentry id="ST_MakePoint">
+       <refentry id="ST_MakePoint">
                <refnamediv>
                <refname>ST_MakePoint</refname>
                
@@ -1492,7 +1492,67 @@ result
                        <para><xref linkend="ST_GeomFromText" />, <xref linkend="ST_PointFromText" />, <xref linkend="ST_SetSRID" /></para>
                </refsection>
        </refentry>     
+       
+       <refentry id="ST_MakePointM">
+               <refnamediv>
+               <refname>ST_MakePointM</refname>
+               
+               <refpurpose>Creates a point geometry with an x y and m coordinate.</refpurpose>
+               </refnamediv>
+               
+               <refsynopsisdiv>
+                       <funcsynopsis>
+                         <funcprototype>
+                               <funcdef>geometry <function>ST_MakePointM</function></funcdef>
+                               <paramdef><type>float</type> <parameter>x</parameter></paramdef>
+                               <paramdef><type>float</type> <parameter>y</parameter></paramdef>
+                               <paramdef><type>float</type> <parameter>m</parameter></paramdef>
+                         </funcprototype>
+                       </funcsynopsis>
+               </refsynopsisdiv>
+               
+               <refsection>
+                       <title>Description</title>
+                       
+                       <para>Creates a point with x, y and measure coordinates. </para>
+                       <note><para>Note x is longitude and y is latitude.</para></note>
+               </refsection>
+               
+               <refsection>
+               <title>Examples</title> 
+                       <para>We use ST_AsEWKT in these examples to show the text representation instead of ST_AsText because ST_AsText does not 
+                       support returning M.</para>
+                <programlisting>
+--Return EWKT representation of point with unknown SRID
+SELECT ST_AsEWKT(ST_MakePointM(-71.1043443253471, 42.3150676015829, 10));
+
+--result
+                   st_asewkt
+-----------------------------------------------
+ POINTM(-71.1043443253471 42.3150676015829 10)
+--Return EWKT representation of point with measure marked as WGS 84 long lat
+SELECT ST_AsEWKT(ST_SetSRID(ST_MakePointM(-71.1043443253471, 42.3150676015829,10),4326));
+
+                        st_asewkt
+---------------------------------------------------------
+SRID=4326;POINTM(-71.1043443253471 42.3150676015829 10)
+
+--Return a 3d point (e.g. has altitude)
+SELECT ST_MakePoint(1, 2,1.5);
 
+--Get m of point
+SELECT ST_M(ST_MakePointM(-71.1043443253471, 42.3150676015829,10)); 
+result
+-------
+10
+                         </programlisting>
+               </refsection>
+               <refsection>
+                       <title>See Also</title>
+                       <para><xref linkend="ST_AsEWKT" />, <xref linkend="ST_MakePoint" />, <xref linkend="ST_SetSRID" /></para>
+               </refsection>
+       </refentry>     
        
        <refentry id="ST_MakePolygon">
                <refnamediv>
@@ -2467,9 +2527,9 @@ FROM (SELECT 'LINESTRING(0 0, 0 1, 1 0, 1 1, 0 0)'::geometry AS the_geom) AS foo
     <refsynopsisdiv>
       <funcsynopsis>
         <funcprototype>
-          <funcdef>boolean <function>ST_StartPoint</function></funcdef>
+          <funcdef>geometry <function>ST_StartPoint</function></funcdef>
   
-          <paramdef><type>geometry </type> <parameter>g</parameter></paramdef>
+          <paramdef><type>geometry </type> <parameter>geomA</parameter></paramdef>
         </funcprototype>
       </funcsynopsis>
     </refsynopsisdiv>