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

Varun Saraf varunsaraf14 at gmail.com
Mon Feb 17 06:59:53 PST 2014


On Mon, Feb 17, 2014 at 5:10 PM, Sandro Santilli <strk at keybit.net> wrote:

> On Mon, Feb 17, 2014 at 03:53:29PM +0530, Varun Saraf wrote:
> > Hi,
> >
> > I am not sure if I have understood the solution, but this is what I
> think.
> >
> > For exposing PrecisionModel through the C-API, we need to write a
> function
> > in the geos_ts_c.cpp file which takes the required arguments for the
> > precision model. It constructs a new GeometryFactory with appropriate
> > arguments which in turn calls PrecisionModel with those arguments.
>
> What needs to be done is really to be decided, and deciding that is
> part of the task. You should make an RFC document and sollicit comments
> from this mailing list until some kind of consensus is found, basically.
>
> Note that anything you construct in that function needs to have a way
> to be destroyed.


> > My doubt is what all arguments need to be passed to this C-API function
> and
> > is that what we are supposed to design. Also we will have to make
> > appropriate changes to the GeometryFactory constructor.
>
> I don't think any change in the 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. Or is it that GeometryFactory need not be called at all and the
wrapper directly calls existing PrecisionModel interface. Please clarify.

Regards,
Varun Saraf

[1] http://geos.osgeo.org/doxygen/classgeos_1_1geom_1_1PrecisionModel.html
[2] http://geos.osgeo.org/doxygen/classgeos_1_1geom_1_1GeometryFactory.html

>
> > Please tell me if I am in the right direction.
>
> Yes, I think you are.
>
> --strk;
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20140217/06c2f5e8/attachment.html>


More information about the geos-devel mailing list