[gdal-dev] autotest 1.6 errors - need help

William Kyngesburye woklist at kyngchaos.com
Wed Dec 3 21:09:16 EST 2008


The configured GRASS prefix is already compiled into the OGR GRASS  
driver as GRASS_GISBASE, why not do the same for the GDAL GRASS  
driver?  (I thought it was, but GRASS_GISBASE only turns up in  
ogrgrassdatasource.cpp).

On Dec 3, 2008, at 12:47 PM, Even Rouault wrote:

> William,
>
> thanks for your testing and reporting!
>
> I reproduced the issue myself and finally figured out the  
> solution... that I
> had myself forgotten after adding this test a few months ago.
>
> You have to define the GISBASE environment variable so that it  
> points to the
> root of your GRASS install. For example, in my case :
> GISBASE=/usr/local/grass-6.4.svn
>
> The related code in grass57dataset.cpp is :
>
>    if ( !getenv( "GISBASE" ) ) {
>        // we are outside a GRASS session
>        // TODO: use function instead of hardcoded path
>        sprintf(fake_gisbase, "GISBASE=/usr/local/share/gdal/grass/" );
>        putenv( fake_gisbase );
>        hasGisbase = false;
>    } else {
>        hasGisbase = true;
>    }
>
> The TODO comment would suggest that there's some way to get that  
> path...
>
> Anyway, I've added the above advice in case of the test fails in  
> trunk in
> r15894 and in branches/1.6 in r15896

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

[Trillian]  What are you supposed to do WITH a maniacally depressed  
robot?

[Marvin]  You think you have problems?  What are you supposed to do if  
you ARE a maniacally depressed robot?  No, don't try and answer, I'm  
50,000 times more intelligent than you and even I don't know the  
answer...

- HitchHiker's Guide to the Galaxy




More information about the gdal-dev mailing list