Re: [GRASS-user] Re: Cannot create dbf database

2011-09-26 Thread Craig Leat
Hamish wrote:
>> GRASS 6.4.1 (wgs84lo29):~ > v.in.ogr -e dsn="contours lo29.shp" out=contours2
>
> shapfiles don't like spaces in their names. rename the file(s) to make
> them sql compliant.

Thanks for this. The table is created correctly if I remove the space
from the shapefile name. Maybe v.in.ogr could issue a warning if it
encounters spaces?

Craig
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: grass-user Digest, Vol 65, Issue 49

2011-09-26 Thread Alexander Muriy
*Jim

Trivially: did you do "g.region rast=na_dem_sub_20" before raster
computations?
And r.mapcalc expression is without any quotes like r.mapcalc "na_dem_sub_20
= na_dem_input - 20" or r.mapcalc 'na_dem_sub_20 = na_dem_input - 20'


Alexander
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] r.mapcalc appears to have changed behavior

2011-09-26 Thread Michael Barton
It looks like for the 2nd calculation, your computational region is set to 
extents of 0W - 1E, 0S - 1N, with a resolution of 1.

So r.mapcalc is only operating on a single 1x1 cell that is outside the area of 
your raster map.

Michael

C. Michael Barton
Director, Center for Social Dynamics & Complexity 
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice:  480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:  480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu











On Sep 27, 2011, at 11:50 PM,  
 wrote:

> Date: Mon, 26 Sep 2011 23:19:11 -0400
> From: Jim Mochel 
> Subject: [GRASS-user] r.mapcalc appears to have changed behavior
> To: grass-user@lists.osgeo.org
> Message-ID:
>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> I had made a number of scripts that worked fine in the 6.4.0 build 6 but
> appear to have problems with the same code in later revisions:
> 
> The method used to take about 6-8 secs and produce about what you would
> expect on the screen. Now the same calculation takes 0 seconds the file is
> radically changed. See the before and after below.
> 
> Any help would be greatly appreciated.
> Thanks
> Jim Mochel
> 
> r.mapcalc na_dem_sub_20 = na_dem_input - 20
> 
> 
> ++
> | Layer:na_dem Date: Sat Sep 24 17:37:59 2011
> |
> | Mapset:   PERMANENT  Login of Creator: jmochel
>  |
> | Location: wgs84
> |
> | DataBase: /home/jmochel/grassdata
> |
> | Title: ( na_dem )
> |
> | Timestamp: none
> |
> ||
> |
> |
> |   Type of Map:  raster   Number of Categories: 65535
>  |
> |   Data Type:CELL
>  |
> |   Rows: 8384
>  |
> |   Columns:  9102
>  |
> |   Total Cells:  76311168
>  |
> |Projection: x,y
>  |
> |N:4384500S:   -3999500   Res:  1000
>  |
> |E:4639500W:   -4462500   Res:  1000
>  |
> |   Range of data:min = 0  max = 65535
>  |
> |
> |
> |   Data Description:
> |
> |generated by r.in.gdal
> |
> |
> |
> |   Comments:
> |
> |r.in.gdal input="/home/jmochel/gis/raw-data/hydo1k/na_dem.bil" outpu\
>  |
> |t="na_dem"
> |
> |
> |
> ++
> 
> 
> r.info map=na_dem_sub_20
> 
> ++
> | Layer:na_dem_sub_20  Date: Mon Sep 26 23:06:03 2011
> |
> | Mapset:   PERMANENT  Login of Creator: jmochel
>  |
> | Location: wgs84
> |
> | DataBase: /home/jmochel/grassdata
> |
> | Title: ( na_dem_sub_20 )
>  |
> | Timestamp: none
> |
> ||
> |
> |
> |   Type of Map:  raster   Number of Categories: 610
>  |
> |   Data Type:CELL
>  |
> |   Rows: 1
> |
> |   Columns:  1
> |
> |   Total Cells:  1
> |
> |Projection: x,y
>  |
> |N:  1S:  0   Res: 1
>  |
> |E:  1W:  0   Res: 1
>  |
> |   Range of data:min = 610  max = 610
>  |
> |
> |
> |   Data Description:
> |
> |generated by r.mapcalc
> |
> |
> |
> |   Comments:
> |
> |na_dem_input@PERMANENT - 20
>  |
> |
> |
> ++

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: Cannot create dbf database

