Just for reference:<br>The gdal plugin files were scrubbed by the mail server.<br>Those looking to compile their own plugin may follow this route:<br><br>Just copy the following files from GDAL source directory and " ./configure && make && sudo make install " it.<br>
<br>How to make latest gdal-grass plugin.<br>Just copy 10 files given below from GDAL source files as given below: <br><br>grass57dataset.cpp <gdal_source>/frmts/grass<br>aclocal.m4 <gdal_source>/frmts/grass/pkg<br>
configure <gdal_source>/frmts/grass/pkg<br><a href="http://configure.in">configure.in</a> <gdal_source>/frmts/grass/pkg<br>Makefile.in <gdal_source>/frmts/grass/pkg<br>
README <gdal_source>/frmts/grass/pkg<br>ogrgrass.h <gdal_source>/ogr/ogrsf_frmts/grass<br>ogrgrassdatasource.cpp <gdal_source>/ogr/ogrsf_frmts/grass<br>ogrgrassdriver.cpp <gdal_source>/ogr/ogrsf_frmts/grass<br>
ogrgrasslayer.cpp <gdal_source>/ogr/ogrsf_frmts/grass<br><br><br><br>Basically all the files can be safely copied from the above two folders and the first file (grass57dataset.cpp) from ../frmts/grass folder.<br>
<br>The errors encountered during the process may be reported to the group for reference.<br><br>Thanks.<br><br><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 22, 2012 at 2:56 PM, <span dir="ltr"><<a href="mailto:grass-user-request@lists.osgeo.org" target="_blank">grass-user-request@lists.osgeo.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send grass-user mailing list submissions to<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:grass-user-request@lists.osgeo.org">grass-user-request@lists.osgeo.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:grass-user-owner@lists.osgeo.org">grass-user-owner@lists.osgeo.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of grass-user digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: How I can solve the problem like spectral correlation<br>
maping (Sitansu pattnaik)<br>
2. Re: error in g.extension (???)<br>
3. Finally got working GDAL stable v 1.9.2 GRASS v7.0 and their<br>
Plugin! (Pankaj Kr Sharma)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 22 Nov 2012 09:02:31 +0530<br>
From: Sitansu pattnaik <<a href="mailto:sitansu@gmail.com">sitansu@gmail.com</a>><br>
To: SWAPAN GHOSH <<a href="mailto:swap.ghsh@gmail.com">swap.ghsh@gmail.com</a>><br>
Cc: grass-user <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br>
Subject: Re: [GRASS-user] How I can solve the problem like spectral<br>
correlation maping<br>
Message-ID:<br>
<CAO92kOnj3Ldk-Hox0TBV4nhuVjvQWWi0+tTCujO+_c-tgq=<a href="mailto:Aiw@mail.gmail.com">Aiw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
<a href="http://grass.unibuc.ro/grass65/manuals/html65_user/r.regression.line.html" target="_blank">http://grass.unibuc.ro/grass65/manuals/html65_user/r.regression.line.html</a><br>
<br>
Regards,<br>
Sitansu<br>
<br>
On Nov 21, 2012 6:34 PM, "SWAPAN GHOSH" <<a href="mailto:swap.ghsh@gmail.com">swap.ghsh@gmail.com</a>> wrote:<br>
<br>
Dear sir,<br>
<br>
yes it means affine function coefficients for two spectral bands. Please<br>
give me suitable logic or command sequence so that I can build a single<br>
command for this problem. I am c/c++ developer, I have not much knowledge<br>
about GIS.<br>
<br>
Thanks,<br>
<br>
Swapan<br>
<br>
<br>
<br>
<br>
On Wed, Nov 21, 2012 at 5:51 PM, Yann Chemin <<a href="mailto:yann.chemin@gmail.com">yann.chemin@gmail.com</a>> wrote:<br>
><br>
> Do you mean findi...<br>
<br>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.osgeo.org/pipermail/grass-user/attachments/20121122/5af92c95/attachment-0001.html" target="_blank">http://lists.osgeo.org/pipermail/grass-user/attachments/20121122/5af92c95/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 22 Nov 2012 17:11:18 +0800 (GMT+08:00)<br>
From: ??? <<a href="mailto:dehuiw@gig.ac.cn">dehuiw@gig.ac.cn</a>><br>
To: "Nikos Alexandris" <<a href="mailto:nik@nikosalexandris.net">nik@nikosalexandris.net</a>><br>
Cc: <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
Subject: Re: [GRASS-user] error in g.extension<br>
Message-ID: <<a href="mailto:1cdbd01.5ee3.13b2762b4ca.Coremail.dehuiw@gig.ac.cn">1cdbd01.5ee3.13b2762b4ca.Coremail.dehuiw@gig.ac.cn</a>><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
Hi Nikos,<br>
My grasssvns(7,6.5,6.4) and grass-addons are all in /usr/local/ folders, so the compiling and installing command need the super user permission, if not, the installations will be failed. For example, I use the following command to install all the grass7-addons:<br>
cd /usr/local/grass-addons/grass7;sudo make MODULE_TOPDIR=/usr/local/grass-7.0.svn/<br>
Best regards,<br>
dehui<br>
<br>
?2012-11-21 15:56:15,???<<a href="mailto:dehuiw@gig.ac.cn">dehuiw@gig.ac.cn</a>>???<br>
> ???:<br>
><br>
> > If you only want to use this addon, then you just need to download the addon<br>
> > and run the command " sudo make MODULE_TOPDIR=/usr/local/grass-7.0.svn/" in<br>
> > the addon folder.<br>
><br>
> Dehui,<br>
><br>
> Of course I don't know how you have setup your operating systems environment<br>
> variables and other details. Yet, I would like point out (actually repeat)<br>
> that one shouldn't compile, e.g. use the make command, as a super-user.<br>
><br>
> Inside a directory whose permissions grant read and write access to a user,<br>
> the use of sudo is not/should not be required. Furthermore, I am not sure if<br>
> there are/will be other implications -- probably not. But still, it is not a<br>
> good practice.<br>
><br>
> The reason that sudo is required for the installation step, is of course<br>
> that the process itself copies files in "privileged" directories. Without<br>
> sudo the installation would fail.<br>
><br>
> However, in case you know why you use sudo while compiling, I kindly ask<br>
> you to share some details. I would like to know -- since I too was told, in<br>
> the past, that doing "sudo make" is not required (maybe not correct).<br>
><br>
> All the best, Nikos<br>
><br>
> [rest deleted]<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Thu, 22 Nov 2012 14:56:53 +0530<br>
From: Pankaj Kr Sharma <<a href="mailto:pkscwc@gmail.com">pkscwc@gmail.com</a>><br>
To: <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
Subject: [GRASS-user] Finally got working GDAL stable v 1.9.2 GRASS<br>
v7.0 and their Plugin!<br>
Message-ID:<br>
<CAM5_u0E8CJ0WH4biG-=<a href="mailto:Gnb_4M4Xu9yYmNtg_%2B5hoy%2BbpPoztzA@mail.gmail.com">Gnb_4M4Xu9yYmNtg_+5hoy+bpPoztzA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Installing GDAL and GRASS was the easier part.<br>
Just followed all the instructions posted on the wiki.<br>
<br>
Building the plugin required some effort.<br>
I resolved the errors cropping up during installation through crude methods.<br>
<br>
The plugin worked finally and got it tested also.<br>
<br>
The Long messages received during installation and the plugin files are<br>
also attached.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.osgeo.org/pipermail/grass-user/attachments/20121122/962ed30a/attachment.html" target="_blank">http://lists.osgeo.org/pipermail/grass-user/attachments/20121122/962ed30a/attachment.html</a>><br>
-------------- next part --------------<br>
---------------gdal-grass plugin begins ---------------------<br>
<br>
<br>
./configure \<br>
--prefix=/usr/local \<br>
--with-gdal=/usr/local/bin/gdal-config \<br>
--with-grass=/usr/local/grass-7.0.svn/ \<br>
--with-autoload="/usr/local/lib/gdalplugins/" \<br>
--with-ld-shared="g++ -shared"<br>
<br>
Here, I have used installation folder path instead of source path for GRASS.<br>
<br>
<br>
rdcgis2@rdcgis2-nswdc:/usr/gis/gdal-grass-plugin$ make<br>
g++ -Wall -fPIC -DUSE_CPL -DGRASS_GISBASE=\"/usr/local/grass-7.0.svn/\" -I/usr/local/include -I/usr/local/grass-7.0.svn//include -c -o grass57dataset.o grass57dataset.cpp<br>
grass57dataset.cpp:50:38: error: declaration of C function ?char* GPJ_grass_to_wkt(Key_Value*, Key_Value*, int, int)? conflicts with<br>
In file included from /usr/local/grass-7.0.svn//include/grass/gprojects.h:91:0,<br>
from grass57dataset.cpp:45:<br>
/usr/local/grass-7.0.svn//include/grass/defs/gprojects.h:17:7: error: previous declaration ?char* GPJ_grass_to_wkt(const Key_Value*, const Key_Value*, int, int)? here<br>
make: *** [grass57dataset.o] Error 1<br>
<br>
<br>
Done the correction<br>
<br>
char *GPJ_grass_to_wkt(const struct Key_Value *proj_info,<br>
const struct Key_Value *proj_units,<br>
int esri_style, int prettify);<br>
}<br>
<br>
Again , error<br>
<br>
rdcgis2@rdcgis2-nswdc:/usr/gis/gdal-grass-plugin$ make<br>
g++ -Wall -fPIC -DUSE_CPL -DGRASS_GISBASE=\"/usr/local/grass-7.0.svn/\" -I/usr/local/include -I/usr/local/grass-7.0.svn//include -c -o grass57dataset.o grass57dataset.cpp<br>
g++ -shared grass57dataset.o -L/usr/local/grass-7.0.svn//lib -lgrass_raster.7.0.svn -lgrass_gmath.7.0.svn -lgrass_gis.7.0.svn -lgrass_datetime.7.0.svn -lgrass_gproj.7.0.svn -lgrass_vector.7.0.svn -lgrass_dbmibase.7.0.svn -lgrass_dbmiclient.7.0.svn -lgrass_dgl.7.0.svn -lgrass_dig2.7.0.svn -lgrass_rtree.7.0.svn -lgrass_linkm.7.0.svn -lgrass_btree2.7.0.svn -lgrass_ccmath.7.0.svn -L/usr/local/lib -lgdal -o gdal_GRASS.so<br>
g++ -Wall -fPIC -DUSE_CPL -DGRASS_GISBASE=\"/usr/local/grass-7.0.svn/\" -I/usr/local/include -I/usr/local/grass-7.0.svn//include -c -o ogrgrassdriver.o ogrgrassdriver.cpp<br>
In file included from /usr/local/grass-7.0.svn//include/grass/vect/digit.h:3:0,<br>
from /usr/local/grass-7.0.svn//include/grass/vector.h:4,<br>
from ogrgrass.h:41,<br>
from ogrgrassdriver.cpp:30:<br>
/usr/local/grass-7.0.svn//include/grass/vect/dig_structs.h:34:22: fatal error: libpq-fe.h: No such file or directory<br>
compilation terminated.<br>
make: *** [ogrgrassdriver.o] Error 1<br>
<br>
<br>
corrected it with<br>
<br>
#ifdef HAVE_POSTGRES<br>
#include </usr/include/postgresql/libpq-fe.h><br>
#endif<br>
<br>
<br>
Again , error<br>
<br>
rdcgis2@rdcgis2-nswdc:/usr/gis/gdal-grass-plugin$ make<br>
g++ -Wall -fPIC -DUSE_CPL -DGRASS_GISBASE=\"/usr/local/grass-7.0.svn/\" -I/usr/local/include -I/usr/local/grass-7.0.svn//include -c -o ogrgrassdriver.o ogrgrassdriver.cpp<br>
g++ -Wall -fPIC -DUSE_CPL -DGRASS_GISBASE=\"/usr/local/grass-7.0.svn/\" -I/usr/local/include -I/usr/local/grass-7.0.svn//include -c -o ogrgrassdatasource.o ogrgrassdatasource.cpp<br>
ogrgrassdatasource.cpp: In member function ?int OGRGRASSDataSource::Open(const char*, int, int, int)?:<br>
ogrgrassdatasource.cpp:191:28: error: ?GV_FATAL_PRINT? was not declared in this scope<br>
ogrgrassdatasource.cpp:191:43: error: ?Vect_set_fatal_error? was not declared in this scope<br>
make: *** [ogrgrassdatasource.o] Error 1<br>
rdcgis2@rdcgis2-nswdc:/usr/gis/gdal-grass-plugin$<br>
<br>
corrected it with<br>
/* Vect_set_fatal_error ( GV_FATAL_PRINT ); // Print error and continue */<br>
<br>
<br>
And, my plugin completed the make stage successfully.<br>
<br>
Now, the sudo checkinstall time:<br>
<br>
<br>
Again , error<br>
<br>
========================= Installation results ===========================<br>
install -d /usr/local/lib/gdalplugins/<br>
cp gdal_GRASS.so /usr/local/lib/gdalplugins/<br>
cp ogr_GRASS.so /usr/local/lib/gdalplugins/<br>
test -d /usr/local/share/gdal/grass || mkdir /usr/local/share/gdal/grass<br>
test -d /usr/local/share/gdal/grass/etc || mkdir /usr/local/share/gdal/grass/etc<br>
cp /usr/local/grass-7.0.svn//etc/ellipse.table /usr/local/share/gdal/grass/etc<br>
cp: cannot stat `/usr/local/grass-7.0.svn//etc/ellipse.table': No such file or directory<br>
make: *** [install] Error 1<br>
<br>
**** Installation failed. Aborting package creation.<br>
<br>
Cleaning up...OK<br>
<br>
Bye.<br>
<br>
corrected it with<br>
<br>
sudo cp /usr/gis/grass_trunk/lib/gis/ellipse.table /usr/local/grass-7.0.svn/etc/ellipse.table<br>
<br>
Sudo Checkinstall again<br>
<br>
========================= Installation results ===========================<br>
install -d /usr/local/lib/gdalplugins/<br>
cp gdal_GRASS.so /usr/local/lib/gdalplugins/<br>
cp ogr_GRASS.so /usr/local/lib/gdalplugins/<br>
test -d /usr/local/share/gdal/grass || mkdir /usr/local/share/gdal/grass<br>
test -d /usr/local/share/gdal/grass/etc || mkdir /usr/local/share/gdal/grass/etc<br>
cp /usr/local/grass-7.0.svn//etc/ellipse.table /usr/local/share/gdal/grass/etc<br>
cp /usr/local/grass-7.0.svn//etc/datum.table /usr/local/grass-7.0.svn//etc/datumtransform.table /usr/local/share/gdal/grass/etc<br>
cp: cannot stat `/usr/local/grass-7.0.svn//etc/datum.table': No such file or directory<br>
cp: cannot stat `/usr/local/grass-7.0.svn//etc/datumtransform.table': No such file or directory<br>
make: *** [install] Error 1<br>
<br>
**** Installation failed. Aborting package creation.<br>
<br>
Restoring overwritten files from backup...OK<br>
<br>
Cleaning up...OK<br>
<br>
Bye.<br>
<br>
rdcgis2@rdcgis2-nswdc:/usr/gis/gdal-grass-plugin$<br>
<br>
<br>
corrected it with<br>
sudo cp /usr/gis/grass_trunk/lib/gis/datumtransform.table /usr/local/grass-7.0.svn/etc/datumtransform.table<br>
sudo cp /usr/gis/grass_trunk/lib/gis/datum.table /usr/local/grass-7.0.svn/etc/datum.table<br>
<br>
<br>
And it worked.<br>
<br>
Done. The new package has been installed and saved to<br>
<br>
/usr/gis/gdal-grass-plugin/gdal-grass_5-1_amd64.deb<br>
<br>
You can remove it from your system anytime using:<br>
<br>
dpkg -r gdal-grass<br>
<br>
<br>
Now , it is time to test:<br>
<br>
test 1<br>
<br>
rdcgis2@rdcgis2-nswdc:~$ gdal_translate --formats | grep -i grass<br>
GRASS (ro): GRASS Database Rasters (5.7+)<br>
GRASSASCIIGrid (rov): GRASS ASCII Grid<br>
rdcgis2@rdcgis2-nswdc:~$<br>
<br>
test 2<br>
<br>
ldd /usr/local/lib/gdalplugins/gdal_GRASS.so<br>
linux-vdso.so.1 => (0x00007fff30fee000)<br>
<a href="http://libgrass_raster.7.0.svn.so" target="_blank">libgrass_raster.7.0.svn.so</a> => /usr/local/grass-7.0.svn/lib/<a href="http://libgrass_raster.7.0.svn.so" target="_blank">libgrass_raster.7.0.svn.so</a> (0x00007f3443314000)<br>
.......................................................................<br>
.......................................................................<br>
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f3438371000)<br>
rdcgis2@rdcgis2-nswdc:~$<br>
<br>
<br>
test 3<br>
<br>
rdcgis2@rdcgis2-nswdc:~$ ldd /usr/local/lib/gdalplugins/ogr_GRASS.so<br>
linux-vdso.so.1 => (0x00007fffb2fbb000)<br>
<a href="http://libgrass_gis.7.0.svn.so" target="_blank">libgrass_gis.7.0.svn.so</a> => /usr/local/grass-7.0.svn/lib/<a href="http://libgrass_gis.7.0.svn.so" target="_blank">libgrass_gis.7.0.svn.so</a> (0x00007f858d980000)<br>
.......................................................................<br>
.......................................................................<br>
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f858784a000)<br>
libcrypto.so.1.0.0 => /lib/x86_6<br>
<br>
test 4<br>
<br>
rdcgis2@rdcgis2-nswdc:~$ gdalinfo /media/rdcgis2/disk2part3/rdcgis2/gisdata90m/no_nulls/cellhd/i90<br>
Warning 1: GRASS warning: GISBASE enviroment variable was not set, using:<br>
/usr/local/grass-7.0.svn/<br>
Driver: GRASS/GRASS Database Rasters (5.7+)<br>
Files: /media/rdcgis2/disk2part3/rdcgis2/gisdata90m/no_nulls/cellhd/i90<br>
Size is 42001, 42001<br>
Coordinate System is:<br>
GEOGCS["everest",<br>
DATUM["unknown",<br>
SPHEROID["Everest_1830_India",6377276.345,300.8017]],<br>
PRIMEM["Greenwich",0],<br>
UNIT["degree",0.0174532925199433]]<br>
Origin = (64.999583454444448,40.000416763611113)<br>
Pixel Size = (0.000833333333333,-0.000833333333333)<br>
Corner Coordinates:<br>
Upper Left ( 64.9995835, 40.0004168) ( 64d59'58.50"E, 40d 0' 1.50"N)<br>
Lower Left ( 64.9995835, 4.9995834) ( 64d59'58.50"E, 4d59'58.50"N)<br>
Upper Right ( 100.0004168, 40.0004168) (100d 0' 1.50"E, 40d 0' 1.50"N)<br>
Lower Right ( 100.0004168, 4.9995834) (100d 0' 1.50"E, 4d59'58.50"N)<br>
Center ( 82.5000001, 22.5000001) ( 82d30' 0.00"E, 22d30' 0.00"N)<br>
Band 1 Block=42001x1 Type=Int32, ColorInterp=Gray<br>
Min=-160.000 Max=8806.000<br>
NoData Value=-2147483648<br>
Metadata:<br>
COLOR_TABLE_RULES_COUNT=0<br>
rdcgis2@rdcgis2-nswdc:~$<br>
<br>
test 5<br>
<br>
rdcgis2@rdcgis2-nswdc:~$ ogrinfo -summary /media/rdcgis2/disk2part3/rdcgis2/find_sites/find_sites_vector/PERMANENT/vector/new1917_online/head<br>
Warning 1: GRASS warning: GISBASE enviroment variable was not set, using:<br>
/usr/local/grass-7.0.svn/<br>
DBMI-PostgreSQL driver error:<br>
Connection failed.<br>
fe_sendauth: no password supplied<br>
<br>
<br>
Warning 1: GRASS warning: Unable to open database <host=localhost,dbname=nswdc_gis> by driver <pg><br>
ERROR 1: Cannot open database pg by driver host=localhost,dbname=nswdc_gis, check if GISBASE enviroment variable is set, the driver is available and the database is accessible.<br>
INFO: Open of `/media/rdcgis2/disk2part3/rdcgis2/find_sites/find_sites_vector/PERMANENT/vector/new1917_online/head'<br>
using driver `GRASS' successful.<br>
1: new1917_online (Point)<br>
rdcgis2@rdcgis2-nswdc:~$<br>
<br>
<br>
<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: gdal-grass-plugin.tar.gz<br>
Type: application/x-gzip<br>
Size: 245760 bytes<br>
Desc: not available<br>
URL: <<a href="http://lists.osgeo.org/pipermail/grass-user/attachments/20121122/962ed30a/attachment.bin" target="_blank">http://lists.osgeo.org/pipermail/grass-user/attachments/20121122/962ed30a/attachment.bin</a>><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
<br>
<br>
End of grass-user Digest, Vol 79, Issue 37<br>
******************************************<br>
</blockquote></div><br></div>