]> granicus.if.org Git - postgis/commitdiff
some bug fixes... geometry_analyze added
authorSandro Santilli <strk@keybit.net>
Wed, 8 Sep 2004 16:34:36 +0000 (16:34 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 8 Sep 2004 16:34:36 +0000 (16:34 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@788 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/TODO
lwgeom/lwgeom_inout.c
lwgeom/lwpostgis.sql.in

index a0daedf961a0212b9c08cbfa0239eee9db67f7a4..58eeed06f41f86285d042b8bbb5e779f4a15b06f 100644 (file)
@@ -1,11 +1,14 @@
+
+- WKB: what to do with that ? do we want to keep it as a type ?
+
+- size computation functions for deserialized objects
+
 - Implement lwexploded_serialize_buf for speedup of GEOS<=>POSTGIS conversion
   and more!
 
 - box extractor functions writing to a pointer or returning an actual
   object should probably find a way to return NULL (for empty geometries).
 
-- WKB: what to do with that ? do we want to keep it as a type ?
-
 - Check spheroid misure functions
        o can't understand if 3d computation works since
          I get same result w/ 2d and 3d.
index a86a35a433ddc72b5edbd0770df89d9176b205c7..f974189bc831fdca267a9f65b5b11062a44d3d8b 100644 (file)
@@ -12,6 +12,9 @@
 
 #include "fmgr.h"
 #include "utils/elog.h"
+#if USE_VERSION > 73
+# include "lib/stringinfo.h" // for binary input
+#endif
 
 
 #include "lwgeom.h"
@@ -30,11 +33,6 @@ extern unsigned char parse_hex(char *str);
 extern void deparse_hex(unsigned char str, unsigned char *result);
 extern char *parse_lwgeom_wkt(char *wkt_input);
 
-
-// 3d or 4d.  There is NOT a (x,y,m) point type!!!
-#define WKB3DOFFSET 0x80000000
-#define WKB4DOFFSET 0x40000000
-
 Datum LWGEOMFromWKB(PG_FUNCTION_ARGS);
 Datum WKBFromLWGEOM(PG_FUNCTION_ARGS);
 
@@ -92,7 +90,8 @@ Datum LWGEOM_in(PG_FUNCTION_ARGS)
        {
                //its WKB
                //PG_RETURN_POINTER(parse_lwgeom_serialized_form(str));
-               PG_RETURN_POINTER( parse_lwgeom_wkt(str) );   // this function handles wkt and wkb (in hex-form)
+               // this function handles wkt and wkb (in hex-form)
+               PG_RETURN_POINTER( parse_lwgeom_wkt(str) );  
        }
        else if ( (start == 'P') || (start == 'L') || (start == 'M') ||
                (start == 'G') || (start == 'p') || (start == 'l') ||
index 182e8c9934384e608ba413a5c047f33bc31f41f4..beb27142b453e947f48b4ae13b39dec8293841f6 100644 (file)
@@ -104,6 +104,9 @@ CREATE TYPE geometry (
         internallength = variable,
         input = geometry_in,
         output = geometry_out,
+#if USE_VERSION >= 80
+       analyze = geometry_analyze,
+#endif // USE_VERSION >= 80
         storage = main
 );
 
@@ -1053,11 +1056,6 @@ CREATEFUNCTION AsText(geometry)
        AS '@MODULE_FILENAME@','LWGEOM_asText'
        LANGUAGE 'C' WITH (isstrict,iscachable);
 
-CREATEFUNCTION GeometryFromText(geometry, int4)
-        RETURNS geometry
-        AS '@MODULE_FILENAME@','LWGEOM_from_text'
-        LANGUAGE 'C' WITH (isstrict,iscachable);
-
 CREATEFUNCTION GeometryFromText(geometry)
         RETURNS geometry
         AS '@MODULE_FILENAME@','LWGEOM_from_text'