[Qgis-developer] new dependency on GEOS C++ library

Sandro Santilli strk at keybit.net
Thu Oct 1 08:26:58 PDT 2015


On Thu, Oct 01, 2015 at 04:38:53PM +0200, Sandro Santilli wrote:
> On Thu, Oct 01, 2015 at 04:31:31PM +0200, Sandro Santilli wrote:
> > On Thu, Oct 01, 2015 at 02:17:15PM +0200, Sandro Santilli wrote:
> > 
> > > As known from the beginning, the challenge here is dealing with
> > > management of the many GeometryFactory objects that would result
> > > from the possibility of expressing them freely, and I start thinking
> > > there's no way out of this than adding refcounting to the
> > > GeometryFactory object so that it self-manages.
> > 
> > I've stubbed this mechanism here:
> > https://github.com/libgeos/libgeos/pull/52
> > 
> > Basically, once you don't need an explicit handle on your
> > GeometryFactory you can call its "autoDestroy()" method and
> > it will be destroyed once all the geometries referencing it
> > are also deleted.
> > 
> > Could be a key to what we're trying to do here.
> 
> Note that with such feature, there would only need to be a single
> new interface in the C-API, namely requesting reduction of the
> precision of a geometry and optional scaling of coordinates.
> There would be no need at all to expose PrecisionModel or
> GeometryFactory to the outside world. Internally, the C-API might
> still try to optimize the memory by re-using existing factories
> with the same PrecisionModel.
> 
> I guess this discussion would be better conducted on geos-dev
> though...

So while the discussion on geos-dev started, I'm thinking that
for GEOS you might prefer to have a solution that also works
with older GEOS version ? Note that doing that by keeping the
dependency on the C++ interface might be a puzzle for packagers
because every version of GEOS is intentionally marked as being
binary incompatible with the previous.

Would it make sense to just do the gridding internally (dropping
the geosc++ dep) for now and postpone the proper precision model
implementation to only be available with the newer GEOS release ?

The idea is to ship a 3.6 version of GEOS capable of the PrecisionModel
control before February.

--strk;


More information about the Qgis-developer mailing list