This was a bug. Thanks for pointing out. It's been fixed in the 2.2 and head branches.
--strk; On Sat, Apr 29, 2006 at 09:19:39PM -0700, Jeffrey J. Early wrote: > I'm running GEOS 2.2.1 on a big endian machine (macosx, ppc) and encountered > troubles when trying to use the c -interface function GEOSGeomFromWKB_buf. > Specifically it fails to properly set the internal byte ordering to big > endian. In the file WKBReader.cpp I took the lines (68-70): > > // default is machine endian > if (byteOrder == WKBConstants::wkbNDR) > dis.setOrder(ByteOrderValues::ENDIAN_LITTLE); > > And added, > > else > dis.setOrder(ByteOrderValues::ENDIAN_BIG); > > after it. This solved the problem. > > I discovered this problem reading some WKB data from a Postgresql database > via PostGIS and tried to dump it to GEOSGeomFromWKB_buf. This failed with > the error message "Unknown WKB type ". I was pretty sure the data was valid > having written my own WKB parser which worked successfully on the same data. > > I can't get the CVS code to compile, so I don't know if it's been fixed > already -- but glancing at the WKBReader.cpp file in CVS I don't see an > obvious change. > > Should this be patched? Or is something else possibly causing this problem? > > Jeffrey _______________________________________________ geos-devel mailing list geos-devel@geos.refractions.net http://geos.refractions.net/mailman/listinfo/geos-devel