2011-09-26 Thread Hamish
Craig wrote:
> GRASS 6.4.1 (wgs84lo29):~ > v.in.ogr -e dsn="contours lo29.shp" out=contours2


shapfiles don't like spaces in their names. rename the file(s) to make
them sql compliant.


Hamish

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] r.mapcalc appears to have changed behavior

2011-09-26 Thread Hamish
Jim wrote:
> I had made a number of scripts that worked fine in the 6.4.0 build 6
> but appear to have problems with the same code in later revisions:
> The method used to take about 6-8 secs and produce about what you would
> expect on the screen. Now the same calculation takes 0 seconds the file
> is radically changed. See the before and after below.

the computational region is wrong. use g.region to fix it.

> r.mapcalc na_dem_sub_20 = na_dem_input - 20 

to match the region to the input map, first run:

  g.region rast=na_dem_input


compare:
>  Rows: 8384
>  Columns:  9102
...
> Rows: 1
> Columns:  1
> Total Cells:  1


Hamish

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] r.mapcalc appears to have changed behavior

2011-09-26 Thread Jim Mochel
I had made a number of scripts that worked fine in the 6.4.0 build 6 but
appear to have problems with the same code in later revisions:

The method used to take about 6-8 secs and produce about what you would
expect on the screen. Now the same calculation takes 0 seconds the file is
radically changed. See the before and after below.

Any help would be greatly appreciated.
Thanks
Jim Mochel

r.mapcalc na_dem_sub_20 = na_dem_input - 20


++
 | Layer:na_dem Date: Sat Sep 24 17:37:59 2011
 |
 | Mapset:   PERMANENT  Login of Creator: jmochel
  |
 | Location: wgs84
 |
 | DataBase: /home/jmochel/grassdata
 |
 | Title: ( na_dem )
 |
 | Timestamp: none
 |
 ||
 |
 |
 |   Type of Map:  raster   Number of Categories: 65535
  |
 |   Data Type:CELL
  |
 |   Rows: 8384
  |
 |   Columns:  9102
  |
 |   Total Cells:  76311168
  |
 |Projection: x,y
  |
 |N:4384500S:   -3999500   Res:  1000
  |
 |E:4639500W:   -4462500   Res:  1000
  |
 |   Range of data:min = 0  max = 65535
  |
 |
 |
 |   Data Description:
 |
 |generated by r.in.gdal
 |
 |
 |
 |   Comments:
 |
 |r.in.gdal input="/home/jmochel/gis/raw-data/hydo1k/na_dem.bil" outpu\
  |
 |t="na_dem"
 |
 |
 |
 ++


r.info map=na_dem_sub_20

 ++
 | Layer:na_dem_sub_20  Date: Mon Sep 26 23:06:03 2011
 |
 | Mapset:   PERMANENT  Login of Creator: jmochel
  |
 | Location: wgs84
 |
 | DataBase: /home/jmochel/grassdata
 |
 | Title: ( na_dem_sub_20 )
  |
 | Timestamp: none
 |
 ||
 |
 |
 |   Type of Map:  raster   Number of Categories: 610
  |
 |   Data Type:CELL
  |
 |   Rows: 1
 |
 |   Columns:  1
 |
 |   Total Cells:  1
 |
 |Projection: x,y
  |
 |N:  1S:  0   Res: 1
  |
 |E:  1W:  0   Res: 1
  |
 |   Range of data:min = 610  max = 610
  |
 |
 |
 |   Data Description:
 |
 |generated by r.mapcalc
 |
 |
 |
 |   Comments:
 |
 |na_dem_input@PERMANENT - 20
  |
 |
 |
 ++
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] xy to lat long

2011-09-26 Thread Hamish
Raphael wrote:
> > i have imported the etopo dem (geotifff) into grass.
> > It appears to be in XY and i would like to convert
> > these to lat longs.

MarkusN:
> I looked at
> http://grass.osgeo.org/wiki/Global_datasets#ETOPO_.28DEM.29
> 
> and was surprised to see the XY thing there for ETOPO1.

