[Gdal-dev] exportToGEOS performance
Frank Warmerdam
warmerdam at pobox.com
Thu Oct 6 12:17:19 EDT 2005
On 10/6/05, Pirmin Kalberer <sp_ml at sourcepole.com> wrote:
> Hi,
>
> I'm using the GEOS polygonizer for the OGR Interlis driver. But the
> polygonization is quite slow because of the exportToGEOS call. The code looks
> like this:
>
> geos::Geometry *poThisGeosGeom = poLines->exportToGEOS(); //slow
> geos::Polygonizer* polygonizer = new geos::Polygonizer();
> polygonizer->add(poThisGeosGeom);
> vector<geos::Polygon*> *poOtherGeosGeom = polygonizer->getPolygons();
>
> We're talking about exporting 1677 OGRLineString's in about 1'20'' and
> polygonizing them within a few second.
Pirmin,
I was planning to rewrite exportToGEOS() to translate using WKB
format instead of WKT which I suspect will be significantly faster.
This will be part of an upgrade to use the GEOS C API in time for
the next release. In the meantime, you might want to try modifying
your local copy to go via WKB instead of WKT. I think when I
first looked at GEOS only the WKT conversion was supported.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list