From: Regina Obe Date: Thu, 25 Sep 2008 12:10:41 +0000 (+0000) Subject: Move over ST_MakePointM, miscellaneous typo fixes X-Git-Tag: 1.4.0b1~706 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a4e1d6ab5f7ea00cd82225d87db49048ed54ebd4;p=postgis Move over ST_MakePointM, miscellaneous typo fixes git-svn-id: http://svn.osgeo.org/postgis/trunk@3006 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference.xml b/doc/reference.xml index 5dcdedd3c..99699889d 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -997,14 +997,6 @@ GROUP BY gid, field1,field2; Geometry Constructors - - ST_MakePointM(<x>, <y>, <m>) - - - Creates a 3dm point geometry. - - - ST_MakeBox2D(<LL>, <UR>) diff --git a/doc/reference_new.xml b/doc/reference_new.xml index 1e7a69d06..69f1e5b2a 100644 --- a/doc/reference_new.xml +++ b/doc/reference_new.xml @@ -885,7 +885,7 @@ Check constraints: --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 , - + ST_MakePoint @@ -1492,7 +1492,67 @@ result , , + + + + ST_MakePointM + + Creates a point geometry with an x y and m coordinate. + + + + + + geometry ST_MakePointM + float x + float y + float m + + + + + + Description + + Creates a point with x, y and measure coordinates. + Note x is longitude and y is latitude. + + + + Examples + We use ST_AsEWKT in these examples to show the text representation instead of ST_AsText because ST_AsText does not + support returning M. + +--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 + + + + See Also + , , + + @@ -2467,9 +2527,9 @@ FROM (SELECT 'LINESTRING(0 0, 0 1, 1 0, 1 1, 0 0)'::geometry AS the_geom) AS foo - boolean ST_StartPoint + geometry ST_StartPoint - geometry g + geometry geomA