From: Regina Obe Date: Mon, 4 Aug 2008 11:32:45 +0000 (+0000) Subject: got rid of additional entry for ST_GeomFromText - was already moved over, moved over... X-Git-Tag: 1.4.0b1~788 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8038e8c44f41d052c5b3db70dfd55be655b1a36;p=postgis got rid of additional entry for ST_GeomFromText - was already moved over, moved over ST_PointFromText, ST_MakePoint git-svn-id: http://svn.osgeo.org/postgis/trunk@2914 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference.xml b/doc/reference.xml index 01004cc11..1d0710f89 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -555,33 +555,6 @@ GROUP BY gid, field1,field2; Geometry Constructors - - ST_GeomFromText(text) - ST_GeomFromText(text,srid integer) - - - Makes a Geometry from WKT with the given SRID. If no SRID is passed in SRID is unknown (-1 currently). - - OGC SPEC 3.2.6.2 - option SRID is from the conformance - suite - - - - - ST_PointFromText(text) - ST_PointFromText(text,srid integer) - - - Makes a Geometry from WKT with the given SRID. If SRID is - not give, it defaults to -1. - - OGC SPEC 3.2.6.2 - option SRID is from the conformance - suite - - Throws an error if the WKT is not a Point - - - ST_LineFromText(text) ST_LineFromText(text,srid integer) @@ -1157,15 +1130,6 @@ GROUP BY gid, field1,field2; Geometry Constructors - - ST_MakePoint(<x>, <y>, [<z>], - [<m>]) - - - Creates a 2d,3dz or 4d point geometry. - - - ST_MakePointM(<x>, <y>, <m>) diff --git a/doc/reference_new.xml b/doc/reference_new.xml index 889d42977..d701a4b9b 100644 --- a/doc/reference_new.xml +++ b/doc/reference_new.xml @@ -1193,7 +1193,8 @@ SELECT ST_GeomFromEWKT('SRID=4269;MULTIPOLYGON(((-71.1031880899493 42.3152774590 This method implements the OpenGIS Simple Features - Implementation Specification for SQL. + Implementation Specification for SQL. + OGC SPEC 3.2.6.2 - option SRID is from the conformance suite. @@ -1302,6 +1303,83 @@ SELECT userpoints.id, ST_MakeLine(startpoint, endpoint) As drawn_line + + ST_MakePoint(<x>, <y>, [<z>], + [<m>]) + + + Creates a 2d,3dz or 4d point geometry. + + + + + + ST_MakePoint + + Creates a 2d,3dz or 4d point geometry. + + + + + + geometry ST_MakePoint + float x + float y + + + + + geometry ST_MakePoint + float x + float y + float z + + + + + geometry ST_MakePoint + float x + float y + float z + float m + + + + + + Description + + >Creates a 2d,3dz or 4d point geometry (geometry with measure). ST_MakePoint while not being + OGC compliant is generally faster and more precise than ST_GeomFromText and ST_PointFromText. It is also easier + to use if you have raw coordinates rather than WKT. + Note x is longitude and y is latitude + + + + Examples + +--Return point with unknown SRID +SELECT ST_MakePoint(-71.1043443253471, 42.3150676015829); + +--Return point marked as WGS 84 long lat +SELECT ST_SetSRID(ST_MakePoint(-71.1043443253471, 42.3150676015829),4326); + +--Return a 3d point (e.g. has altitude) +SELECT ST_MakePoint(1, 2,1.5); + +--Get z of point +SELECT ST_Z(ST_MakePoint(1, 2,1.5)); +result +------- +1.5 + + + + See Also + , , + + + @@ -1409,6 +1487,75 @@ FROM , , , , + + + ST_PointFromText + Makes a point Geometry from WKT with the given SRID. If SRID is + not given, it defaults to unknown. + + + + + geometry ST_PointFromText + text WKT + + + geometry ST_PointFromText + text WKT + integer srid + + + + + + Description + + Constructs a PostGIS ST_Geometry point object from the OGC Well-Known text representation. If SRID is + not give, it defaults to unknown (currently -1). If geometry is not a WKT point representation, returns null. + If completely invalid WKT, then throws an error. + + + + There are 2 variants of ST_PointFromText 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. + + + + If you are absolutely sure all your WKT geometries are points, don't use this function. + It is slower than ST_GeomFromText since it adds an additional validation step. If you are building points from long lat coordinates and care more about performance than OGC compliance, use ST_MakePoint. + + + + + + + + This method implements the OpenGIS Simple Features + Implementation Specification for SQL. + OGC SPEC 3.2.6.2 - option SRID is from the conformance suite. + + + + + This method implements the SQL/MM specification: + SQL-MM 3: 5.1.40 + + + + Examples + +SELECT ST_PointFromText('POINT(-71.064544 42.28787)'); +SELECT ST_PointFromText('POINT(-71.064544 42.28787)', 4326); + + + + See Also + , , + + ST_Union @@ -3888,7 +4035,7 @@ SELECT ST_Touches('LINESTRING(0 0, 1 1, 0 2)'::geometry, 'POINT(0 2)'::geometry) Description Returns TRUE if geometry A is completely inside geometry B. For this function to make - sense, the source geometries must both be of the same coorindate projection, + sense, the source geometries must both be of the same coordinate projection, having the same SRID. It is a given that if ST_Within(A,B) is true and ST_Within(B,A) is true, then the two geometries are considered spatially equal.