<div dir="ltr">Hi,<div><br></div><div>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.</div>

<div><br></div><div>Regards,</div><div>Varun Saraf</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 20, 2014 at 12:00 PM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Sean,<br>
<div class=""><br>
On Wed, Feb 19, 2014 at 11:15:18AM -0700, Sean Gillies wrote:<br>
<br>
> My Shapely project would benefit from this feature and I've written up its<br>
> requirements here: <a href="https://github.com/Toblerity/Shapely/issues/110" target="_blank">https://github.com/Toblerity/Shapely/issues/110</a>.<br>
> Briefly, I'd like to be able to pass a precision model reference into<br>
> initGEOS and create an appropriate geometry factory in the GEOS context.<br>
> And I'd like to be able to switch between precision models within a Python<br>
> program, so not adding any new state outside of the context struct would be<br>
> my preference.<br>
<br>
</div>I agree about making the precision model part of the context.<br>
But we can't change the initGEOS signature, so we'll need<br>
some GEOSContext_setPrecisionModel kind of method.<br>
At that point, we have to decide what happens with a previously<br>
set PrecisionModel, if it has to be allowed at all.<br>
<br>
Deleting the PrecisionModel and the GeometryFactory on finishGEOS<br>
is fine, but note that this would make any created geometry also<br>
broken (they hold a reference to the GeometryFactory that created<br>
them). Not a big deal, as long as it's clearely documented. Dunno<br>
if it would make sense for the opaque GEOSGeometry type to also<br>
hold a pointer to the context, just in case...<br>
<div class=""><br>
> Once a wiki page is created, I'll be happy to copy my requirements there.<br>
<br>
</div>I hope Varun will take action about the wiki :)<br>
<br>
--strk;<br>
<br>
</blockquote></div><br></div></div>