Subject: Re: [geometry] io - WKB
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-07-23 04:25:05
On 22 July 2013 19:05, Barend Gehrels <barend_at_[hidden]> wrote:
> On 22-7-2013 0:46, Mateusz Loskot wrote:
>> On 21 July 2013 22:23, Bruno Lalande <bruno.lalande_at_[hidden]> wrote:
>>> I don't think a container is a good choice. Streams were invented for a
>>> reason (regardless of the language), which is to allow tranfers of data
>>> without loading it all in memory. If a user wants to load directly
>>> from/to a
>>> file, a network or any out-of-memory resource, he needs streams in order
>>> minimize memory consumption. If however he wants it all in a container
>>> any reason, stream iterators are here for that.
>> I agree.
>> I answered a general question as it was asked without any details
>> regarding where it is aimed to be used.
>> On the other hand, I followed read_wkt which takes container.
>> I guess it could be changed to streams.
> Yes, the WKT input might can be changed to streams. I will think about that.
> Internally it uses Boost.Tokenizer. It takes a string as input.
> To be clear: wkt-output uses streams already (from the beginning). It is a
> WKB input is already based on stream iterators (though random access),
> contrary to WKT.
If we assume range or pair of iterators as interface equivalent to explicit
stream object, then yes, we are good.
> What is your reason to re-implement WKB using Boost.Spirit V3?
I consider it as an experiment with potentially better performance and
simpler (or alternative) implementation. So, not pushing it yet.
-- Mateusz Loskot, http://mateusz.loskot.net
Geometry list run by mateusz at loskot.net