[geos-devel] Exposing Precision model through C-API

Rémi Cura remi.cura at gmail.com
Thu Feb 13 00:54:27 PST 2014


I'm Captain obvious here,
but maybe you should take a look at CGAL, which is the reference lib
regarding to precision issue. (I'm not speaking of the exact kernel.)
Also Geos is a port of JTS, but I don't know if everything was ported (like
this?
http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/PrecisionModel.html
).

All in all, exposing precision model is not a design or interface problem,
but an algorithmic problem with no solution (except going the exact
precision way), thus it is a matter of compromises and balance, because
precise output cannot be guaranteed (if you chain operations like
buffer(buffer(...buffer(geom)...)), enforcing precision is very difficult ).

Maybe people from SFCGAL project would have a lot to say, because they must
have done something about precision issue when writting/reading to CGAL.

Cheers,

Rémi-C



2014-02-12 17:52 GMT+01:00 Sandro Santilli <strk at keybit.net>:

> On Wed, Feb 12, 2014 at 10:08:07PM +0530, Anubhav Jaiswal wrote:
> > Hi,
> >
> > Can someone point me to any other geometric model which has already been
> > exposed through C-API. It will make it easier for me to implement for
> > Precision Model.
>
> The C-API completely hides the PrecisionModel to the client
> and internally forces Floating, by using the default
> GeometryFactory (geos_ts_c.cpp:209)
>
> In order to use a different PrecisionModel you'll need
> to construct a different GeometryFactory using that model,
> and the constructed GeometryFactory will need to stay alive
> for the whole lifetime of any geometry that's been constructed
> with that factory.
>
> --strk;
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20140213/8a6f4a55/attachment.html>


More information about the geos-devel mailing list