there are two versions available. note the ETOPO-1 wiki section
starts with "The cell registered version can be loaded directly
into a lat/lon region."   That one will load directly into the
lat/lon region; I've bolded that text now.


but the NOAA site states "The grid-registered is the
authoritative registration. The cell-registered is derived from
the grid-registered, and the conversion produces slightly
flattened relief. More about grid registration:
 http://www.ngdc.noaa.gov/mgg/global/gridregistration.html "

I think the "import into XY, crop outer edge & recenter" before
converting the XY location into a lat/lon loc'n hack was written
before the 'r.in.gdal -l' flag + fix with r.region came to be
(perhaps because of?), and since these datasets need r.in.bin
you'd need to compose a gdal .vrt file describing the byte order
etc to use r.in.gdal?


> But in any case the ETOPO2 will be better (see wiki for an
> article how to import it).

yes for ease of import, but not so much for modernity. 
"Historic ETOPO2v2 and ETOPO5 global relief grids are deprecated
but still available."

for ETOPO2 the authoritative registration was cell-centered, which
is the same as GRASS uses, so everything lines up and it's a lot
easier.


Hamish
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] parallel grass operations

2011-09-26 Thread Glynn Clements

Dmitriy Tyugaev wrote:

> When I run my script with parallel grass operations (about 12 processes at
> the same time), sometimes I get this error from the g.region module:
> 
> *** glibc detected *** g.region: double free or corruption (out):
> 0x15dcfdd0 ***
> === Backtrace: =
> /lib64/libc.so.6[0x360427245f]
> /lib64/libc.so.6(cfree+0x4b)[0x36042728bb]
> /usr/lib64/libgrass_gis.so.6.4(G__read_Cell_head+0xe5)[0x303ee39eb5]
> /usr/lib64/libgrass_gis.so.6.4(G__get_window+0xbd)[0x303ee23fed]
> /usr/lib64/libgrass_gis.so.6.4(G_get_window+0x148)[0x303ee241d8]
> g.region(main+0x15fb)[0x403a3b]
> /lib64/libc.so.6(__libc_start_main+0xf4)[0x360421d994]
> g.region[0x4021c9]
> === Memory map: 
> 0040-00409000 r-xp  08:11 916425443
> /usr/lib64/grass-6.4.1/bin/g.region
> 00608000-0060d000 rw-p 8000 08:11 916425443
> /usr/lib64/grass-6.4.1/bin/g.region
> 15dca000-15deb000 rw-p 15dca000 00:00 0 [heap]
> 303ee0-303ee51000 r-xp  08:11 915563294
> /usr/lib64/libgrass_gis.so.6.4.1
> 
> Tell me please what's the problem?

The error being reported by glibc is due to the code which reads a
region from a file (e.g. the WIND file) being unable to cope with the
file changing while it's being read. First it scans the file to
determine how many lines it contains, then it reads those lines into
memory. If the file grows between the line-counting and the reading,
it ends up using more memory than it has allocated.

Normally, this shouldn't happen.

The real problem is that you're trying to run multiple GRASS commands
concurrently in the same mapset. In general, that won't work.

GRASS doesn't perform any locking on the files within a GRASS
database, so you may end up with one process reading a file while
another process is in the middle of writing it. The most problematic
case is the WIND file, which contains the current region, although
there are others.

If you want to run multiple commands concurrently, you need to take
steps to ensure that this type of conflict doesn't happen. For the
current region, you can use the WIND_OVERRIDE environment variable to
specify a named region which should be used instead of the WIND file. 

Or you can use the GRASS_REGION environment variable to specify the
region parameters (the syntax is the same as the WIND file, but with
newlines replaced with semicolons). With this approach, the region can
only be read, not modified.

Problems can also arise if you read files from another mapset while
another session is modifying those files. The WIND file isn't an issue
here, nor are the files containing raster data (which are updated
atomically), but the various support files may be.

-- 
Glynn Clements 
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] xy to lat long

