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

Varun Saraf varunsaraf14 at gmail.com
Thu Mar 6 03:53:43 PST 2014


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.

Regards,
Varun Saraf

On Thu, Feb 20, 2014 at 12:00 PM, Sandro Santilli <strk at keybit.net> wrote:

> Hi Sean,
>
> On Wed, Feb 19, 2014 at 11:15:18AM -0700, Sean Gillies wrote:
>
> > My Shapely project would benefit from this feature and I've written up
> its
> > requirements here: https://github.com/Toblerity/Shapely/issues/110.
> > Briefly, I'd like to be able to pass a precision model reference into
> > initGEOS and create an appropriate geometry factory in the GEOS context.
> > And I'd like to be able to switch between precision models within a
> Python
> > program, so not adding any new state outside of the context struct would
> be
> > my preference.
>
> 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...
>
> > Once a wiki page is created, I'll be happy to copy my requirements there.
>
> I hope Varun will take action about the wiki :)
>
> --strk;
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20140306/b7aae660/attachment.html>


More information about the geos-devel mailing list