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

Varun Saraf varunsaraf14 at gmail.com
Wed Feb 19 09:01:04 PST 2014


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. Or is it
that GeometryFactory need not be called at all and the wrapper directly
calls existing PrecisionModel interface. I was asking suggestions for this
doubt which might have been missed.

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


On Wed, Feb 19, 2014 at 9:23 PM, Sandro Santilli <strk at keybit.net> wrote:

> On Wed, Feb 19, 2014 at 07:51:48PM +0530, Varun Saraf wrote:
> > On Mon, Feb 17, 2014 at 8:29 PM, Varun Saraf <varunsaraf14 at gmail.com>
> wrote:
> >
> > > 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.
> > >
> > Any suggestions?
>
> About what ? Which args need to be passed to a C-API function ?
> Are you sure is a single C-API function ?
> Making a plan is part of the projet...
>
> --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/20140219/abba3d62/attachment.html>


More information about the geos-devel mailing list