[geos-devel] Ability to preallocate the WKT stringstream buffer for really large geometries?

Mats Taraldsvik mats.taraldsvik at norkart.no
Thu Feb 21 04:29:03 PST 2013


> -----Opprinnelig melding-----
> Fra: geos-devel-bounces at lists.osgeo.org [mailto:geos-devel-
> bounces at lists.osgeo.org] På vegne av Mateusz Loskot
> Sendt: 21. februar 2013 12:42
> Til: GEOS Development List
> Emne: Re: [geos-devel] Ability to preallocate the WKT stringstream buffer for
> really large geometries?
> 
> On 21 February 2013 09:22, Mats Taraldsvik <mats.taraldsvik at norkart.no>
> wrote:
> > Locally, I have modified the WKTWriter::writeNumber(double d) method
> > to use boost::spirit::karma::real_generator for conversion of numbers,
> instead of std::stringstream.
> 
> Just to back up this idea:
> 
> http://alexott.blogspot.co.uk/2010/01/boostspirit2-vs-atoi.html
> 

It is, indeed, a lot faster. One could argue, though, that WKB is better suited when one needs performance.

> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel

Vennlig hilsen

Mats Taraldsvik
+47 901 65 934


More information about the geos-devel mailing list