<div dir="ltr">On Mon, Mar 17, 2014 at 2:31 AM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Sun, Mar 16, 2014 at 12:24:19PM -0600, Sean Gillies wrote:<br>
> On Mar 12, 2014 6:46 AM, "Sandro Santilli" <<a href="mailto:strk@keybit.net">strk@keybit.net</a>> wrote:<br>
><br>
> > On Wed, Mar 12, 2014 at 06:16:00AM -0400, Paul Ramsey wrote:<br>
> > > I would tend to expect choosing a single precision model and working<br>
> > > with it for a long time to be a more common usage than swapping<br>
> > > between lots of models. My bias.<br>
> ><br>
> > I also find this to be a more likely usecase.<br>
><br>
</div><div class="">> While agree that one model at a time (and two at the most) is the most<br>
> likely use case, I'm concerned about designs that limit the number. I'm<br>
> also reversing myself on whether there should be a precision model in the<br>
> global context. I'd rather GEOS did not add more global state.<br>
><br>
> Please see the wiki page<br>
> <a href="http://trac.osgeo.org/geos/wiki/GSoC/CAPI_PrecisionModel" target="_blank">http://trac.osgeo.org/geos/wiki/GSoC/CAPI_PrecisionModel</a> for my (Shapely)<br>
> requirements.<br>
<br>
</div>So what would you think about "parking" a pointer to the client-owned<br>
GeometryFactory into the "context" right before calling the geometry<br>
creation functions ? Such "parking" method would return the old<br>
GeometryFactory, so that you can pass it back. You'd only own the<br>
GeometryFactory objects you'd have explicitly created.<br>
<br>
I'm talking about GeometryFactory rather than PrecisionModel because<br>
the object referenced  by geometries is really a GeometryFactory,<br>
not a PrecisionModel. A GeometryFactory also references a<br>
CoordinateSequenceFactory.<br></blockquote><div><br></div><div>Sounds practical. Geometry objects will have to park their factories before every operation, right? Offloading complexity to client code seems fair enough.<br>
<br></div><div>I've updated my wiki notes to refer to geometry factories instead of models.<br></div><br></div><br>-- <br>Sean Gillies
</div></div>