Re: [GRASS-user] r.external across Windows and Linux
Blumentrath, Stefan wrote: Thanks for your reply. Here is a more detailed problem description: First I created a new and empty GRASS Location test on the network storage (NFS) from the Linux Server. This GRASS DB is mounted on LINUX (through mount.cifs) to `/home/stefan/R_raw_data/test'. On Windows the Network drive is mapped to R:\Raw_data\test Within this Location I crated a mapset linux (from the Linux Server) and a mapset windows from my Windows 7 workstation. 1st test case: Linux to Windows: On the Linux server, and in the linux mapset I did: r.external.out --verbose directory=/home/stefan/R_raw_data/test extension=.tif format=GTiff g.region -p n=1 s=0 e=1 w=0 res=0.1 r.mapcalc expression=linux_map=1 On my Win 7 box I did: d.rast map= linux_map @linux Here I got the following error message: Command 'd.rast map=linux_map@linux' failed Details: ERROR 4: `/home/stefan/R_raw_data/test/linux_map.tif' does not exist in the file system, and is not recognised as a supported dataset name. Then I tried relative paths: On Linux: r.external.out --verbose directory=../../ extension=.tif format=GTiff r.mapcalc expression=linux_map=1 --o Error message on Windows changes to: Command 'd.rast map=linux_map@linux' failed Details: ERROR 4: `/home/stefan/R_raw_data/test/newLocation/linux/../..//linux_map.tif' does not exist in the file system, and is not recognised as a supported dataset name. Okay, so the issue is the use of absolute paths which may be incorrect if the database is accessed via a networked filesystem (or even a local filesystem if the mount point changes). Currently, if the directory given to r.external.out is relative (doesn't begin with a /), it's converted to an absolute path relative to the current mapset directory. Thereafter, any created maps will have the absolute path in their GDAL link (i.e. the cell_misc/map/gdal file). Thus, maps created with r.external.out can't be read if the database directory has moved relative to its location when the map was created. Should I open a ticket in trac? Yes. We should at least support paths relative to the mapset, and may need additional options, e.g. the ability to use environment variables in paths). -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] GRASS 7 and gdal-grass-1.11.2 plugin
Hi, This has been discussed on the developers list. Have a look here: http://osgeo-org.1560.x6.nabble.com/GDAL-GRASS-plugin-1-11-2-tt5196087.html Cheers Stefan -Original Message- From: grass-user-boun...@lists.osgeo.org [mailto:grass-user-boun...@lists.osgeo.org] On Behalf Of John A Stevenson Sent: 21. april 2015 15:45 To: grass-user@lists.osgeo.org Subject: [GRASS-user] GRASS 7 and gdal-grass-1.11.2 plugin Hi, I'm trying to install the GDAL-GRASS 7 plugin in order to plot GRASS data in QGIS. I downloaded the source (http://download.osgeo.org/gdal/1.11.2/gdal-grass-1.11.2.tar.gz) and followed the instructions in the README. When I try to configure with the following command: ``` CFLAGS=-O2 -Wall LDFLAGS=-s ./configure \ --with-grass=/usr/lib/grass70 \ --with-gdal=/usr/bin/gdal-config ``` I get the following error: ``` checking for G_asprintf in -lgrass_gis... no checking for G_putenv in -lgrass_gis.7.0.svn... no configure: error: --with-grass=/usr/lib/grass70 requested, but libraries not found! Perhaps you need to set LD_LIBRARY_PATH to include /usr/lib/grass70/lib? ``` This is the same error as described in the gdal-grass README, but the workaround (creating grass.conf in /etc/ld.so.conf.d with /usr/lib/grass70/lib, then running sudo ldconfig) doesn't help. I have also tried patching the configure.in and Makefile.in source files using the patch from here: https://trac.osgeo.org/gdal/ticket/5852 without success. How can I point to compiler at the right place? *OS: Linux Mint 17, based on Ubuntu 14.04 (Trusty). *GRASS version : 7.0.0-1~exp2~trusty3 from ppa:ubuntugis/ubuntugis-unstable repository (installs to /usr/lib/grass70. Also installed grass-dev) *GDAL version: 1.11.1+dfsg-1~exp2~trusty from ppa:ubuntugis/ubuntugis-unstable repository (installs to /usr/bin) Thanks, John -- Dr John A Stevenson RSE/Scottish Government Personal Research Fellow (co-funded by Marie Curie Actions) School of GeoSciences The University of Edinburgh Grant Institute James Hutton Road Edinburgh EH9 3FE Scotland PHONE: (+44) 131 650 7526 FAX: (+44) 131 668 3184 email: john.steven...@ed.ac.uk twitter: @volcan01010 web: http://www.geos.ed.ac.uk/homes/jsteven5 blog: http://all-geo.org/volcan01010 **ICELAND MOBILE: (+354) 8417106** The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] GRASS 7 and gdal-grass-1.11.2 plugin
Hi, I'm trying to install the GDAL-GRASS 7 plugin in order to plot GRASS data in QGIS. I downloaded the source (http://download.osgeo.org/gdal/1.11.2/gdal-grass-1.11.2.tar.gz) and followed the instructions in the README. When I try to configure with the following command: ``` CFLAGS=-O2 -Wall LDFLAGS=-s ./configure \ --with-grass=/usr/lib/grass70 \ --with-gdal=/usr/bin/gdal-config ``` I get the following error: ``` checking for G_asprintf in -lgrass_gis... no checking for G_putenv in -lgrass_gis.7.0.svn... no configure: error: --with-grass=/usr/lib/grass70 requested, but libraries not found! Perhaps you need to set LD_LIBRARY_PATH to include /usr/lib/grass70/lib? ``` This is the same error as described in the gdal-grass README, but the workaround (creating grass.conf in /etc/ld.so.conf.d with /usr/lib/grass70/lib, then running sudo ldconfig) doesn't help. I have also tried patching the configure.in and Makefile.in source files using the patch from here: https://trac.osgeo.org/gdal/ticket/5852 without success. How can I point to compiler at the right place? *OS: Linux Mint 17, based on Ubuntu 14.04 (Trusty). *GRASS version : 7.0.0-1~exp2~trusty3 from ppa:ubuntugis/ubuntugis-unstable repository (installs to /usr/lib/grass70. Also installed grass-dev) *GDAL version: 1.11.1+dfsg-1~exp2~trusty from ppa:ubuntugis/ubuntugis-unstable repository (installs to /usr/bin) Thanks, John -- Dr John A Stevenson RSE/Scottish Government Personal Research Fellow (co-funded by Marie Curie Actions) School of GeoSciences The University of Edinburgh Grant Institute James Hutton Road Edinburgh EH9 3FE Scotland PHONE: (+44) 131 650 7526 FAX: (+44) 131 668 3184 email: john.steven...@ed.ac.uk twitter: @volcan01010 web: http://www.geos.ed.ac.uk/homes/jsteven5 blog: http://all-geo.org/volcan01010 **ICELAND MOBILE: (+354) 8417106** The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] GRASS 7 and gdal-grass-1.11.2 plugin
Hi Stefan, Thanks for the quick reply. Based on the discussion, I changed the entries in my configure file from 7.0.svn to 7.0.0. I also changed the paths in the Makefile to the proj tables and created a directory for the drivers. ``` sed -i 's/\.7\.0\.svn/\.7\.0\.0/g' configure sed -i 's/etc\/ellipse/etc\/proj\/ellipse/g' Makefile.in sed -i 's/etc\/datum/etc\/proj\/datum/g' Makefile.in sudo mkdir /usr/local/share/gdal CPPFLAGS=-I/usr/include/postgresql CFLAGS=-O2 -Wall LDFLAGS=-s ./configure \ --with-grass=/usr/lib/grass70 \ --with-gdal=/usr/bin/gdal-config make sudo make install ``` The plugin now compiles and installs cleanly, but gdal doesn't seem to be using it: # gdalinfo --formats | grep -i grass GRASSASCIIGrid (rov): GRASS ASCII Grid Do you know how I can make it use it, or how I can tell if it is even looking for it? Cheers John p.s. I had searched the developer list archives for gdal plugin, but that thread didn't appear. On 21/04/15 15:54, Blumentrath, Stefan wrote: Hi, This has been discussed on the developers list. Have a look here: http://osgeo-org.1560.x6.nabble.com/GDAL-GRASS-plugin-1-11-2-tt5196087.html Cheers Stefan -Original Message- From: grass-user-boun...@lists.osgeo.org [mailto:grass-user-boun...@lists.osgeo.org] On Behalf Of John A Stevenson Sent: 21. april 2015 15:45 To: grass-user@lists.osgeo.org Subject: [GRASS-user] GRASS 7 and gdal-grass-1.11.2 plugin Hi, I'm trying to install the GDAL-GRASS 7 plugin in order to plot GRASS data in QGIS. I downloaded the source (http://download.osgeo.org/gdal/1.11.2/gdal-grass-1.11.2.tar.gz) and followed the instructions in the README. When I try to configure with the following command: ``` CFLAGS=-O2 -Wall LDFLAGS=-s ./configure \ --with-grass=/usr/lib/grass70 \ --with-gdal=/usr/bin/gdal-config ``` I get the following error: ``` checking for G_asprintf in -lgrass_gis... no checking for G_putenv in -lgrass_gis.7.0.svn... no configure: error: --with-grass=/usr/lib/grass70 requested, but libraries not found! Perhaps you need to set LD_LIBRARY_PATH to include /usr/lib/grass70/lib? ``` This is the same error as described in the gdal-grass README, but the workaround (creating grass.conf in /etc/ld.so.conf.d with /usr/lib/grass70/lib, then running sudo ldconfig) doesn't help. I have also tried patching the configure.in and Makefile.in source files using the patch from here: https://trac.osgeo.org/gdal/ticket/5852 without success. How can I point to compiler at the right place? *OS: Linux Mint 17, based on Ubuntu 14.04 (Trusty). *GRASS version : 7.0.0-1~exp2~trusty3 from ppa:ubuntugis/ubuntugis-unstable repository (installs to /usr/lib/grass70. Also installed grass-dev) *GDAL version: 1.11.1+dfsg-1~exp2~trusty from ppa:ubuntugis/ubuntugis-unstable repository (installs to /usr/bin) Thanks, John -- Dr John A Stevenson RSE/Scottish Government Personal Research Fellow (co-funded by Marie Curie Actions) School of GeoSciences The University of Edinburgh Grant Institute James Hutton Road Edinburgh EH9 3FE Scotland PHONE: (+44) 131 650 7526 FAX: (+44) 131 668 3184 email: john.steven...@ed.ac.uk twitter: @volcan01010 web: http://www.geos.ed.ac.uk/homes/jsteven5 blog: http://all-geo.org/volcan01010 **ICELAND MOBILE: (+354) 8417106** The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Dr John A Stevenson RSE/Scottish Government Personal Research Fellow (co-funded by Marie Curie Actions) School of GeoSciences The University of Edinburgh Grant Institute James Hutton Road Edinburgh EH9 3FE Scotland PHONE: (+44) 131 650 7526 FAX: (+44) 131 668 3184 email: john.steven...@ed.ac.uk twitter: @volcan01010 web: http://www.geos.ed.ac.uk/homes/jsteven5 blog: http://all-geo.org/volcan01010 **ICELAND MOBILE: (+354) 8417106** The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] GRASS 7 and gdal-grass-1.11.2 plugin SOLVED
Hi Stefan, After compiling and installing as described before, I was able to point GDAL at the GRASS plugin by setting the following variable: export GDAL_DRIVER_PATH=/usr/lib/gdalplugins $ ogrinfo --formats | grep -i grass - GRASS (readonly) $ gdalinfo --formats | grep -i grass GRASS (ro): GRASS Database Rasters (5.7+) GRASSASCIIGrid (rov): GRASS ASCII Grid Launching QGIS from the command line then lets me use Add Raster Layer (from my location's cellhd folder) and Add Vector Layer (choosing Directory as the source type). Now I can view my GRASS 7 data in QGIS. Thanks, John Background info on following thread: http://trac.osgeo.org/gdal/ticket/ On 21/04/15 15:54, Blumentrath, Stefan wrote: Hi, This has been discussed on the developers list. Have a look here: http://osgeo-org.1560.x6.nabble.com/GDAL-GRASS-plugin-1-11-2-tt5196087.html Cheers Stefan -Original Message- From: grass-user-boun...@lists.osgeo.org [mailto:grass-user-boun...@lists.osgeo.org] On Behalf Of John A Stevenson Sent: 21. april 2015 15:45 To: grass-user@lists.osgeo.org Subject: [GRASS-user] GRASS 7 and gdal-grass-1.11.2 plugin Hi, I'm trying to install the GDAL-GRASS 7 plugin in order to plot GRASS data in QGIS. I downloaded the source (http://download.osgeo.org/gdal/1.11.2/gdal-grass-1.11.2.tar.gz) and followed the instructions in the README. When I try to configure with the following command: ``` CFLAGS=-O2 -Wall LDFLAGS=-s ./configure \ --with-grass=/usr/lib/grass70 \ --with-gdal=/usr/bin/gdal-config ``` I get the following error: ``` checking for G_asprintf in -lgrass_gis... no checking for G_putenv in -lgrass_gis.7.0.svn... no configure: error: --with-grass=/usr/lib/grass70 requested, but libraries not found! Perhaps you need to set LD_LIBRARY_PATH to include /usr/lib/grass70/lib? ``` This is the same error as described in the gdal-grass README, but the workaround (creating grass.conf in /etc/ld.so.conf.d with /usr/lib/grass70/lib, then running sudo ldconfig) doesn't help. I have also tried patching the configure.in and Makefile.in source files using the patch from here: https://trac.osgeo.org/gdal/ticket/5852 without success. How can I point to compiler at the right place? *OS: Linux Mint 17, based on Ubuntu 14.04 (Trusty). *GRASS version : 7.0.0-1~exp2~trusty3 from ppa:ubuntugis/ubuntugis-unstable repository (installs to /usr/lib/grass70. Also installed grass-dev) *GDAL version: 1.11.1+dfsg-1~exp2~trusty from ppa:ubuntugis/ubuntugis-unstable repository (installs to /usr/bin) Thanks, John -- Dr John A Stevenson RSE/Scottish Government Personal Research Fellow (co-funded by Marie Curie Actions) School of GeoSciences The University of Edinburgh Grant Institute James Hutton Road Edinburgh EH9 3FE Scotland PHONE: (+44) 131 650 7526 FAX: (+44) 131 668 3184 email: john.steven...@ed.ac.uk twitter: @volcan01010 web: http://www.geos.ed.ac.uk/homes/jsteven5 blog: http://all-geo.org/volcan01010 **ICELAND MOBILE: (+354) 8417106** The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Dr John A Stevenson RSE/Scottish Government Personal Research Fellow (co-funded by Marie Curie Actions) School of GeoSciences The University of Edinburgh Grant Institute James Hutton Road Edinburgh EH9 3FE Scotland PHONE: (+44) 131 650 7526 FAX: (+44) 131 668 3184 email: john.steven...@ed.ac.uk twitter: @volcan01010 web: http://www.geos.ed.ac.uk/homes/jsteven5 blog: http://all-geo.org/volcan01010 **ICELAND MOBILE: (+354) 8417106** The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user