#3 GeometryWKB Reader/writer encoding problem

open
nobody
None
5
2004-10-14
2003-05-31
Andrew Coats
No

The WKB reader/ writer basically ignores the encoding
byte (little endian/ big endian). I think PCs/.Net default to
little endian notation. If big endian notation is found it
should throw a NotImplementedException.

Discussion

  • Simon Batson
    Simon Batson
    2004-02-06

    Logged In: YES
    user_id=969121

    Hi Andrew,

    Make the following changes to at least correct the problem
    for GeometryCollections (the problem I had with WKB)

    In IO/GeometryWKBWriter.cs

    line 311

    Change

    //Write the number of geometries.
    _bWriter.Write(numGeometries);

    To

    //Write the number of geometries.
    _bWriter.Write(numGeometries);

    //Write the format.
    _bWriter.Write(format);

    In IO/GeometryWKBReader.cs

    Line 326

    Change
    geometries[i] = Create();
    to
    geometries[i] = Create(_bReader);

    Hope this helps you.

    Simon

     
  • Andrew Coats
    Andrew Coats
    2004-10-14

    Logged In: YES
    user_id=168425

    fixed

     
  • Andrew Coats
    Andrew Coats
    2004-10-14

    • status: open --> closed
     
  • Andrew Coats
    Andrew Coats
    2004-10-14

    • status: closed --> open