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

Sandro Santilli strk at keybit.net
Fri Mar 7 05:22:29 PST 2014

On Fri, Mar 07, 2014 at 06:23:02PM +0530, Varun Saraf wrote:
> Hi,
> You had earlier pointed out that initGEOS signature cannot be changed so
> the PrecisionModel parameters cannot be the parameters of a context. So
> according Sean Gillies requirements, a default geometry factory will be
> created first and later the precision model can be changed. Something
> similar to this:
> handle->geomFactory = GeometryFactory ( const PrecisionModel * pm)
> Now coming to what happens to previously set PrecisionModel. If I am not
> wrong, a copy of the PrecisionModel is made, so deleting the previously set
> PrecisionModel should not make a problem.

That's correct, GeometryFactory copies the PrecisionModel to owned space.
The problem is more with the GeometryFactory itself, which is a pointer,
so before overriding geomFactory, the previously-set GeometryFactory will
need to be dealth with. How ?


More information about the geos-devel mailing list