]> granicus.if.org Git - postgis/commitdiff
Add Paul Ramsey's example, get rid of more obsolete statements about 4326 is only...
authorRegina Obe <lr@pcorp.us>
Mon, 16 Oct 2017 06:18:08 +0000 (06:18 +0000)
committerRegina Obe <lr@pcorp.us>
Mon, 16 Oct 2017 06:18:08 +0000 (06:18 +0000)
References #3902 for PostGIS 2.5.0

git-svn-id: http://svn.osgeo.org/postgis/trunk@15988 b70326c6-7e19-0410-871a-916f4a2858ee

doc/using_postgis_dataman.xml

index d2048580ebf736a9833c1150901f97a0b857e8b0..6aec6e67a9c2d36ed476ae9a318e378475d7a8f3 100644 (file)
@@ -346,8 +346,7 @@ CREATE TABLE lgeognad27(gid serial PRIMARY KEY, geog geography(POLYGON,4267) );<
                <para>Note that the location column has type GEOGRAPHY and that geography type supports two optional modifier: a type modifier that restricts the kind of shapes and dimensions allowed in the column; an SRID modifier that restricts the coordinate reference identifier to a particular number.</para>
                <para>Allowable values for the type modifier are: POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON. The modifier also supports dimensionality restrictions through suffixes: Z, M and ZM. So, for example a modifier of 'LINESTRINGM' would only allow line strings with three dimensions in, and would treat the third dimension as a measure.
                Similarly, 'POINTZM' would expect four dimensional data.</para>
-               <para>The SRID modifier is currently of limited use: only 4326 (WGS84) is allowed as a value. If you do not specify an SRID, the a value 0 (undefined spheroid) will be used, and all calculations will proceed using WGS84 anyways.</para>
-               <para>In the future, alternate SRIDs will allow calculations on spheroids other than WGS84.</para>
+               <para>If you do not specify an SRID, the SRID will default to 4326 WGS 84 long/lat will be used, and all calculations will proceed using WGS84.</para>
                <para>Once you have created your table, you can see it in the GEOGRAPHY_COLUMNS table:</para>
                <para><programlisting>
 -- See the contents of the metadata view
@@ -383,6 +382,30 @@ INSERT INTO global_points (name, location) VALUES ('London', ST_GeogFromText('SR
   SELECT ST_Distance('LINESTRING(-122.33 47.606, 0.0 51.5)'::geometry, 'POINT(-21.96 64.15)':: geometry);</programlisting>
 </para>
 
+<para>-- Testing different lon/lat projects, requires PostGIS 2.2+.
+-- Any long lat spatial reference system in spatial_ref_sys table is allowed.
+       <programlisting>-- NAD 83 lon/lat
+SELECT 'SRID=4269;POINT(-123 34)'::geography;</programlisting>
+<screen>                     geography
+----------------------------------------------------
+ 0101000020AD1000000000000000C05EC00000000000004140
+(1 row)</screen>
+
+<programlisting>-- NAD27 lon/lat
+SELECT 'SRID=4267;POINT(-123 34)'::geography;</programlisting>
+
+<screen>                     geography
+----------------------------------------------------
+ 0101000020AB1000000000000000C05EC00000000000004140
+(1 row)</screen>
+
+<programlisting>-- NAD83 UTM zone meters, yields error since its a meter based projection
+SELECT 'SRID=26910;POINT(-123 34)'::geography;</programlisting>
+
+<screen>ERROR:  Only lon/lat coordinate systems are supported in geography.
+LINE 1: SELECT 'SRID=26910;POINT(-123 34)'::geography;</screen>
+</para>
+
 <para>The GEOGRAPHY type calculates the true shortest distance over the sphere between Reykjavik and the great circle flight path between Seattle and London.</para>
 
 <para> <ulink url="http://gc.kls2.com/cgi-bin/gc?PATH=SEA-LHR">Great Circle mapper</ulink>