[GRASSLIST:1338] Re: Fwd: Re: gdal problem

Keith J. Forbes listzemail at gmx.net
Tue Sep 23 09:02:09 EDT 2003


On Thursday 28 August 2003 04:20 pm, you wrote:
> Keith J. Forbes wrote:
> > I assume the fact that gdalinfo already works means that recompiling
> > grass --with-gdal will not help, right? For the record, I have never
> > before used the r.in.gdal module. I am sending this directly to you so
> > that I do not offend the sender of the email.
>
> Keith,
>
> If gdalinfo works, but r.in.gdal fails then one fairly likely possibility
> is that the problem is with the way that r.in.gdal calls libgdal.  The
> default mechanism is a manual loading of the shared library by the
> program code (my so called "bridging" approach).  This may well be
> broken now days and compiling --with-gdal will force r.in.gdal to actually
> link against libgdal directly avoiding a bunch of possible errors.
>
> So, Paul may well be right, and if so I would appreciate hearing about it.
> The other problem I saw but never completely verified was a user's whose
> location was corrupt in some way, and r.in.gdal would core dump quite
> early in the run.   If that is the issue, you might want to try starting
> a new location or something like that.
>
> By the way, since gdalinfo works, I would suggest you now try
> gdal_translate:
>
> gdal_translate /path/to/directory out.tif
>
> If that works then the problem is r.in.gdal specific for sure, and should
> be submitted via the GRASS bug system if you can't work around it. 
> Unfortunately, it also means it is substantially less likely that I will
> look into the problem since I don't have a working GRASS build at this
> time.
>
>
> Best regards,

Hi. i thought I would quickly summarize what my problem was and how it was 
solved so that others might benefit. Basically, when importing arc info grid 
(not ascii grid) files using r.in.gdal i got segmentation fault errors. gdal 
by itself worked fine on the grid files (I updated to GDAL 1.1.9.0, released 
2003/06/27, but not sure if the update was bnecessary to fix the segmentaion 
fault problem). The solution was to recompile grass5 linking directly with 
gdal as follows:

./configure --with-postgres-includes=/usr/local/pgsql/include/ --with-gdal 
--with-postgres-libs=/usr/local/pgsql/lib
(the postgres stuff is so grass5 links properly to postgres and has nothing to 
do with gdal)

Thanks to Frank W. and Paul, and everyone else who responded, and to the Grass 
developers and associated package developers for keeping this alive. Great 
work guys.

Best,
Keith



-- 
k|J|f




More information about the grass-user mailing list