2011-09-26 Thread Markus Neteler
On Mon, Sep 26, 2011 at 5:16 PM,   wrote:
> Hello
> i have imported the etopo dem (geotifff) into grass.
> It appears to be in XY and i would like to convert these to lat longs.

I looked at
http://grass.osgeo.org/wiki/Global_datasets#ETOPO_.28DEM.29

and was surprised to see the XY thing there for ETOPO1.

But in any case the ETOPO2 will be better (see wiki for an article
how to import it).

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] wxGUI Graphical Modeler - variables

2011-09-26 Thread Markus Neteler
On Mon, Sep 26, 2011 at 10:22 PM, Michael Barton  wrote:
> Martin Landa, author of the graphical modeler, has posted this video showing 
> how to use variables.
>
>  http://www.youtube.com/watch?v=RztxMXXtA0s&feature=player_embedded

Please someone turn this also into text for the Wiki/Manual:
http://grass.osgeo.org/wiki/WxPython-based_GUI_for_GRASS#Graphical_modeler

thanks
Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] wxGUI Graphical Modeler - variables

2011-09-26 Thread Michael Barton
Martin Landa, author of the graphical modeler, has posted this video showing 
how to use variables.

 http://www.youtube.com/watch?v=RztxMXXtA0s&feature=player_embedded
__
C. Michael Barton 
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ  85287-2402
USA

voice:  480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:  480-965-7671(SHESC), 480-727-0709 (CSDC)
www:http://csdc.asu.edu, http://shesc.asu.edu
http://www.public.asu.edu/~cmbarton

On Sep 27, 2011, at 2:07 PM, grass-user-requ...@lists.osgeo.org wrote:

> Message: 1
> Date: Mon, 26 Sep 2011 14:40:56 +0100
> From: Lu?s Ferreira 
> Subject: [GRASS-user] wxGUI Graphical Modeler - variables
> To: GRASS user list 
> Message-ID: <1317044456.8325.9.camel@leopardo>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hello.
> 
> I have some selected lines in a command line script:
> 
> #! /bin/sh -x
> 
> MYMAPSET=`g.gisenv -s get=MAPSET`
> targetdir=/home/lf/TEMP/
> 
> LIST=`g.mlist type=rast separator=, pattern="clip_toar*" mapset=
> $MYMAPSET`
> echo "$LIST"
> i.group group=group input=$LIST
> 
> r.out.gdal -c -f input=group format=HFA type=Float32 nodata=0 output=
> $targetdir/$MYMAPSET.clip_toar.img
> 
> g.remove group=group
> 
> #
> 
> 
> 
> In wxGUI Graphical Modeler, how can I  use the variables inside the
> commands options? I'm trying using string data type variables 
> 
> declaring variables
> 
> MYMAPSET
> default value `g.gisenv -s get=MAPSET`
> 
> targetdir 
> default value /home/lf/TEMP/
> 
> 
> then using in r.out.gdal options
> 
> r.out.gdal -c -f input=group format=HFA type=Float32 nodata=0 output=%
> targetdir/%MYMAPSET.clip_toar.img
> or 
> $targetdir/$MYMAPSET.clip_toar.img
> 
> 
> Without results.
> 
> Anyone have ideas how to solve this problem? Is it possible in Graphical
> Modeller?
> 
> Thank you.
> 
> Lu?s Ferreira
> -- next part --
> An HTML attachment was scrubbed...
> URL: 
> http://lists.osgeo.org/pipermail/grass-user/attachments/20110926/2125e3a6/attachment-0001.html

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: Cannot create dbf database

2011-09-26 Thread Alexander Muriy
*Craig
You used command "v.in.ogr -e dsn="contours lo29.shp" out=contours2" with
the "-e" flag , this flag is for creating a new location with the imported
data. But you don't specify any location..
And may be better to use single quotes with the filenames like 'contours
lo29.shp'.

---
Alexander
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] problem saving workspace

2011-09-26 Thread Martin Landa
2011/9/26 Eugenio Trumpy :
> in __writeLayer
>     self.file.write('%s\n' % (' ' * self.indent, cmd[0]))
> TypeError: 'NoneType' object is unsubscriptable
>
> Anyone knows the reason and how can i solve this problem?
>
> Regards
>
> Eugenio
>
> P.S. Debian Wheezy, Grass 6.4.1 (from .deb)

