[Qgis-developer] Re: Fix for Identify Tool problem with SpatiaLite
William Kyngesburye
woklist at kyngchaos.com
Sun Mar 20 10:39:05 EDT 2011
On Mar 20, 2011, at 4:24 AM, a.furieri at lqt.it wrote:
> On Sat, 19 Mar 2011 17:51:01 -0500, William Kyngesburye wrote
>> But now there are also tests like:
>>
>> #ifndef OMIT_GEOS
>> # code for *including* GEOS support
>> #endif
>>
>>
>
> Hi William,
>
> all this makes a perfect sense, and fully
> explains the elusive "Identify tool" issue
> reported by Royce and Noli.
>
> Where declaring OMIT_GEOS SpatiaLite will then
> be built ignoring at all any GEOS-based function.
I undestand that. But, what I'm saying is that there are 2 inconsistent uses of OMIT_GEOS and OMIT_PROJ.
#ifndef OMIT_GEOS makes sense (this may have been a recent change or I may have just not noticed it because I found ...==0 first in the code). #if OMIT_GEOS == 0 is the one I've been using as a guide, and is more confusing to think about.
For #if OMIT_GEOS == 0 to work, I define OMIT_GEOS=0 (at least I had to do this in the past), which logically is the same as saying use GEOS. But now USE_GEOS is defined, even though it's the 0 that means use GEOS.
The way they are used in the spatialite code (same goes for OMIT_PROJ):
#if OMIT_GEOS == 0
#include <geos_c.h>
#endif
...
#ifndef OMIT_GEOS
define Spatialite GEOS functions
#endif
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects."
- the wisdom of Tarzan
More information about the Qgis-developer
mailing list