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

Varun Saraf varunsaraf14 at gmail.com
Fri Mar 7 04:53:02 PST 2014


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.

Regards,
Varun Saraf

On Fri, Mar 7, 2014 at 1:46 PM, Sandro Santilli <strk at keybit.net> wrote:

> On Fri, Mar 07, 2014 at 12:54:19AM +0530, Varun Saraf wrote:
>
> > I have made a temporary proposal. Below is the link to the wiki page.
> >
> > http://trac.osgeo.org/geos/wiki/GSoC/CAPI_PrecisionModel
>
> You propose to expose a new "PrecisionModel" object, but not
> the exposure of a "GeometryFactory" ? Is that correct ?
>
> Did you understand the proposal of Sean Gillies ?
> He proposed to expose no new objects, but simply pretend the
> "PrecisionModel" parameters are really parameters of a "context".
>
> What problems do you see with that proposal ?
> Have you read the problems I individuated about that ?
> Can you think about solutions to them ?
>
> --strk;
>
> > On Thu, Mar 6, 2014 at 5:44 PM, Sandro Santilli <strk at keybit.net> wrote:
> >
> > > On Thu, Mar 06, 2014 at 05:23:43PM +0530, Varun Saraf wrote:
> > > > Hi,
> > > >
> > > > We either create the PrecisionModel and the GeometryFactory in the
> > > > GEOSContext_setPrecisionModel or pass a pointer to the
> > > > new PrecisionModel to this method. But the signature of
> > > initGEOS/initGEOS_r
> > > > cannot be changed so how to pass it to the initGEOS. Please clarify.
> > >
> > > Please make proposals.
> > > My proposal was in the mail you quoted, did you understand it ?
> > >
> > > --strk;
> > >
> > > > On Thu, Feb 20, 2014 at 12:00 PM, Sandro Santilli <strk at keybit.net>
> > > wrote:
> > > > >
> > > > > I agree about making the precision model part of the context.
> > > > > But we can't change the initGEOS signature, so we'll need
> > > > > some GEOSContext_setPrecisionModel kind of method.
> > > > > At that point, we have to decide what happens with a previously
> > > > > set PrecisionModel, if it has to be allowed at all.
> > > > >
> > > > > Deleting the PrecisionModel and the GeometryFactory on finishGEOS
> > > > > is fine, but note that this would make any created geometry also
> > > > > broken (they hold a reference to the GeometryFactory that created
> > > > > them). Not a big deal, as long as it's clearely documented. Dunno
> > > > > if it would make sense for the opaque GEOSGeometry type to also
> > > > > hold a pointer to the context, just in case...
> > > _______________________________________________
> > > geos-devel mailing list
> > > geos-devel at lists.osgeo.org
> > > http://lists.osgeo.org/mailman/listinfo/geos-devel
> > >
>
> > _______________________________________________
> > geos-devel mailing list
> > geos-devel at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/geos-devel
>
>
> --
>
>  ()  ASCII ribbon campaign  --  Keep it simple !
>  /\  http://strk.keybit.net/rants/ascii_mails.txt
> _______________________________________________
> 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/20140307/d18fc805/attachment.html>


More information about the geos-devel mailing list