[geos-devel] Second beta for ffi-geos extension now available

J Smith dark.panda+lists at gmail.com
Thu May 12 13:29:40 EDT 2011

On Thu, May 12, 2011 at 12:48 PM, Sandro Santilli <strk at keybit.net> wrote:
> On Thu, May 12, 2011 at 09:46:00AM -0700, Daniel Azuma wrote:
>> Just a little opinion on this, as I'm actually starting to use ffi-geos. If it is to be the de facto ruby binding for GEOS, it should expose the same flexibility that GEOS provides, including control over when and whether to produce a prepared geometry, so that clients that need that level of control can have it. A transparent implementation is very useful and could also be done, but it should be an optional API that can be turned on or off.
> So how do you like an explicit .prepare() on Geometry objects ?
> And maybe an .unprepare() to release memory associated with the preparation.

Perhaps a combination of the two -- I could leave the current
to_prepared method in there that produces concrete PreparedGeometry
instances for those that want them but also allow for a transparent
mechanism if multiple calls to comparison methods are detected. To
enable or disable the transparent mechanism, we could add additional
options to the comparison methods so you could call something like
geom_a.crosses?(geom_b, :prepared => false) or something to that
effect. For those that really, really don't want prepared geometries
to be used transparently we could add something like
Geos.(disable|enable)_prepared_geometries! with the default being to
use prepared.

Just spit-balling here. I'm open to suggestions.


More information about the geos-devel mailing list