can you try 6.4.2 from SVN ?

Martin

-- 
Martin Landa  * http://geo.fsv.cvut.cz/~landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: Cannot create dbf database

2011-09-26 Thread Martin Landa
2011/9/26 Craig Leat :
> GRASS 6.4.1 (wgs84lo29):~ > v.db.connect -p contours2
> Vector map  is connected by:
> layer <1> table  in database  /home/craig/GIS/grassdata/wgs84lo29/lotheni/dbf/> through driver 
> with key 

it's absolutely wrong, it should have been

> layer <1> table  in database 
>  through driver 
> with key 

No idea, why it's wrong. Can you try 6.4.2 from SVN?

Martin

-- 
Martin Landa  * http://geo.fsv.cvut.cz/~landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] problem saving workspace

2011-09-26 Thread Eugenio Trumpy

Hi to all,
while save a workspace i receive this error message:

Scrittura delle impostazioni correnti nel file dell'ambiente di lavoro fallita.

Reason: 'NoneType' object is unsubscriptable

Traceback (most recent call last):
  File "/usr/lib/grass64/etc/wxpython/wxgui.py", line 844, in 
SaveToWorkspaceFile
workspace.WriteWorkspaceFile(lmgr = self, file = tmpfile)
  File "/usr/lib/grass64/etc/wxpython/gui_modules/workspace.py", line 734, in 
__init__
self.__writeLayer(mapTree, item)
  File "/usr/lib/grass64/etc/wxpython/gui_modules/workspace.py", line 788, in 
__writeLayer
self.file.write('%s\n' % (' ' * self.indent, cmd[0]))
TypeError: 'NoneType' object is unsubscriptable

Anyone knows the reason and how can i solve this problem?

Regards

Eugenio

P.S. Debian Wheezy, Grass 6.4.1 (from .deb)





  ___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] xy to lat long

2011-09-26 Thread Raphael.Viscarra-Rossel
Hello
i have imported the etopo dem (geotifff) into grass.
It appears to be in XY and i would like to convert these to lat longs.
Any hints on how to do this?
Best wishes
Raphael.
 ___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: Cannot create dbf database

2011-09-26 Thread Craig Leat
Thanks for the tips. I deleted the location and started over, just to be sure.

GRASS 6.4.1 (wgs84lo29):~ > v.in.ogr -e dsn="contours lo29.shp" out=contours2
GRASS 6.4.1 (wgs84lo29):~ > db.tables -p
contours
contours2
heights
GRASS 6.4.1 (wgs84lo29):~ > v.db.connect -p contours2
Vector map  is connected by:
layer <1> table  in database  through driver 
with key 
GRASS 6.4.1 (wgs84lo29):~ > g.remove vect=contours2
Removing vector 
DBMI-DBF driver error:
Cannot create dbf database: cat /home/craig/GIS/grassdata/wgs84lo29/lotheni/dbf/

WARNING: Unable to open database  by driver 
WARNING: Unable open database  by driver 
WARNING: Unable to find table  linked to vector map 
WARNING: couldn't be removed
WARNING:  nothing removed

I don't know any table called "lo29".

Craig
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: GRASS GUI won't open after selecting mapset

2011-09-26 Thread skualos
It was exactly that.
I was starting GRASS from a self-made launcher.
Just changed the Type field to "Application in Terminal" on the Launcher
Properties and it worked.


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/GRASS-GUI-won-t-open-after-selecting-mapset-tp6831705p6832105.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


[GRASS-user] parallel grass operations

2011-09-26 Thread Dmitriy Tyugaev
Hi list,

When I run my script with parallel grass operations (about 12 processes at
the same time), sometimes I get this error from the g.region module:

