[Gdal-dev] GEOS precision model?
Frank Warmerdam
warmerdam at pobox.com
Tue Jun 26 14:16:13 EDT 2007
Ari Jolma wrote:
> I'm doing some rather heavy duty geocomputation with OGR (via Perl
> module Geo::OGR of course), mainly intersections. I run into a problem,
> where GEOS throws a topology exception since the vertices of the two
> geometries are very close to each other (6 digits same, then differences).
>
> I'm no GEOS guru, but it seems there is a possibility to improve the
> robustness of overlay operations with precision models(?). I think they
> could be useful for me now.
>
> Is there a way to take advantage of what GEOS offers (and what does it
> really offer, if I could have a quick lesson...) via OGR? And if not,
> would it be difficult to hack it in?
Ari,
OGR does not provide any access to the GEOS precision model. In fact,
looking over the GEOS C API it does not either. I think if you were
willing to do a custom build you would want to replace the following
in geos/capi/geos_c.cpp
static const GeometryFactory *geomFactory =
GeometryFactory::getDefaultInstance();
with a customized geometry factory. I don't know the details about
that though.
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 | President OSGeo, http://osgeo.org
More information about the Gdal-dev
mailing list