[geos-devel] Ability to preallocate the WKT stringstream buffer for really large geometries?
mats.taraldsvik at norkart.no
Thu Feb 21 01:53:25 PST 2013
> -----Opprinnelig melding-----
> Fra: geos-devel-bounces at lists.osgeo.org [mailto:geos-devel-
> bounces at lists.osgeo.org] På vegne av Sandro Santilli
> Sendt: 21. februar 2013 10:42
> Til: GEOS Development List
> Emne: Re: [geos-devel] Ability to preallocate the WKT stringstream buffer for
> really large geometries?
> On Thu, Feb 21, 2013 at 09:22:36AM +0000, Mats Taraldsvik wrote:
> > I have now submitted pull requests for bug #310 and increased
> performance and preallocation on github, ready for review:
> > https://github.com/libgeos/libgeos/pull/5
> > https://github.com/libgeos/libgeos/pull/4
> What's the full url to the branches containing those commits ? I can't find
> them from the pull requests.
I can see the branches/commits by going to libgeos/libgeos -> pull requests -> choose one of the pull requests -> commits
Here are the full urls to the "external" branches
> > 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. This improves writing WKT by 6x-10x on my datasets
> (tested with linestrings with up to 10000 points). This change *is not* part of
> the patch for two reasons:
> > - I don't know whether you want to introduce a dependency on
> boost::spirit::karma, although it is header-only, so it might not be a large
> > - The precision and fixed notation parametres are changed by using
> policies, essentially structs with static methods that return the precision,
> trailing_zeros etc. I might be incorrect, but I would have to make policies
> (structs) for every combination of fixed and decimalPlaces and determine at
> runtime which of them to use, to make the approach suitable for GEOS. This
> is easily done, but I don't know if you think it is worth it?
> No, I don't think we should introduce a dependency on boost yet.
I understand :)
> geos-devel mailing list
> geos-devel at lists.osgeo.org
+47 901 65 934
More information about the geos-devel