*** glibc detected *** g.region: double free or corruption (out):
0x15dcfdd0 ***
=== Backtrace: =
/lib64/libc.so.6[0x360427245f]
/lib64/libc.so.6(cfree+0x4b)[0x36042728bb]
/usr/lib64/libgrass_gis.so.6.4(G__read_Cell_head+0xe5)[0x303ee39eb5]
/usr/lib64/libgrass_gis.so.6.4(G__get_window+0xbd)[0x303ee23fed]
/usr/lib64/libgrass_gis.so.6.4(G_get_window+0x148)[0x303ee241d8]
g.region(main+0x15fb)[0x403a3b]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x360421d994]
g.region[0x4021c9]
=== Memory map: 
0040-00409000 r-xp  08:11 916425443
/usr/lib64/grass-6.4.1/bin/g.region
00608000-0060d000 rw-p 8000 08:11 916425443
/usr/lib64/grass-6.4.1/bin/g.region
15dca000-15deb000 rw-p 15dca000 00:00 0 [heap]
303ee0-303ee51000 r-xp  08:11 915563294
/usr/lib64/libgrass_gis.so.6.4.1

Tell me please what's the problem?

--
Sincerely, Dmitriy
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: Cannot create dbf database

2011-09-26 Thread Alexander Muriy
Maybe need to check the connection one more time?
$ eval $(g.gisenv)
$ db.connect driver=dbf database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'
$ db.connect -p
$ db.tables -p

And then:
$ v.db.connect -p contours
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] GRASS GUI won't open after selecting mapset

2011-09-26 Thread Hamish
skualos wrote:
> I'm using GRASS GIS 6.4 on Ubuntu 10.04.
> 
> I can access mapsets and run commands via the QGIS Grass plug-in. But
> when I try to use GRASS directly, I get the first window to select
> the mapset I want to open, but when I click the "start grass" button,
> the first window disappears and GRASS GUI won't open.


are you starting grass from the command line or from a self-made launcher?
if from a launcher, make sure you have the "start in terminal" box ticked.
if from the command line it should start ok, or let you see the error
message.


(the current package doesn't, but the next version of the ubuntu+debian
packages will ship an icon + menu entry)


Hamish
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] wxGUI Graphical Modeler - variables

2011-09-26 Thread Luís Ferreira
Hello.

I have some selected lines in a command line script:

#! /bin/sh -x

MYMAPSET=`g.gisenv -s get=MAPSET`
targetdir=/home/lf/TEMP/

LIST=`g.mlist type=rast separator=, pattern="clip_toar*" mapset=
$MYMAPSET`
echo "$LIST"
i.group group=group input=$LIST

r.out.gdal -c -f input=group format=HFA type=Float32 nodata=0 output=
$targetdir/$MYMAPSET.clip_toar.img

g.remove group=group

#



In wxGUI Graphical Modeler, how can I  use the variables inside the
commands options? I'm trying using string data type variables 

declaring variables

MYMAPSET
default value `g.gisenv -s get=MAPSET`

targetdir 
default value /home/lf/TEMP/


then using in r.out.gdal options

r.out.gdal -c -f input=group format=HFA type=Float32 nodata=0 output=%
targetdir/%MYMAPSET.clip_toar.img
or 
$targetdir/$MYMAPSET.clip_toar.img


Without results.

Anyone have ideas how to solve this problem? Is it possible in Graphical
Modeller?

Thank you.

Luís Ferreira
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Cannot create dbf database

2011-09-26 Thread Craig Leat
Hi,

I have been able to import a shapefile into a new location, but I
receive an error when I try to copy this vector:

GRASS 6.4.1 (WGS84Lo29):~ > g.copy vect=contours,test
Copy vector  to current mapset as 
DBMI-DBF driver error:
Cannot create dbf database: cat /home/craig/GIS/grassdata/WGS84Lo29/Lotheni/dbf/

WARNING: Unable to open database  by driver 
no database is open
WARNING: Unable to copy table 
WARNING: Cannot copy  to current mapset as 

The first warning seems to have the database and driver switched, but:

GRASS 6.4.1 (WGS84Lo29):~ > db.connect -p
driver:dbf
database:/home/craig/GIS/grassdata/WGS84Lo29/Lotheni/dbf/
schema:
group:
GRASS 6.4.1 (WGS84Lo29):~ > ls -l
/home/craig/GIS/grassdata/WGS84Lo29/Lotheni/dbf
total 20
-rw-r--r-- 1 craig users 7297 2011-09-26 10:22 contours.dbf
-rw-r--r-- 1 craig users 8449 2011-09-26 10:26 heights.dbf

