Boost logo

Geometry :

Subject: [geometry] io - WKB
From: Mats Taraldsvik (mats.taraldsvik_at_[hidden])
Date: 2013-07-18 15:04:18


Hi all,

I think that WKB io is an important missing feature, so I've started to
implement WKB reader and writer, based on the existing implementation
for WKT.

Is anyone working on this already?

I'm wondering what data structure I should use to store the binary data in.
- WKT uses basic_ostream, which is possible with binary using the
.write(char*, numberofbytes) member function, but does this make more
sense than, say, a std::vector<(unsigned) char>?
- Is there an obvious choice for efficiency reasons?
- Should I use char or unsigned char?
- How closely should I mimic the WKT interface? (since it is text and
binary, and the formats differ, is there a point in keeping the
interfaces similar)?
- A solution could be to read and write HEX strings using an interface
that is similar to the one for WKT, and a different interface for raw
binary arrays. Opinions?

I consider WKB the right choice when performance matters, so we should
strive to make it efficient.

Regards,
Mats Taraldsvik


Geometry list run by mateusz at loskot.net