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

Oliver Courtin olivier.courtin at oslandia.com
Mon Feb 17 04:55:41 PST 2014

Le 13 févr. 2014 à 09:54, Rémi Cura a écrit :

Hi alls,

> 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.

Related to SFCGAL, we have to choosed a CGAL kernel reliable enough (for our targeted usages), 
and so implied CGAL internal exact rational number representation.

And you're right Rémy, chained operations are still an issue,
because each time we go back to PostGIS (for instance here)
we are obliged to convert back to double.

Our first initial thought, was to extent WKT to allow rational notation.
Something like POINT(2/3 1/3) rather than POINT(0.6666666 0.3333333)
Cf: http://wiki.postgresql.org/images/3/36/Postgis_3d_pgday2013_hm.pdf
(slides 17 and 18)

But surely something to standardize at OGC/ISO level first…  

So our current lead, to 'solve it', is to allow at low level (meaning here PostgreSQL)
to use references rather than values for nested functions calls 
(this approach is also something interesting as a pure performance matter):

We plan to work again on this subject by this summer.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20140217/4f5e128e/attachment.html>

More information about the geos-devel mailing list