Re: [GRASS-user] problems with i.rectify
Hi , just want to add that when I rectified the next image the same error appeared again - the first band in the group is not rectified as it is not found. I lured the programme now by adding an additional band from a similar image to the group and put it in first place , so that this band is not rectified/found but the three bands of my image are... regards, Martina Martina Schäfer skrev: Hi again! I installed GRASS 6.4 and first I got the same error. Then, I tried with defining a new group and subgroup in the XY mapset (not using the one that is created when importing) and with that it worked!! However, I also tried using wxpython, which looks neat, but there I get the error message that the group does not exist (but it certainly does). Best, Martina Markus Neteler skrev: hi Martina, On Thu, Apr 2, 2009 at 9:28 AM, Martina Schäfer martina.scha...@ebc.uu.se wrote: Hello Markus, thanks for the reply! And thanks for the tip on i.orto.photo, I will read through your article! I've followed the instructions and everything's working fine except that the red band is not included. In the output it says : Rectified input file NN1_2.red will be saved as NN1_2.red 1257 I see a suspicious white space before 1257. Where does it come from? Could it be that it crept in when defining the group? Well, the space was my fault and a typing mistake, it really says NN1_2.red1257, so no error there. ah ok, perfect. In the mapset there is a group/ directory in which the group is defined (ASCII file). The easiest way is to check there/fix if the red channel was defined properly. I looked in the group folder and found a file REF where all bands are properly named. Was that the file you meant? Yes, fine. The group is defined in the XY location. In the projected location it does not exist prior to rectifying. BTW: which GRASS version and which operating system? I'm using GRASS 6.3. downloaded from http://grass.bologna.enea.it/ on Mac OS X 10.5.6 I recall that we fixed some issues later. Could you upgrade to 6.4RC3 instead? http://grass.osgeo.org/download/index.php#g64x If it still fails we may be able to fix it for 6.4.0 final. best Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Error in sqlite3_step()
On 03/04/09 17:06, Craig Leat wrote: Moritz Lennert wrote: Don't have time to look into this now, but it must be a problem in the special sqlite implementation in that script: if [ $driver = sqlite ] ; then #echo Using special trick for SQLite # http://www.sqlite.org/faq.html#q13 v.info --q -c map=$GIS_OPT_MAP layer=$GIS_OPT_LAYER | cut -d'|' -f1,2 | grep -v |${col}$ $TMP.coldesc # need to revert order: cat $TMP.coldesc | cut -d'|' -f1 $TMP.coltypes cat $TMP.coldesc | cut -d'|' -f2 $TMP.colnames COLDEF=`paste -d' ' $TMP.colnames $TMP.coltypes | tr '\n' ',' | sed 's+,$++g'` COLNAMES=`cat $TMP.colnames | tr '\n' ',' | sed 's+,$++g'` echo BEGIN TRANSACTION; CREATE TEMPORARY TABLE ${table}_backup(${COLDEF}); INSERT INTO ${table}_backup SELECT ${COLNAMES} FROM ${table}; DROP TABLE ${table}; CREATE TABLE ${table}(${COLDEF}); INSERT INTO ${table} SELECT ${COLNAMES} FROM ${table}_backup; DROP TABLE ${table}_backup; COMMIT; $TMP db.execute input=$TMP My execute statement looks like this: BEGIN TRANSACTION; CREATE TEMPORARY TABLE SBC2_backup(cat INTEGER,LM CHARACTER,WARD INTEGER,CLASS_NAME CHARACTER); INSERT INTO SBC2_backup SELECT cat,LM,WARD,CLASS_NAME FROM SBC2; DROP TABLE SBC2; CREATE TABLE SBC2(cat INTEGER,LM CHARACTER,WARD INTEGER,CLASS_NAME CHARACTER); INSERT INTO SBC2 SELECT cat,LM,WARD,CLASS_NAME FROM SBC2_backup; DROP TABLE SBC2_backup; COMMIT; Why does v.db.dropcol define a type CHARACTER when sqlite3 supports (NULL, INTEGER, REAL, TEXT, BLOB)? v.db.dropcol just uses the output of v.info -c, and AFAIR, SBC2 has its columns defined as CHARACTER, or ? Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Error in sqlite3_step()
On 06/04/09 11:41, Moritz Lennert wrote: On 03/04/09 17:06, Craig Leat wrote: Moritz Lennert wrote: Don't have time to look into this now, but it must be a problem in the special sqlite implementation in that script: if [ $driver = sqlite ] ; then #echo Using special trick for SQLite # http://www.sqlite.org/faq.html#q13 v.info --q -c map=$GIS_OPT_MAP layer=$GIS_OPT_LAYER | cut -d'|' -f1,2 | grep -v |${col}$ $TMP.coldesc # need to revert order: cat $TMP.coldesc | cut -d'|' -f1 $TMP.coltypes cat $TMP.coldesc | cut -d'|' -f2 $TMP.colnames COLDEF=`paste -d' ' $TMP.colnames $TMP.coltypes | tr '\n' ',' | sed 's+,$++g'` COLNAMES=`cat $TMP.colnames | tr '\n' ',' | sed 's+,$++g'` echo BEGIN TRANSACTION; CREATE TEMPORARY TABLE ${table}_backup(${COLDEF}); INSERT INTO ${table}_backup SELECT ${COLNAMES} FROM ${table}; DROP TABLE ${table}; CREATE TABLE ${table}(${COLDEF}); INSERT INTO ${table} SELECT ${COLNAMES} FROM ${table}_backup; DROP TABLE ${table}_backup; COMMIT; $TMP db.execute input=$TMP My execute statement looks like this: BEGIN TRANSACTION; CREATE TEMPORARY TABLE SBC2_backup(cat INTEGER,LM CHARACTER,WARD INTEGER,CLASS_NAME CHARACTER); INSERT INTO SBC2_backup SELECT cat,LM,WARD,CLASS_NAME FROM SBC2; DROP TABLE SBC2; CREATE TABLE SBC2(cat INTEGER,LM CHARACTER,WARD INTEGER,CLASS_NAME CHARACTER); INSERT INTO SBC2 SELECT cat,LM,WARD,CLASS_NAME FROM SBC2_backup; DROP TABLE SBC2_backup; COMMIT; Why does v.db.dropcol define a type CHARACTER when sqlite3 supports (NULL, INTEGER, REAL, TEXT, BLOB)? v.db.dropcol just uses the output of v.info -c, and AFAIR, SBC2 has its columns defined as CHARACTER, or ? See also this thread: http://lists.osgeo.org/pipermail/grass-user/2009-January/048281.html Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] error on scripting
Dear All, I wrote a script that reads each day 48 hdf5 files and depicts their content on a raster. the script structure is the following: read file 1 open grass depict raster 1 exit grass read file 2 open grass depict raster 2 exit grass and so on Everything seems to work fine, but sometimes (randomly) the raster is not generated and the following error appears: mkdir: cannot create directory `/tmp/grass6-user.limia-17212': File exists Cannot create temporary directory! Exiting. (Note: user.limia is the username I use to access my pc) How can I solve this problem?? I guess it's something dealing with GRASS... Thank you very much -- Alberto Pettazzi MeteoGalicia - Departamento de Climatología y Observación Consellería de Medio Ambiente e Desenvolvemento Sostible Rúa de Roma, 6 15707 Santiago de Compostela. A Coruña Teléfono: +34-881-999646 e-mail: alberto.petta...@meteogalicia.es mailto:alberto.petta...@meteogalicia.es ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Grass and Postgre limitation (if any)
On 05/04/09 19:10, Jarek Jasiewicz wrote: Hi I have short question. I'm prepraring to create huge dataset, where data for different regions will be stored in different mapset but with the same structure of data (names of files and so on). The number of planned mapset is about 200-230, with about 10 postgreeSQL tables in every mapset. IT gives about 2000-2300 tables in one database. Tables will be use datatypes unique for postgreeSQL contribs so different databes solution cannot be used. The question is is some of the numbers above are not close to these program limitation (i.e number of mapset) or number of tables I'm not sure for GRASS, but I think that in both cases the limits will be mostly defined by your OS (i.e. max number of sub-directories or max number of files), and not by the program. You can try it out in a test location, loopping through g.mapset -c commands to see whether you reach a limit at one point. Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] displaying many thematic maps from one vector dataset
On 04/04/09 01:13, Vishal Mehta wrote: A couple of strange behaviors with a test vector dataset whose columns are population projections every 5 years: I ran the following script below but: 1. I see it working ok on the x0 monitor; but the output png files are all blank.. 2. and i get messages while the script is running that include 'segmentation fault' but not on EVERY iteration of the loop.. I've seen this problem before, but not with fixed class breaks, but was not able to find its cause. The fact that you see it as well with fixed class breaks is already an interesting information that should help find out what is wrong. Note that this module has seen _very_ little testing up to now (if not none except mine). And so you say that this only happens with PNG output (are you using d.mon PNG ?), but not on the x-monitors ? Moritz -script--- #!/bin/bash #generate 5yr interval thematic pngs of low series PPIC population projectiosn yr=2010 while [ $yr -lt 2105 ] ; do #actions here echo yr is $yr d.thematic.area map=CountyPop column=pc$yr breaks=20,40,60 colors=cyan,blue,yellow,red d.out.file output=pop$yr format=png # yr=$((yr+5)) done messages while running above script- --- yr is 2020 Segmentation fault Saving display from Monitor: [x0] to pop2020.png. Image size [640 x 480] Screen export complete. (writing the file may take a small amount of time) Image crop [523 x 480] Done. yr is 2025 Segmentation fault Saving display from Monitor: [x0] to pop2025.png. Image size [640 x 480] Screen export complete. (writing the file may take a small amount of time) Image crop [523 x 480] Done. yr is 2030 Segmentation fault Saving display from Monitor: [x0] to pop2030.png. Image size [640 x 480] Screen export complete. (writing the file may take a small amount of time) Image crop [523 x 480] Done. yr is 2035 Saving display from Monitor: [x0] to pop2035.png. Image size [640 x 480] Screen export complete. (writing the file may take a small amount of time) Image crop [523 x 480] Done. yr is 2040 Saving display from Monitor: [x0] to pop2040.png. Image size [640 x 480] Screen export complete. (writing the file may take a small amount of time) Image crop [523 x 480] Done. yr is 2045 Saving display from Monitor: [x0] to pop2045.png. Image size [640 x 480] Screen export complete. (writing the file may take a small amount of time) Image crop [523 x 480] Done. -- On Thu, Apr 2, 2009 at 11:54 PM, Moritz Lennert mlenn...@club.worldonline.be mailto:mlenn...@club.worldonline.be wrote: On 03/04/09 00:23, Vishal Mehta wrote: Hello all, I am better at GRASS raster capabilities than with GRASS vector handling, so I am writing to get your help. What I want to do is this: 1. I will have one vector dataset of watersheds. Each record is a polygon, an individual watershed. There are, apart from the usual cat fields, 52 attribute columns. Each attribute column is modeled weekly snow depth. 2. I need to automate the display and export to png of 52 thematic images - one for each week/column - keeping the color scheme constant throughout. Then all of the images will be packaged into a kml animation. I know how to do the above starting from a stack of GRASS rasters, but am not quickly getting a handle on displaying GRASS vectors consistently. I've tried d.vect and d.vect.thematic. I havent tried d.thematic.area yet. The main issues are that I dont know: - how to assign a constant color scheme to each map (that spans the min and max of all columns); i guess i was looking for something as simple as setting color rules like with raster data. If you want constant class breaks, i.e. the same class number and amplitudes linked to the same colors, then you can just manually provide breaks and colors in d.thematic.area. - how to refer to each attribute column by column number in a loop (d.vect.thematic and d.thematic.area seem to need column name as attribute) (assuming you are in a *nix environment with a shell): for col in `v.info http://v.info -c MapName`; do d.thematic.area column=$col; done (note the backticks around the v.info http://v.info command)) Moritz -- Vishal K. Mehta, PhD Scientist Stockholm Environment Institute - US 133 D St Suite F Davis CA 95616 www.sei-us.org http://www.sei-us.org ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Error in sqlite3_step()
Yeah. I have recently noticed this type of behavior after switching to sqlite. I was unable to patch two vectors (and att tables) after defining new columns of type varchar(20). I re-made the columns as 'text' and v.patch worked as expected. Maybe we need some special, internal conversions (varchar --- text) when working with sqlite db. Cheers, Dylan On Mon, Apr 6, 2009 at 2:58 AM, Moritz Lennert mlenn...@club.worldonline.be wrote: On 06/04/09 11:41, Moritz Lennert wrote: On 03/04/09 17:06, Craig Leat wrote: Moritz Lennert wrote: Don't have time to look into this now, but it must be a problem in the special sqlite implementation in that script: if [ $driver = sqlite ] ; then #echo Using special trick for SQLite # http://www.sqlite.org/faq.html#q13 v.info --q -c map=$GIS_OPT_MAP layer=$GIS_OPT_LAYER | cut -d'|' -f1,2 | grep -v |${col}$ $TMP.coldesc # need to revert order: cat $TMP.coldesc | cut -d'|' -f1 $TMP.coltypes cat $TMP.coldesc | cut -d'|' -f2 $TMP.colnames COLDEF=`paste -d' ' $TMP.colnames $TMP.coltypes | tr '\n' ',' | sed 's+,$++g'` COLNAMES=`cat $TMP.colnames | tr '\n' ',' | sed 's+,$++g'` echo BEGIN TRANSACTION; CREATE TEMPORARY TABLE ${table}_backup(${COLDEF}); INSERT INTO ${table}_backup SELECT ${COLNAMES} FROM ${table}; DROP TABLE ${table}; CREATE TABLE ${table}(${COLDEF}); INSERT INTO ${table} SELECT ${COLNAMES} FROM ${table}_backup; DROP TABLE ${table}_backup; COMMIT; $TMP db.execute input=$TMP My execute statement looks like this: BEGIN TRANSACTION; CREATE TEMPORARY TABLE SBC2_backup(cat INTEGER,LM CHARACTER,WARD INTEGER,CLASS_NAME CHARACTER); INSERT INTO SBC2_backup SELECT cat,LM,WARD,CLASS_NAME FROM SBC2; DROP TABLE SBC2; CREATE TABLE SBC2(cat INTEGER,LM CHARACTER,WARD INTEGER,CLASS_NAME CHARACTER); INSERT INTO SBC2 SELECT cat,LM,WARD,CLASS_NAME FROM SBC2_backup; DROP TABLE SBC2_backup; COMMIT; Why does v.db.dropcol define a type CHARACTER when sqlite3 supports (NULL, INTEGER, REAL, TEXT, BLOB)? v.db.dropcol just uses the output of v.info -c, and AFAIR, SBC2 has its columns defined as CHARACTER, or ? See also this thread: http://lists.osgeo.org/pipermail/grass-user/2009-January/048281.html Moritz ___ 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
Re: [GRASS-user] Grass and Postgre limitation (if any)
I still don't know about the limit but I reached the number of 1000 for mapsets and 1 for tables which is enaugh for me Thanks for useful hint Jarek Moritz Lennert pisze: On 05/04/09 19:10, Jarek Jasiewicz wrote: Hi I have short question. I'm prepraring to create huge dataset, where data for different regions will be stored in different mapset but with the same structure of data (names of files and so on). The number of planned mapset is about 200-230, with about 10 postgreeSQL tables in every mapset. IT gives about 2000-2300 tables in one database. Tables will be use datatypes unique for postgreeSQL contribs so different databes solution cannot be used. The question is is some of the numbers above are not close to these program limitation (i.e number of mapset) or number of tables I'm not sure for GRASS, but I think that in both cases the limits will be mostly defined by your OS (i.e. max number of sub-directories or max number of files), and not by the program. You can try it out in a test location, loopping through g.mapset -c commands to see whether you reach a limit at one point. Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Error in sqlite3_step()
Dylan: Yeah. I have recently noticed this type of behavior after switching to sqlite. I was unable to patch two vectors (and att tables) after defining new columns of type varchar(20). I re-made the columns as 'text' and v.patch worked as expected. Maybe we need some special, internal conversions (varchar --- text) when working with sqlite db. v.info -c SBC2 Displaying column types/names for database connection of layer 1: INTEGER|cat INTEGER|WARD TEXT|LM TEXT|CLASS_NAME db.describe -c table=SBC2 driver=sqlite database=/home/craig/GIS/grassdata/uMDM_ll/craig/sqlite.db ncols: 4 nrows: 7961 Column 1: cat:INTEGER:20 Column 2: WARD:INTEGER:20 Column 3: LM:TEXT:1000 Column 4: CLASS_NAME:TEXT:1000 v.info -c SBC1 Displaying column types/names for database connection of layer 1: INTEGER|cat INTEGER|WARD TEXT|LM TEXT|CLASS_NAME db.describe -c table=SBC1 driver=sqlite database=/home/craig/GIS/grassdata/uMDM_ll/craig/sqlite.db ncols: 4 nrows: 197842 Column 1: cat:INTEGER:20 Column 2: WARD:INTEGER:20 Column 3: LM:TEXT:1000 Column 4: CLASS_NAME:TEXT:1000 Ps. I didn't specify the lengths of columns 3 and 4. 1000 must be the default length for text. v.patch -e in=SBC1,SBC2 out=SBC_test Patching vector map s...@craig... DBMI-SQLite driver error: Error in sqlite3_step(): SQL logic error or missing database ERROR: Cannot insert new record: 'insert into SBC_test values ( 64510, 37, 'The Msunduzi', 'Dwelling')' So GRASS (6.5 r35892) rejects both CHARACTER:1 (see earlier in the thread) and TEXT:1000. Let's try with debugging on: g.gisenv set=DEBUG=3 v.patch -e in=SBC1,SBC2 out=SBC_test2 ... D3/3: fetch row = 64506 D3/3: col 0, litetype 1, sqltype 3: val = '64508' D3/3: col 1, litetype 1, sqltype 3: val = '3' D3/3: col 2, litetype 3, sqltype 13: val = 'Mkhambathini' D3/3: col 3, litetype 3, sqltype 13: val = 'Dwelling' D3/3: Row fetched D2/3: SQL: insert into SBC_test2 values ( 64509, 3, 'Mkhambathini', 'Dwelling') D3/3: execute: insert into SBC_test2 values ( 64509, 3, 'Mkhambathini', 'Dwelling') D3/3: fetch row = 64507 D3/3: col 0, litetype 1, sqltype 3: val = '64509' D3/3: col 1, litetype 1, sqltype 3: val = '37' D3/3: col 2, litetype 3, sqltype 13: val = 'The Msunduzi' D3/3: col 3, litetype 3, sqltype 13: val = 'Dwelling' D3/3: Row fetched D2/3: SQL: insert into SBC_test2 values ( 64510, 37, 'The Msunduzi', 'Dwelling') D3/3: execute: insert into SBC_test2 values ( 64510, 37, 'The Msunduzi', 'Dwelling') DBMI-SQLite driver error: Error in sqlite3_step(): SQL logic error or missing database D2/3: G__home home = /home/craig ERROR: Cannot insert new record: 'insert into SBC_test2 values ( 64510, 37, 'The Msunduzi', 'Dwelling')' Might the space in 'The Msunduzi' cause the problem? db.describe -c table=test driver=sqlite database=/home/craig/GIS/grassdata/uMDM_ll/craig/sqlite.db ncols: 4 nrows: 7963 Column 1: cat:INTEGER:20 Column 2: WARD:INTEGER:20 Column 3: LM:TEXT:1000 Column 4: CLASS_NAME:TEXT:1000 echo INSERT INTO test (cat,WARD,LM,CLASS_NAME) values (8000,1,'test phrase','test') | db.execute v.db.select test | tail 7953|26|The Msunduzi|Dwelling 7954|19|The Msunduzi|Dwelling 7955|1|Mpofana|Dwelling 7956|1|Mpofana|Dwelling 7957|1|Mpofana|Dwelling 7958|1|Mpofana|Dwelling 7959|1|Mpofana|Dwelling 7960|1|Mpofana|Dwelling 7961|1|Mpofana|Dwelling 8000|1|test phrase|test So the above db.execute command worked. This also works: echo insert into test values ( 8002, 37, 'The Msunduzi', 'Dwelling') | db.execute BTW the same error message is given if I try to insert into a cat that's already used. I checked SBC1 around cat 64510 and didn't see any duplicate cats. Any more ideas from anyone? Craig ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] errors in r.drain (develbranch)
Hello all, after a full SVN of develbranch, I'm getting errors in r.drain: - Errors in: /home/guano/pessoal/tmp_install/gis/grass6_devel/raster/r.drain -- In case of errors please change into the directory with error and run 'make'. If you get multiple errors, you need to deal with them in the order they appear in the error log. If you get an error building a library, you will also get errors from anything which uses the library. -- Finished compilation: Mon Apr 6 14:10:58 BRT 2009 make: *** [default] Error 1 guano[grass6_devel]$ cd raster/r.drain/ guano[r.drain]$ make gcc -I/home/guano/pessoal/tmp_install/gis/grass6_devel/dist.i686-pc-linux-gnu/include -mt une=nocona -minline-all-stringops -O2 -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/gdal -DPACKAGE=\grassmods\ -I/home/guano/pessoal/tmp_install/gis/grass6_devel/dist.i686 -pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c: In function ‘main’: main.c:174: warning: format not a string literal and no format arguments main.c:178: warning: format not a string literal and no format arguments main.c:183: warning: format not a string literal and no format arguments main.c:204: warning: format not a string literal and no format arguments main.c:228: warning: format not a string literal and no format arguments main.c:242: warning: the address of ‘vect’ will always evaluate as ‘true’ main.c:251: warning: format not a string literal and no format arguments main.c:270: warning: format not a string literal and no format arguments main.c:291: warning: format not a string literal and no format arguments main.c:311: warning: format not a string literal and no format arguments main.c:323: warning: format not a string literal and no format arguments main.c:398: warning: format not a string literal and no format arguments main.c:103: warning: unused variable ‘vect_mapset’ main.c:379: warning: ignoring return value of ‘write’, declared with attribute warn_unused _result main.c:391: warning: ignoring return value of ‘write’, declared with attribute warn_unused _result main.c:497: warning: ignoring return value of ‘read’, declared with attribute warn_unused_ result main.c: In function ‘drain’: main.c:611: warning: ignoring return value of ‘read’, declared with attribute warn_unused_ result main.c: In function ‘drain_cost’: main.c:664: warning: unused variable ‘col’ main.c:664: warning: unused variable ‘row’ main.c:681: warning: ignoring return value of ‘read’, declared with attribute warn_unused_ result main.c: In function ‘main’: main.c:73: warning: ‘dir_mapset’ may be used uninitialized in this function main.c:84: warning: ‘dir_buf’ may be used uninitialized in this function main.c:74: warning: ‘tempfile3’ may be used uninitialized in this function main.c:66: warning: ‘dir_fd’ may be used uninitialized in this function In function ‘open’, inlined from ‘main’ at main.c:387: /usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribut e error: open with O_CREAT in second argument needs 3 arguments make: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1 guano[r.drain]$ any hints appreciated :) Carlos -- Carlos Henrique Grohmann - Geologist D.Sc. a.k.a. Guano - Linux User #89721 ResearcherID: A-9030-2008 carlos dot grohmann at gmail dot com http://www.igc.usp.br/pessoais/guano/ _ Good morning, doctors. I have taken the liberty of removing Windows 95 from my hard drive. --The winning entry in a What were HAL's first words contest judged by 2001: A SPACE ODYSSEY creator Arthur C. Clarke Can’t stop the signal. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] link image or application in DB sqlite
Hi to everyone. I have a vector of points and I want to connect each point to a photo and a link (to open a photo or a web page with the browser firefox). I have the attributes in SQLite. With sqlite manager I added a column 'image' of type blob. I uploaded an image but does not work. When I use the identifier ..: GRASS 6.5.svn (32633):/home/gab/GRASSDATA WARNING: SQLite driver: unable to parse decltype: BLOB WARNING: SQLite driver: unable to parse decltype: BLOB WARNING: SQLite driver: column 'image', SQLite type 4 is not supported WARNING: SQLite driver: unable to parse decltype: BLOB Alternatively, I tried to do a field by putting the path of the images but I do not know if the identifier can open the image. I should get it to work with QGIS. In addition, it also works on windows XP?Otherwise I can use a virtual machine. Help / suggestions? Thanks Gabriele PS Grass 65 ubuntu 8.10 -- View this message in context: http://n2.nabble.com/link-image-or-application-in-DB-sqlite-tp2594524p2594524.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] azimuth of lines with v.to.db?
Hello. I did a full up of my develbranch but couldn't use the azimuth option: v.to.db map=lineamentos type=line option=azimuth units=degrees columns=azimute ERROR: value azimuth out of range for parameter option Legal range: cat,area,compact,fd,perimeter,length,count,coor,start,end,sides,query,slope,sinuous ERROR: value degrees out of range for parameter units Legal range: mi,miles,f,feet,me,meters,k,kilometers,a,acres,h,hectares cheers carlos On Mon, Mar 30, 2009 at 09:36, Maris Nartiss maris@gmail.com wrote: Hello all. I also needed to do some lineament orientation analysis and to do so I modified v.to.db [1]. Now it supports calculating line azimuths as CW direction from line start point to line endpoint. Usage example: v.to.db map=lineaments type=line option=azimuth units=degrees columns=orientation svn up Your develbranch6 and test it :) Maris. 1. http://trac.osgeo.org/grass/changeset/36528 -- Carlos Henrique Grohmann - Geologist D.Sc. a.k.a. Guano - Linux User #89721 ResearcherID: A-9030-2008 carlos dot grohmann at gmail dot com http://www.igc.usp.br/pessoais/guano/ _ Good morning, doctors. I have taken the liberty of removing Windows 95 from my hard drive. --The winning entry in a What were HAL's first words contest judged by 2001: A SPACE ODYSSEY creator Arthur C. Clarke Can’t stop the signal. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] GRASS R : g.region command not found
Dear all, I am running grass65 under MSYS under Vista. After launch MSYS / GRASS / R, I get the information about mapset without problem. But as my raster image are very large, R can support the file. So I decided to change the extent of the GRASS project using R to control the new extent (in fact I have reasons to do so from R). But when I try run system(g.region ...) I get error on R. May be R can't get the PATH where the g.region command are. --- require(rgdal) require(sp) require(maptools) require(raster) require(spgrass6) gmeta6() gisdbaseJ:/HDExt/cNEC/AnaliseJuruena05_abril2009/juruena_grass_sdb locationnewLocation mapset PERMANENT rows14178 columns 8710 north 9217368 south 8366688 west160765 east683365 nsres 60 ewres 60 projection +proj=utm +south +no_defs +zone=21 +a=6378160 +rf=298.25 +to_meter=1 reser.bbox-bbox(reser) reser.bbox min max x 371035 465139.4 y 8764093 8833845.3 reser.north-reser.bbox[2,2] reser.south-reser.bbox[2,1] reser.east -reser.bbox[1,2] reser.weast-reser.bbox[1,1] system(g.region n=reser.north s=reser.south e=reser.east w=reser.west) Warning message: In system(g.region n=reser.north s=reser.south e=reser.east w=reser.west) : g.region not found Any help are welcome. Bests milton ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: GRASS R : g.region command not found
Oops, I forgot some important information: =By GRASS side set !::='::\' !C:='C:\' ALLUSERSPROFILE='C:\ProgramData' APPDATA='C:\Users\famiglia\AppData\Roaming' ARCGISHOME='C:\Program Files (x86)\ArcGIS\' BASH=/bin/sh BASH_VERSINFO=([0]=2 [1]=04 [2]=0 [3]=1 [4]=release [5]=i686-pc-msys) BASH_VERSION='2.04.0(1)-release' BGCOLOR=LightYellow COLORFGBG='default;default' COLORTERM=rxvt COLUMNS=82 COMMONPROGRAMFILES='C:\Program Files (x86)\Common Files' COMMONPROGRAMFILES(X86)='C:\Program Files (x86)\Common Files' COMMONPROGRAMW6432='C:\Program Files\Common Files' COMPUTERNAME=FAMIGLIA-PC COMSPEC='C:\Windows\SysWOW64\cmd.exe' DFSTRACINGON=FALSE DIRSTACK=() DISPLAY=:0 EUID=500 FGCOLOR=Navy FP_NO_HOST_CHECK=NO GISBASE=/c/OSGeo4W/apps/grass/grass-6.5.svn GISRC=/tmp/grass6-famiglia-8108/gisrc GIS_LOCK=8108 GRASS_GNUPLOT='gnuplot -persist' GRASS_HTML_BROWSER='C:/Program Files/Internet Explorer/iexplore.exe' GRASS_LD_LIBRARY_PATH='/c/OSGeo4W/apps/grass/grass-6.5.svn/lib:/c/OSGeo4W/apps/grass/grass-6.5.svn/bin:/c/OSGeo4W/apps/grass/grass-6.5.svn/scripts:/c/OSGeo4W/bin:.:/usr/local/bin:/mingw/bin:/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static' GRASS_PAGER=less GRASS_PERL=no GRASS_PROJSHARE=/c/OSGeo4W/share/proj GRASS_PYTHON=python GRASS_SH=/bin/sh GRASS_TCLSH=tclsh GRASS_VERSION=6.5.svn GRASS_WISH=wish GROUPS=() HISTFILE=/home/famiglia/.bash_history HISTFILESIZE=500 HISTSIZE=500 HOME=/home/famiglia HOMEDRIVE=C: HOMEPATH='\' HOSTNAME=FAMIGLIA-PC HOSTTYPE=i686 IFS=' ' LINES=31 LOCALAPPDATA='C:\Users\famiglia\AppData\Local' LOGNAME=famiglia LOGONSERVER='\\FAMIGLIA-PC' MACHTYPE=i686-pc-msys MAILCHECK=60 MAKE_MODE=unix MINGW32BGCOLOR=LightYellow MINGW32FGCOLOR=Navy MSYSBGCOLOR=White MSYSCON=rxvt.exe MSYSFGCOLOR=Black MSYSTEM=MINGW32 NUMBER_OF_PROCESSORS=4 OPTERR=1 OPTIND=1 OS=Windows_NT OSTYPE=msys PATH='/c/OSGeo4W/apps/grass/grass-6.5.svn/lib:/c/OSGeo4W/apps/grass/grass-6.5.svn/bin:/c/OSGeo4W/apps/grass/grass-6.5.svn/scripts:/c/OSGeo4W/bin:.:/usr/local/bin:/mingw/bin:/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static' PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC' PIPESTATUS=([0]=0) PPID=8108 PROCESSOR_ARCHITECTURE=x86 PROCESSOR_ARCHITEW6432=AMD64 PROCESSOR_IDENTIFIER='Intel64 Family 6 Model 23 Stepping 10, GenuineIntel' PROCESSOR_LEVEL=6 PROCESSOR_REVISION=170a PROGRAMDATA='C:\ProgramData' PROGRAMFILES='C:\Program Files (x86)' PROGRAMFILES(X86)='C:\Program Files (x86)' PROGRAMW6432='C:\Program Files' PROMPT='$P$G' PS1='GRASS 6.5.svn (newLocation):\w ' PS2=' ' PS4='+ ' PUBLIC='C:\Users\Public' PWD=C:/OSGeo4W/apps/msys/home/famiglia PYTHONPATH='/c/OSGeo4W/apps/grass/grass-6.5.svn/etc/python:C:\Program Files (x86)\ArcGIS\bin' SESSIONNAME=Console SHELL=/bin/sh SHELLOPTS=braceexpand:hashall:histexpand:monitor:history:interactive-comments:emacs SHLVL=3 SYSTEMDRIVE=C: SYSTEMROOT='C:\Windows' TEMP=/tmp TERM=msys TMP=/tmp TRACE_FORMAT_SEARCH_PATH='\\NTREL202.ntdev.corp.microsoft.com \34FB5F65-FFEB-4B61-BF0E-A6A76C450FAA\TraceFormat' UID=500 USERDOMAIN=famiglia-PC USERNAME=famiglia USERPROFILE='C:\Users\famiglia' WD='C:\OSGeo4W\apps\msys\\bin\' WINDIR='C:\Windows' WINDOWID=167838920 _=-p =By R(spgrass6) side sessionInfo() R version 2.9.0 alpha (2009-03-26 r48224) i386-pc-mingw32 locale: LC_COLLATE=English_Canada.1252;LC_CTYPE=English_Canada.1252;LC_MONETARY=English_Canada.1252;LC_NUMERIC=C;LC_TIME=English_Canada.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] spgrass6_0.5-18 raster_0.8.9-6 maptools_0.7-20 foreign_0.8-34 [5] rgdal_0.6-7 sp_0.9-32 loaded via a namespace (and not attached): [1] grid_2.9.0 lattice_0.17-20 2009/4/6 Milton Cezar Ribeiro miltinho.astrona...@gmail.com Dear all, I am running grass65 under MSYS under Vista. After launch MSYS / GRASS / R, I get the information about mapset without problem. But as my raster image are very large, R can support the file. So I decided to change the extent of the GRASS project using R to control the new extent (in fact I have reasons to do so from R). But when I try run system(g.region ...) I get error on R. May be R can't get the PATH where the g.region command are. --- require(rgdal) require(sp) require(maptools) require(raster) require(spgrass6) gmeta6() gisdbaseJ:/HDExt/cNEC/AnaliseJuruena05_abril2009/juruena_grass_sdb locationnewLocation mapset PERMANENT rows14178 columns 8710 north 9217368 south 8366688 west160765 east683365 nsres 60 ewres 60 projection +proj=utm +south +no_defs +zone=21 +a=6378160 +rf=298.25 +to_meter=1 reser.bbox-bbox(reser) reser.bbox min max x 371035 465139.4 y 8764093 8833845.3 reser.north-reser.bbox[2,2]
Re: [GRASS-user] errors in r.drain (develbranch)
2009/4/6 Carlos Guâno Grohmann carlos.grohm...@gmail.com: Hello all, after a full SVN of develbranch, I'm getting errors in r.drain: - Errors in: /home/guano/pessoal/tmp_install/gis/grass6_devel/raster/r.drain (that's indeed grass7_devel/raster/r.drain/, right?) ... guano[grass6_devel]$ cd raster/r.drain/ guano[r.drain]$ make gcc -I/home/guano/pessoal/tmp_install/gis/grass6_devel/dist.i686-pc-linux-gnu/include -mt une=nocona -minline-all-stringops -O2 -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/gdal -DPACKAGE=\grassmods\ -I/home/guano/pessoal/tmp_install/gis/grass6_devel/dist.i686 -pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c: In function ‘main’: main.c:174: warning: format not a string literal and no format arguments that line reads G_warning(_(Starting point %d is outside the current region), in GRASS 7. I assume that you lost somehow --with-nls as configure parameter so that the gettext macro isn't recognised completely. I suggest a make distclean and new configure. Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: GRASS R : g.region command not found
Milton Cezar Ribeiro miltinho.astronauta at gmail.com writes: Dear all, I am running grass65 under MSYS under Vista. After launch MSYS / GRASS / R, I get the information about mapset without problem. But as my raster image are very large, R can support the file. But when I try run system(g.region ...) I get error on R. May be R can't get the PATH where the g.region command are. You must add .exe to compiled commands, and .bat to scripts. Wait for a forthcoming 0.6-* series spgrass6, which will automate some of this. For questions like this, do use the statgrass list. Roger PS. Don't use Windows if you need to do real work - there are so many binary GRASS versions that interfacing them all is a nightmare (see the pain on OSGEO4W)! ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Off Topic: Importing GRASS tiffs to GMT
I'll post here before checking on the GMT list; hopefully I can get some answers from a GRASS/GMT guru... I've exported a tiff from GRASS using r.out.tiff -t, producing a worldfile in the process. I then converted the tiff to an 8-bit Sun raster image using Imagemagick's convert utility (GMT will only import imagery in this format). So far so good, the image looks fine. My question is how do plot the Sun raster so that it is correctly georeferenced on my GMT basemap? The GMT program psimage doesn't have a -R flag with which I may feed it geographical coordinates! And grd2image is only used for gridding xyz data, not for plotting georeferenced images. I already wrote a bash script to extract the upper left coordinates from the worldfile and then convert these positions into GMT-style -R flag like this: Worldfile: 10.000 0.000 0.000 -10.000 710175.000 5418295.000 Output from my script: -54.160355/48.399269/-53.359791/48.860100 But can this information actually be used to imoprt the Sun raster? Sorry for the off-topic post. I know there are a few GMT users in the GRASS community, and maybe they have encountered this problem before. Thanks, ~ Eric. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] errors in r.drain (develbranch)
- Errors in: /home/guano/pessoal/tmp_install/gis/grass6_devel/raster/r.drain (that's indeed grass7_devel/raster/r.drain/, right?) It's develbranch 6 (GRASS 6.5) svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel ... guano[grass6_devel]$ cd raster/r.drain/ guano[r.drain]$ make gcc -I/home/guano/pessoal/tmp_install/gis/grass6_devel/dist.i686-pc-linux-gnu/include -mt une=nocona -minline-all-stringops -O2 -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/gdal -DPACKAGE=\grassmods\ -I/home/guano/pessoal/tmp_install/gis/grass6_devel/dist.i686 -pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c: In function ‘main’: main.c:174: warning: format not a string literal and no format arguments that line reads G_warning(_(Starting point %d is outside the current region), in GRASS 7. I assume that you lost somehow --with-nls as configure parameter so that the gettext macro isn't recognised completely. --with-nls is there (from ./configure): checking whether to use NLS... yes checking for gettext... yes I suggest a make distclean and new configure. This is a fresh download.. Carlos -- Carlos Henrique Grohmann - Geologist D.Sc. a.k.a. Guano - Linux User #89721 ResearcherID: A-9030-2008 carlos dot grohmann at gmail dot com http://www.igc.usp.br/pessoais/guano/ _ Good morning, doctors. I have taken the liberty of removing Windows 95 from my hard drive. --The winning entry in a What were HAL's first words contest judged by 2001: A SPACE ODYSSEY creator Arthur C. Clarke Can’t stop the signal. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] v.in.db accept DECIMAL'S?
Hi all, I'm trying to create a new vector (points) map from a mysql database table v.in.db --overwrite table=data_wells driver=mysql database=host=localhost,dbname=Eoceno x=Este y=Norte z=Salinity_Index key=Cat output=Pozos but I get this error: WARNING: MySQL driver: column 'Salinity_Index', type 246 is not supported Writing features... Segmentation fault In my MySQL database table Salinity_Index are decimals numbers and the column type is DECIMAL(6,3) NULLMy question is, Can I work with decimals number in module v.in.db? Need I work with decimals numbers in other column type, maybe FLOAT, DOUBLE? I'm using GRASS 6.4.0RC3 in ubuntu Hardy and MySQL 5.0.51a-3ubuntu5.4 Some advice? Regards, John Ortiz Bioestratigraphic Group - ICP Bogotá-Colombia _ Más rápido, sencillo y seguro. Descárgate ya el nuevo Internet Explorer 8 ¡Es gratis! http://www.vivelive.com/ie8 ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] errors in r.drain (develbranch)
This might be an error with my updates (http://trac.osgeo.org/grass/changeset/36351). I'm not sure why there wasn't any error reported for me or others, but I see that there is an inconsistency in the code (my addition at 387 compared to lines 373 and 374). 387 dir_fd = open(tempfile3, O_RDWR | O_CREAT); Should be: 387 dir_fd = open(tempfile3, O_RDWR | O_CREAT, 0666); Trying making that change and recompile. Markus, I can submit a diff for this line if needed. -Colin 2009/4/6 Carlos Guâno Grohmann carlos.grohm...@gmail.com: - Errors in: /home/guano/pessoal/tmp_install/gis/grass6_devel/raster/r.drain (that's indeed grass7_devel/raster/r.drain/, right?) It's develbranch 6 (GRASS 6.5) svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel ... guano[grass6_devel]$ cd raster/r.drain/ guano[r.drain]$ make gcc -I/home/guano/pessoal/tmp_install/gis/grass6_devel/dist.i686-pc-linux-gnu/include -mt une=nocona -minline-all-stringops -O2 -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/gdal -DPACKAGE=\grassmods\ -I/home/guano/pessoal/tmp_install/gis/grass6_devel/dist.i686 -pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c: In function ‘main’: main.c:174: warning: format not a string literal and no format arguments that line reads G_warning(_(Starting point %d is outside the current region), in GRASS 7. I assume that you lost somehow --with-nls as configure parameter so that the gettext macro isn't recognised completely. --with-nls is there (from ./configure): checking whether to use NLS... yes checking for gettext... yes I suggest a make distclean and new configure. This is a fresh download.. Carlos -- Carlos Henrique Grohmann - Geologist D.Sc. a.k.a. Guano - Linux User #89721 ResearcherID: A-9030-2008 carlos dot grohmann at gmail dot com http://www.igc.usp.br/pessoais/guano/ _ Good morning, doctors. I have taken the liberty of removing Windows 95 from my hard drive. --The winning entry in a What were HAL's first words contest judged by 2001: A SPACE ODYSSEY creator Arthur C. Clarke Can’t stop the signal. ___ 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
Re: [GRASS-user] errors in r.drain (develbranch)
Yes, that fixed it. many thanks Carlos 2009/4/6 Colin Nielsen colin.niel...@gmail.com: This might be an error with my updates (http://trac.osgeo.org/grass/changeset/36351). I'm not sure why there wasn't any error reported for me or others, but I see that there is an inconsistency in the code (my addition at 387 compared to lines 373 and 374). 387 dir_fd = open(tempfile3, O_RDWR | O_CREAT); Should be: 387 dir_fd = open(tempfile3, O_RDWR | O_CREAT, 0666); Trying making that change and recompile. Markus, I can submit a diff for this line if needed. -Colin 2009/4/6 Carlos Guâno Grohmann carlos.grohm...@gmail.com: - Errors in: /home/guano/pessoal/tmp_install/gis/grass6_devel/raster/r.drain (that's indeed grass7_devel/raster/r.drain/, right?) It's develbranch 6 (GRASS 6.5) svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel ... guano[grass6_devel]$ cd raster/r.drain/ guano[r.drain]$ make gcc -I/home/guano/pessoal/tmp_install/gis/grass6_devel/dist.i686-pc-linux-gnu/include -mt une=nocona -minline-all-stringops -O2 -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/gdal -DPACKAGE=\grassmods\ -I/home/guano/pessoal/tmp_install/gis/grass6_devel/dist.i686 -pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c: In function ‘main’: main.c:174: warning: format not a string literal and no format arguments that line reads G_warning(_(Starting point %d is outside the current region), in GRASS 7. I assume that you lost somehow --with-nls as configure parameter so that the gettext macro isn't recognised completely. --with-nls is there (from ./configure): checking whether to use NLS... yes checking for gettext... yes I suggest a make distclean and new configure. This is a fresh download.. Carlos -- Carlos Henrique Grohmann - Geologist D.Sc. a.k.a. Guano - Linux User #89721 ResearcherID: A-9030-2008 carlos dot grohmann at gmail dot com http://www.igc.usp.br/pessoais/guano/ _ Good morning, doctors. I have taken the liberty of removing Windows 95 from my hard drive. --The winning entry in a What were HAL's first words contest judged by 2001: A SPACE ODYSSEY creator Arthur C. Clarke Can’t stop the signal. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Carlos Henrique Grohmann - Geologist D.Sc. a.k.a. Guano - Linux User #89721 ResearcherID: A-9030-2008 carlos dot grohmann at gmail dot com http://www.igc.usp.br/pessoais/guano/ _ Good morning, doctors. I have taken the liberty of removing Windows 95 from my hard drive. --The winning entry in a What were HAL's first words contest judged by 2001: A SPACE ODYSSEY creator Arthur C. Clarke Can’t stop the signal. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user