wkb endian usage?
Posted by: Ulf Küßner
Date: August 26, 2005 05:02AM
I currently start looking into the WKB format, and I've run across an understanding problem regarding the endian encoding of a WKB.
Mind you, I might have a limited endian understanding. It's not what I usally do.
I'll just quote the example given in the docs, and point out where I can't really follow.
--- quote with comment---
Here comes a Point(1 1)
The sequence may be broken down into these components:
Byte order : 01 -- this should indicate Big Endian encoding I suppose (see below)
WKB type : 01000000 (here we seem to have a big endian)
X : 000000000000F03F (this looks rather like a Little Endian.)
Y : 000000000000F03F
Component representation is as follows:
The byte order may be either 0 or 1 to indicate little-endian or big-endian storage. The little-endian and big-endian byte orders are also known as Network Data Representation (NDR) and External Data Representation (XDR), respectively.
--- eoq ---
Now using Java 5 , which uses big endian for internal representation, I came up with the following results for X:
Converted to Big Endian: 3ff0000000000000
Double with endian conversion: 1.0
Double without endian conversion: 3.03865E-319
Now the question is - are Point coordinates always stored as Little Endian, regardless of the ByteOrder setting? I can't really find a logic in that, but maybe I'm lacking knowlege of some specification?
wkb endian usage?
August 26, 2005 05:02AM
October 09, 2005 06:07PM
October 21, 2005 11:26AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.