[geos-devel] Exposing PrecisionModel, GeometryPrecisionReducer in the C API
manisandro at gmail.com
Thu Oct 1 09:51:44 PDT 2015
On 01.10.2015 18:47, Sandro Santilli wrote:
> Cleaned up proposal. No copying, using 0 for FLOATING and returning
> previous precision.
> * Set the geometry's precision, optionally rounding all its
> * coordinates to the precision grid (if it changes).
> * @param gridSize size of the precision grid, or 0 for FLOATING
> * precision.
> * @param forceSnap specifies whether snapping to the precision grid
> * should be forced: -1 prevents snapping, which can
> * be used when the input is known to be already
> * rounded to the target grid; 0 only snaps if the
> * new precision grid is not equal or compatible with
> * the new precision grid; 1 always snaps.
> * @retuns -1 on exception, previous size of precision grid otherwise.
> extern int GEOS_DLL *GEOSGeom_setPrecision_r(
> GEOSContextHandle_t handle,
> GEOSGeometry *g,
> double gridSize, int forceSnap);
> I guess one might want a _getPrecision too...
I like the in-place approach. So as far as my needs go, this would be
perfectly adequate. (And about the generic GEOS_setPrecision, looks like
too much trouble).
More information about the geos-devel