[R-sig-Geo] file format error with R and GRASS61

Kirk R. Wythers kwythers at umn.edu
Fri Jan 20 19:41:25 CET 2006


On Jan 20, 2006, at 12:13 PM, Scott Mitchell wrote:

>
> Great to hear that you got it working!

Thanks Scott. I appreciate your desire to get the solution  
documented. Here are the details...

>
> The procedure Roger was referring to for making everyone play  
> correctly is slightly different, however, assuming I'm interpreting  
> your message correctly.  So to make sure it's archived in the  
> mailing list, here's what I've gathered is now the way to go (same  
> idea for getting GRASS support fully functional in QGIS, by the way):
>
> - build and install GDAL WITHOUT GRASS support

gdal-1.3.1

./configure
	--mandir=/usr/local/share/man
	--without-python
	--with-threads
	--with-static-proj4=/usr/local
	--with-libtiff=/usr/local
	--with-geotiff=/usr/local
	--with-jpeg=/usr/local
	--with-gif=/usr/local
	--with-png=/usr/local
	--with-jasper=/usr/local
	--with-pg=/usr/local/pgsql/bin/pg_config
	--with-mysql=/usr/local/mysql/bin/mysql_config
	--with-netcdf=/Volumes/disk1/home1/kwythers/src/netcdf-3.6.0-p1
	--with-hdf4=/Volumes/disk1/home1/kwythers/src/HDF4.2r1/hdf4-darwin
	--with-ogdi=/usr/local
	--with-geos=/usr/local/bin/geos-config


> - build and install GRASS

grass-6.1.cvs

./configure\
     --enable-64bit\
     --enable-sysv\
     --with-includes=/usr/X11R6/include\
     --with-libs=/usr/X11R6/lib\
     --with-freetype\
     --with-tcltk-includes=/usr/X11R6/include\
     --with-tcltk-libs=/usr/X11R6/lib\
     --with-gdal=/usr/local/bin/gdal-config\
     --with-proj\
     --with-x\
     --with-cxx\
     --with-glw\
     --with-motif\
     --without-odbc\
     --enable-shared\
     --with-postgres-includes=/usr/local/pgsql/include\
     --with-postgres-libs=/usr/local/pgsql/lib\
     --with-mysql\
     --with-mysql-includes=/usr/local/mysql/include\
     --with-mysql-libs=/usr/local/mysql/lib\
     --with-freetype-includes=/usr/local/include/freetype2


> - download the separate gdal-grass plugin that is available at the  
> gdal site
> (as of this writing, that's http://www.gdal.org/dl/gdal- 
> grass-1.3.1.1.tar.gz )

In my case I just reconfigured and re-installed gdal-1.3.1 with:

./configure
	--mandir=/usr/local/share/man
	--without-python
	--with-threads
	--with-static-proj4=/usr/local
	--with-libtiff=/usr/local
	--with-geotiff=/usr/local
	--with-jpeg=/usr/local
	--with-gif=/usr/local
	--with-png=/usr/local
	--with-jasper=/usr/local
	--with-pg=/usr/local/pgsql/bin/pg_config
	--with-mysql=/usr/local/mysql/bin/mysql_config
	--with-netcdf=/Volumes/disk1/home1/kwythers/src/netcdf-3.6.0-p1
	--with-hdf4=/Volumes/disk1/home1/kwythers/src/HDF4.2r1/hdf4-darwin
	--with-ogdi=/usr/local
	--with-geos=/usr/local/bin/geos-config
	--with-grass=/usr/local/grass-6.1.cvs


> and compile that, and the make install process in that directory  
> will insert just
> the GRASS driver into your existing GDAL tree

Perhaps this approach would be more efficient. I assume that http:// 
www.gdal.org/dl/gdal-grass-1.3.1.1.tar.gz  does not rebuild and  
reinstall whole gdal application?

>
> Then GDAL called from 3rd applications, e.g. R or QGIS, should be  
> able to read GRASS rasters.
>
> I don't know/can't remember whether this essentially does the same  
> thing as what you did
> (i.e. I'm assuming you've recompiled the full GDAL after GRASS with  
> GRASS functionality turned on), or if there's a functional  
> difference.  In any case, it's simpler, and is designed
> to avoid circular dependency problems.

I agree your approach would be simpler. Although since have not had  
any trouble getting qgis builds to read grass vectors or rasters, it  
would seem that both approaches work.


>
> Cheers,
> Scott Mitchell
>
> ----
> Scott Mitchell, Assistant Professor, Carleton University
> Department of Geography & Environmental Studies, Loeb A209
> Mailing:  Loeb B349, 1125 Colonel By Dr., Ottawa, ON K1S 5B6 Canada
> 1-613-520-2600 x2695 Fax: 613-520-4301 Scott_Mitchell at carleton.ca
>
>




More information about the R-sig-Geo mailing list