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

Sandro Santilli strk at keybit.net
Wed Feb 19 22:36:29 PST 2014


On Wed, Feb 19, 2014 at 10:31:04PM +0530, Varun Saraf wrote:
> Hi,
> 
> You had earlier said that no changes in C++ interface is required. Consider
> this for an example. We want to create a precision model using the C-API
> using the following arguments [1] PrecisionModel (double newScale, double
> newOffsetX, double newOffsetY). Now the wrapper calls [2] GeometryFactory
> with these arguments but it has no constructor to accept them.

The wrapper will need to construct a PrecisionModel, and pass it to
GeometryFactory constructor by pointer.

Yes, the C++ interface is not that nice, but we don't want to mix changes
here and there, IMHO.

The current implementation always makes a copy of the PrecisionModel,
so you can use a temporary one. I should update the documentation.
Feel free to file a ticket for that on the osgeo trac instance.

--strk;


More information about the geos-devel mailing list