Changeset: a4656d24da6d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a4656d24da6d Modified Files: geom/lib/libgeom.mx Branch: Mar2011 Log Message:
geom: set endianness for wkb en/decoding On big-endian platforms, we have XDR representation, instead of NDR representation. Tell geos that we want NDR, such that it knows how to convert properly. This makes all test that only fail on PPC/Darwin and Sparc/Solaris work. diffs (38 lines): diff --git a/geom/lib/libgeom.mx b/geom/lib/libgeom.mx --- a/geom/lib/libgeom.mx +++ b/geom/lib/libgeom.mx @@ -58,10 +58,13 @@ @h /* 'WKB' + + http://edndoc.esri.com/arcsde/9.0/general_topics/wkb_representation.htm + ==Geometry Type byte== -All serialiezd geometries start with a single byte +All serialized geometries start with a single byte encoding geometry type (lower nibble) and flags (higher nibble). @@ -147,6 +150,7 @@ { str tmp; initGEOS((GEOSMessageHandler)GDKerror, (GEOSMessageHandler)GDKerror); + GEOS_setWKBByteOrder(1); /* NDR (little endian) */ tmp = GDKgetenv("monet_welcome"); if (tmp != NULL && strcmp(tmp, "yes") == 0) printf("# MonetDB/GIS module v" VERSION " loaded\n"); @@ -243,9 +247,9 @@ const char * geom_type2str(int t) { - switch(t) { + switch (t) { case wkbPoint: return "Point"; - case wkbLineString: return "Line"; + case wkbLineString: return "Line"; case wkbPolygon: return "Polygon"; case wkbMultiPoint: return "MultiPoint"; case wkbMultiLineString: return "MultiLine"; _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
