[Qgis-developer] Geometry precision model
Hugo Mercier
hugo.mercier at oslandia.com
Mon Sep 14 00:47:45 PDT 2015
Hi,
I am investigating a better handling of different precision models
within QGIS geometry operations, and in particular the "fixed" precision
model.
Since geometry processing in QGIS relies mostly on GEOS, I think this is
close to the kind of discussion that can be found in PostGIS:
https://trac.osgeo.org/postgis/wiki/ToleranceDiscussion
I see it as:
- storing somewhere as a global parameter, the current precision model
(in project parameters?), i.e. the current "grid"
- adding a way to set the "global" precision model to the Geometry API
- make the Geometry API use this precision model
For the last point, I see two possibilities :
- since we rely on the GEOS C API, which does not allow to modify the
precision model (always the default - floating), it would require to add
some new functions in the C API to change the precision model for
coordinate constructions
- using the C++ GEOS API instead of the C API that exposes precision models.
I am not sure yet about what possibility to implement. Is there anything
that prevent us from using the C++ GEOS API ? Having it in the C API may
also benefit to other projects (PostGIS) ...
Or am I totally missing other problems ?
More information about the Qgis-developer
mailing list