[Qgis-developer] geos c api note

Marco Hugentobler marco.hugentobler at karto.baug.ethz.ch
Mon Aug 18 12:23:11 EDT 2008


Hi Jürgen and Martin,

There seem to be consensus to change to geos c-api. The question is only when.

I see the pros and cons for both. Personally, I'd prefer to do the change 
before 1.0 (so the risky way). Because we need to live with the public qgis 
interface of 1.0.0 for quite a while. 
Plugins and third party apps may appear that create/modify qgis geometry with 
passing a geos geometry. And those would need to change from geos c++  to c 
api too once the geometry refactoring is done in qgis 2.xx

Regards,
Marco

Am Sonntag 17 August 2008 19:30:47 schrieb Jürgen E. Fischer:
> Hi Martin,
>
> On Sun, 17. Aug 2008 at 21:20:12 +0530, Martin Dobias wrote:
> > Well, very recent library versions cause problems mostly for linux
> > users which usually use packages from distros and manual installation
> > of the libs discourages quite a lot
>
> IMHO the change we need isn't that important, it's probably just a
> sanity check and AFAIK there are other sanity checks missing.
>
> QGIS compiles fine with current GEOS.
>
> And we need to produce packages for all distributions anyway - is there
> a distribution that carries own qgis packages?  That could include GEOS.
>
> As it's just one more GEOS call, that probably won't break anything.
>
> Not ideal, but just a temporary workaround.
>
> > > > - may bring new bugs
> > >
> > > That's true for almost every change.
> >
> > Yes, so why to do this work just before the release?
>
> Because I wanted to package for OSGeo4W and use the dependencies there.
> They only ship the C-API.   Maybe bad timing, but IMHO a move in the
> right direction.
>
> > You're right. I'm aware of the issues. On windows we have to build
> > many deps by ourselves so building also geos is not such a problem.
> > The thing about c++ api not being recommended is really something that
> > we should avoid in long term. But doing it now just kills the
> > development effort I (and others) would like to give to enhance qgis.
>
> Hm, so we don't switch to the C-API while we still can with just little
> effort, but instead plan to introduce more and more dependencies to the
> C++-API, which we know we won't use in the long term and which makes the
> switch require more effort?
>
> Unless the C-API, which currently hides the different geometry classes
> in GEOS, is changed heavily, which I doubt will happen, inheriting from
> GEOS classes is IMHO a bad move.
>
> > > So I think we should target the C-API and extend it if necessary in
> > > cooperation with the geos folks.
> >
> > Indeed. However I would prefer the cooperation in way that first we
> > list what we need, they make the necessary changes and then we can
> > switch to C api.
>
> Why not work more closely with the GEOS folks and do the changes
> incrementally?
>
>
> Jürgen
>
> --
> Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-0
> Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
> Software Engineer         D-26506 Norden               http://www.norbit.de



-- 
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee


More information about the Qgis-developer mailing list