I'm on Ubuntu 11.04.

Any ideas what I have done wrong?

Craig
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] GRASS GUI won't open after selecting mapset

2011-09-26 Thread skualos
Hello.

I'm using GRASS GIS 6.4 on Ubuntu 10.04.

I can access mapsets and run commands via the QGIS Grass plug-in. But when I
try to use GRASS directly, I get the first window to select the mapset I
want to open, but when I click the "start grass" button, the first window
disappears and GRASS GUI won't open.

I would also like to add is not a problem with the .gislock file that QGIS
creates when it crashes, and that I've tried different mapsets stored on
diferent drives, but always get the same.

Any help is appreciated.

Thanks


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/GRASS-GUI-won-t-open-after-selecting-mapset-tp6831705p6831705.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] simultaneous raster maps export

2011-09-26 Thread giannis Nj

Hi again! 

My input maps (two .tiff and one .shp) makes a pile, they cover each other 
looking from upside, when i put them in the display i can see them only with 
transparency. What I want is to export them all together in one file (so that 
they can keep their reference between them) in an appropriate format so as to 
insert them in a 3D edit program (with no reference system, thats why i want to 
export them all together and not one by one) and use them seperately (that's 
why r.patch can't be useful). Imagine that you look the output file from the 
side, you see 3 different layers (the top, the middle and the lower) that you 
can use furtherly (p.e. give them volumes). I think it is a bit challenge!





> From: nete...@osgeo.org
> Date: Sat, 24 Sep 2011 11:55:34 +0200
> Subject: Re: [GRASS-user] simultaneous raster maps export
> To: netsag...@hotmail.com
> CC: grass-user@lists.osgeo.org
> 
> 2011/9/23 giannis Nj :
> > Hi Marcus and thanks for the answer,
> >
> > i tried your tip but this doesn't work for me, because my firstly imported
> > .tiff layers mostly cover one another, they are not just side-by-side,
> 
> Ah, I understood you wanted a *stack* of maps.
> 
> 
> > so if
> > i make them one file i won't be able to use them seperately in the covered
> > areas.
> 
> So the input maps are side by side? Then you want to mosaik them
> with r.patch.
> 
> > Also i want to add a .shp file on top of them and export all together
> > in one schema. I don't know if it is clear what i want,
> 
> Not much, say, I don't know what a "schema" means.
> 
> > but it is very simple in close-source gis.
> 
> Like so in open source GIS once we know what you wish :)
> 
> Markus
  ___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Adding a point vector

2011-09-26 Thread Markus Metz
On Sun, Sep 25, 2011 at 12:40 AM, Markus Neteler  wrote:
> Hi Kurt,
>
> I can understand your frustration. But...
>
> On Sat, Sep 24, 2011 at 9:06 PM, Kurt Springs  wrote:
>> Sorry about that.
>>
>> I meant to say.  I reran v.in.db with all other programs closed as Markus 
>> Metz suggested.  I still got the error message:
>>
>> GRASS 6.4.1 (Mega_Ireland):~ >
>
> This is really 6.4.1? We have made tons of fixes in 6.4.svn, if
> you could update it would be cool and would either already
> solve it for you are enable us to track it better down.
>
>> v.in.db --overwrite table=wedge_tomb driver=sqlite 
>> database=/Users/kurtsprings/Document/wedge.db x=nat_grid_e y=nat_grid_n 
>> key=cat output=wedge_tomb
>> WARNING: Vector map  already exists and will be overwritten
>> DBMI-SQLite driver error:
>> Unable to open database: unable to open database file
>
> With "lsof" you could check who has opened the file (dunno where lsof
> is on Mac), something like:
>
> /usr/sbin/lsof /Users/kurtsprings/Document/wedge.db
>
What I wanted to suggest was that another program but grass may keep
files in that folder, or even the sqlite database itself open.
You could try to close grass, open the database with sqlite or
sqlitebrowser and see if that works, then open grass and again try to
open the sqlite database not with grass but with sqlite or
sqlitebrowser. At least then we would know if the problem is with
sqlite or with grass.

In the hope that you're not giving up yet,

Markus M
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user