]> granicus.if.org Git - postgis/commitdiff
updated
authorSandro Santilli <strk@keybit.net>
Wed, 8 Dec 2004 14:46:48 +0000 (14:46 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 8 Dec 2004 14:46:48 +0000 (14:46 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@1127 b70326c6-7e19-0410-871a-916f4a2858ee

examples/wkb_reader/README

index 9bae95b47f3ac1e34f2284338796b88a45afbbbe..757d3df86566da791e5eda1f956b2cffa0772781 100644 (file)
@@ -11,15 +11,16 @@ used for transfer between servers and clients that are not the same endian
 See http://www.opengis.org/techno/specs/99-049.rtf page 3-24 for the WKB 
 specification.
 
-3d geometries are encoded as in OGR by adding 32768 to the type.  Points are 
-then 24 bytes (X,Y,Z) instead of 16 bytes (X,Y).  
+Z and M coordinates presence is encoded by or'ing WKBZOFFSET (0x80000000)
+and WKBMOFFSET (0x40000000) to the type.
+Points can then be 24 bytes (XYZ,XYM) or 32 bytes (XYZM)
 
-You can force 3d geometries to be returned as 2d geometries by using the
-force_2d() function. For example:
+You can force geometries to be returned as 2d using the force_2d()
+function. For example:
 
-  select wkb_ndr(force_2d(geom)) from mytable;
+  select asBinary(force_2d(geom)) from mytable;
 
-If the client is running on a i386, you should use wkb_ndr() and on a sparc 
-you should use wkb_xdr() so you do not causes an endian shift on both the 
-server and client.
+If the client is running on a i386, you should use asBinary(geom, 'NDR')
+and on a sparc you should use asBinary(geom, 'XDR') so you do not causes
+an endian shift on both the server and client.