Changeset: aa964e04d281 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aa964e04d281
Modified Files:
geom/monetdb5/geom.c
geom/monetdb5/geom.mal
Branch: geo
Log Message:
handling hex representation of data and loading data without the need to use
FromText or FromBinary functions
diffs (37 lines):
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -4218,7 +4218,17 @@ size_t wkbFROMSTR(char* geomWKT, int* le
*geomWKB = wkb_nil;
return 0;
}
-
+fprintf(stderr, "In wkbFROMSTR\n");
+ //check whether the represenattion is binary (hex)
+ if(geomWKT[0] == '0'){
+ str ret = wkbFromBinary(geomWKB, &geomWKT);
+fprintf(stderr, "BINARY\n");
+
+ if(ret != MAL_SUCCEED)
+ return 0;
+ return (int)strlen(geomWKT);
+ }
+ fprintf(stderr, "NOT\n");
//check whether the geometry type is polyhedral surface
//geos cannot handle this type of geometry but since it is
//a special type of multipolygon I jsu change the type before
diff --git a/geom/monetdb5/geom.mal b/geom/monetdb5/geom.mal
--- a/geom/monetdb5/geom.mal
+++ b/geom/monetdb5/geom.mal
@@ -540,6 +540,11 @@ command calc.isnil(v:wkb):bit
address wkbIsnil
comment "Nil test for wkb value";
+#loading string without the need to use st_wkbtosql OR st_wkttosql
+function calc.wkb{unsafe}( wkt:str, srid:int, type:int ) :wkb;
+ x := wkb.FromText(wkt,0,0);
+ return x;
+end wkb;
# wkbPoint := 1;
# wkbLineString := 2;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list