[GRASS-user] r.terraflow on windows grass6.4 RC2 (osgeo4w)

2009-03-06 Thread massimo di stefano

Hi,

i'm tring to use grass on windows (osgeo4w.exe installer)
but r.terraflow give me some prblems

on the spearfish dataset :

r.terraflow.short elevation=elevation@permanent  
filled=elevation10m.filled direction=elevation10m.direction  
swatershed=elevation10m.watershed accumulation=elevation10m.accu  
tci=elevation10m.tci d8cut=infinity memory=300 STREAM_DIR=C:\tmp  
stats=stats3.out



MFD flow direction
D8CUT=99986991104.00
Memory size: 300.00M (314572800) bytes
Memory manager registering memory in MM_IGNORE_MEMORY_EXCEEDED mode.
raster elevation.10m is of type DCELL_TYPE --precision may be lost.

STREAM temporary files in /var/tmp  (THESE INTERMEDIATE STREAMS WILL  
NOT BE DELETED IN CASE OF ABNORMAL TERMINATION OF THE PROGRAM. TO SAVE  
SPACE PLEASE DELETE THESE FILES MANUALLY!)

file stats3.out exists - renaming.
ami_single_temp_name: mkstemp failed: : No such file or directory
Assertion failed: 0, file ami_stream.cc, line 75
This application has requested the Runtime to terminate it in an  
unusual way.

Please contact the application's support team for more information.


in the file stats3.out i have :

Free Memory=-1
[0.0] Thu Mar 05 23:22:40 2009

Command Line:
C:\OSGeo4W\apps\grass\grass-6.4.0RC3\bin\r.terraflow.short.exe  
elevation=elevation@permanent filled=elevation10m.filled  
direction=elevation10m.direction swatershed=elevation10m.watershed  
accumulation=elevation10m.accu tci=elevation10m.tci d8cut=infinity  
memory=300 STREAM_DIR=	mp stats=stats3.out

input elevation grid: elevation.10m
output (flooded) elevations grid: elevation10m.filled
output directions grid: elevation10m.direction
output sinkwatershed grid: elevation10m.watershed
output accumulation grid: elevation10m.accu
output tci grid: elevation10m.tci
[0.0] MFD flow direction
[0.0] D8CUT=99986991104.00
[0.0] Memory size: 300.00M (314572800) bytes
region size = 2.53M (2654802) elts (1398 rows x 1899 cols)
internal nodata value: -

it don't produce any output (onlt the stats file) and terminate  
immediatly


have you any idea ?

i manually created the directory tmp in C:

p.s.

is these an osgeo4w probles?
do you know any grass-windos version that has r.terraflow working?

i'm really new to windos (never used it) ... so maybe i'm doing  
something wrong :-/

i'm tring to make a foss-gis migration at university (idrology)
so i need a bit of time to port all the people on linux :-/
 where r.terraflow works great and with really good results!

thanks to All,

Massimo Di Stefano
massimodisa...@yahoo.it

epifanio on   irc.freenode.net  /join gfoss
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Determine surface areas

2009-03-06 Thread Markus Metz



Moritz Lennert wrote:

On 05/03/09 23:15, i...@the-masterplan.net wrote:

Hi!

I am still working on the extended problem and so far i have done the
following.
I created circles and sectors in autocad and imported the dxf file 
(first

one sector at a time).
The import didn't seem to work that well, so i converted lines to
boundaries and used v.clean to get areas, and inserted a centroid with
v.digit and created a rastermap with v.to.rast (source: val, and
featuretype area).
using the rastermap as mask I can use r.report or r.stats to get the
waterarea/watercells.

Because there are 160 of these areas i was wondering if there is a
possibility to use all of the areas at once (or at least more than 
one at

a time) assign some kind of an ID to every area and get the results
separately for every area.
trying to use more than one area at a time always got me the total stats
for all areas.


Just give each centroid a different category value (e.g. using 
v.category, or by hand using v.digit), then v.to.rast use=cat. Then 
r.stats/r.report should give you the result by category.

Or v.to.db option=area?

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


Re: [GRASS-user] qgis + grass-plugin = gdal-problem (update)

2009-03-06 Thread achim
I use a 64 bit system and 64 bit packages (for suse 11.1)

achim


Otto Dassau schrieb:
 Hi Achim,
 
 I build the opensuse packages in the Application:/Geo repository and will 
 check
 this. Do you use the 32 bit or 64 bit packages for 11.1?
 
 regards,
  Otto
 
 On Mon, 02 Mar 2009 10:45:00 +0100
 achim a...@jupiter.uni-freiburg.de wrote:
 
 Hi,

 thanks for answering and sorry for taking so long..

 Im running suse 11.1 and I was installing both qgis and grass from the
 following repositories:
 http://teodori.org/repos/grass/openSuSE11.1/
 and
 http://download.opensuse.org/repositories/Application:/Geo/openSUSE_11.1/

 As said deinstalling the old and reinstalling of the packages via yast
 does not help. Now I'm using only grass, but I would really like to use
 the comfortable qgis in future too.

 Thanks,
 achim

 Zahid Parvez schrieb:

 On Sat, Feb 28, 2009 at 9:09 AM, Nikos Alexandris
 nikos.alexand...@felis.uni-freiburg.de
 mailto:nikos.alexand...@felis.uni-freiburg.de wrote:

 On Fri, 2009-02-27 at 13:39 +0100, achim wrote:
  Hi,
 
  I used the goe-repository files for installing grass (6.4) and
 grass63.
  Do I have to compile myself? Cant I clean old libraries by
 myself and
  reinstall grass from the repository?
 
  Thanks,
  achim

 Hi Achim!

 It's not clear to me which geo-repository you mean. Could you
 please be
 more specific?


 First:

 * Which operating system do you use?
 * Which exact commands did you use to install grass 6.4 and which to
 install grass 6.3?
 * Why do you need both, version 6.3 and 6.4?


 Now partially answering:

 * You are not forced to compile grass by yourself. There are
 binaries
 ready-to-(install)use.
 * Of course you can clean old libraries. If you installed grass from
 ubuntu's repository for example, it should be easy to clean
 everything
 by just removing it (preferably with sudo apt-get purge grass).

 BTW, Jachym Cepicky's repository [1] is AFAIK always more up-to-date
 than ubuntu's repositories.

 Kind regards, Nikos

 ---
 [1] http://les-ejk.cz/ubuntu/

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




 if you use windows xp sp2 this may help. i got this from internet

 best

 zahid
 
 ___
 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] How update vector layers?

2009-03-06 Thread Vincent Bain
Hi Thybério,

it is actually v.patch that you need to run for this purpose (AFAIU your
problem). v.patch allows to merge several maps with attribute
preservation (-e flag), but it only works for layer 1 features. I
suggest you to check if each linked table has the same columns
definition.

Instead of creating a new merge map, you can choose the append file
to existing file option (-a flag), then be carefull with the advice
given in the man page : When using the -a flag, the user has to make
sure that the features in the different maps added to the output map do
not have overlapping category numbers, unless identical category numbers
reflect identical attributes, otherwise the attributes of the added maps
are lost.

After you perform v.patch don't forget to clean your vector (e.g.
removing duplicate features with v.clean)

Good luck,
Vincent

Le jeudi 05 mars 2009 à 21:38 -0300, Thybério Luna Freire a écrit :
 I have a location with sugarcane areas. They are in a vector layer and
 each area have a line in a table in a pg database. There are new areas
 being planted in the farm and i have them in a shape file. I imported
 the new vectors and i want put them into the layer sugarcane to
 update it. My question is: how can i do it without interfering in the
 table structure and without to need create a new table? I tried
 v.overlay, but it adds new columns to the new table and a don't want i
 new table. Then, i tried v.patch, but this module is not apropriated
 to do this. It looks like very simple to do, but simply don't know
 how.
 Help me!!
 
 Thybério Luna - Brazil
 ___
 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] choropleth maps and black and white printing

2009-03-06 Thread Moritz Lennert

On 04/03/09 19:41, kries wrote:

I'll probably follow MacEachran and use dots with varying size and spacing. I
don't suppose this can be achieved from within grass?


You should be able to achieve this with the pat option in the vareas 
command of ps.map (please make your patterns publicly available [1]).


Moritz

[1]http://grass.osgeo.org/wiki/AreaFillPatterns
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] scripting mapcalc

2009-03-06 Thread Daniel Victoria
Hi Glynn,

That is good to know. I started using that form because I would always
get confused with ' and  so I though that using the echo command
would be safer. But now that I know better, my scripts will be simpler

Daniel

On Fri, Mar 6, 2009 at 1:41 AM, Glynn Clements gl...@gclements.plus.com wrote:


 There is no advantage to using the above form. Even if you use:

        r.mapcalc river = if(river == $old, $new, null())

 the variables are still expanded by the shell.

 --
 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] scripting mapcalc

2009-03-06 Thread Nikos Alexandris

Nikos:
  Try this:
  r.mapcalc river=if(river==$old, $new, null())


Glynn:
 Note that this won't work in 7.0, where r.mapcalc uses the parser. It
 will complain that r.mapcalc doesn't have a river=... option.

 For portability, always:

 1. quote the entire expression, and
 2. insert a space before the first = sign, e.g.:

   r.mapcalc river = if(river==$old, $new, null())

 This will work with all versions of r.mapcalc.


Thanks Glynn.

I assume the above tips are valid for normal r.mapcalc use, that is
not within from a script. Having a space before the 1st = sign is in
addition more clear/easy to read when it comes to lots and long
r.mapcalc one-liners, one after another.

Kind regards, Nikos

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


Re: [GRASS-user] choropleth maps and black and white printing

2009-03-06 Thread kries

great,
thank you Moritz



Moritz Lennert wrote:
 
 On 04/03/09 19:41, kries wrote:
 I'll probably follow MacEachran and use dots with varying size and
 spacing. I
 don't suppose this can be achieved from within grass?
 
 You should be able to achieve this with the pat option in the vareas 
 command of ps.map (please make your patterns publicly available [1]).
 
 Moritz
 
 [1]http://grass.osgeo.org/wiki/AreaFillPatterns
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user
 
 

-- 
View this message in context: 
http://n2.nabble.com/choropleth-maps-and-black-and-white-printing-tp2423205p2435186.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] scripting mapcalc

2009-03-06 Thread Glynn Clements

Nikos Alexandris wrote:

 Nikos:
   Try this:
   r.mapcalc river=if(river==$old, $new, null())
 
 
 Glynn:
  Note that this won't work in 7.0, where r.mapcalc uses the parser. It
  will complain that r.mapcalc doesn't have a river=... option.
 
  For portability, always:
 
  1. quote the entire expression, and
  2. insert a space before the first = sign, e.g.:
 
  r.mapcalc river = if(river==$old, $new, null())
 
  This will work with all versions of r.mapcalc.
 
 
 Thanks Glynn.
 
 I assume the above tips are valid for normal r.mapcalc use, that is
 not within from a script.

The above applies both to scripting and interactive use.

 Having a space before the 1st = sign is in addition more clear/easy
 to read when it comes to lots and long r.mapcalc one-liners, one
 after another.

In general, it's preferable to do as much as possible in each
r.mapcalc command. E.g. rather than:

r.mapcalc $GIS_OPT_OUTPUT.r = r#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + 
(1.0 - .$GIS_OPT_PERCENT) * r#$GIS_OPT_SECOND
r.mapcalc $GIS_OPT_OUTPUT.g = g#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + 
(1.0 - .$GIS_OPT_PERCENT) * g#$GIS_OPT_SECOND
r.mapcalc $GIS_OPT_OUTPUT.b = b#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + 
(1.0 - .$GIS_OPT_PERCENT) * b#$GIS_OPT_SECOND

use:

r.mapcalc EOF
$GIS_OPT_OUTPUT.r = r#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + (1.0 - 
.$GIS_OPT_PERCENT) * r#$GIS_OPT_SECOND
$GIS_OPT_OUTPUT.g = g#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + (1.0 - 
.$GIS_OPT_PERCENT) * g#$GIS_OPT_SECOND
$GIS_OPT_OUTPUT.b = b#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + (1.0 - 
.$GIS_OPT_PERCENT) * b#$GIS_OPT_SECOND
EOF

as the latter will read each input map only once.

It should only be necessary to use multiple, consecutive r.mapcalc
commands if each command uses the output map(s) from the previous
command.

Even then, note that a top-level assignment treats the LHS as both an
output map and a variable, and you can use the variable in subsequent
commands, e.g.:

r.mapcalc EOF
outmap = ...
outmap_i = round(outmap)
EOF

However, you can't use any modifiers (neighbourhood, category, RGB,
etc) in this way, as modifiers only work on maps, not variables, and
the output map isn't available as an input map until r.mapcalc
completes.

-- 
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] scripting mapcalc

2009-03-06 Thread Patton, Eric
In general, it's preferable to do as much as possible in each
r.mapcalc command. E.g. rather than:

   r.mapcalc $GIS_OPT_OUTPUT.r = r#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + 
 (1.0 - .$GIS_OPT_PERCENT) * r#$GIS_OPT_SECOND
   r.mapcalc $GIS_OPT_OUTPUT.g = g#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + 
 (1.0 - .$GIS_OPT_PERCENT) * g#$GIS_OPT_SECOND
   r.mapcalc $GIS_OPT_OUTPUT.b = b#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + 
 (1.0 - .$GIS_OPT_PERCENT) * b#$GIS_OPT_SECOND

use:

   r.mapcalc EOF
   $GIS_OPT_OUTPUT.r = r#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + (1.0 - 
 .$GIS_OPT_PERCENT) * r#$GIS_OPT_SECOND
   $GIS_OPT_OUTPUT.g = g#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + (1.0 - 
 .$GIS_OPT_PERCENT) * g#$GIS_OPT_SECOND
   $GIS_OPT_OUTPUT.b = b#$GIS_OPT_FIRST * .$GIS_OPT_PERCENT + (1.0 - 
 .$GIS_OPT_PERCENT) * b#$GIS_OPT_SECOND
   EOF

as the latter will read each input map only once.

This is really good to know, thanks! I've added this hint to r.mapcalc.html in 
trunk (r36207) and devbr6 (36208).

~ Eric.

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


Re: [GRASS-user] Determine surface areas

2009-03-06 Thread Nikolaus Arnold

Finally got it.

Import map:
v.in.dxf

created areas:
v.type input=map1 output=map2 type=line,boundary
v.clean input=map2 output=map3 tool=snap thresh=0.0001
v.centroids input=map3 output=map4 option=add

checked with v.digit (strangely v.centroids always categorized in the same
way, but in the outer ring it mixed up two areas, but that was easily
corrected by manually changing those two categories)

v.to.rast use=cat

masked with rastermap - watercellvalue

r.report


thanks a lot
Nikolaus


Am Freitag, 6. März 2009 09:25:45 schrieb Markus Metz:

Moritz Lennert wrote:
 On 05/03/09 23:15, i...@the-masterplan.net wrote:
 Hi!

 I am still working on the extended problem and so far i have done the
 following.
 I created circles and sectors in autocad and imported the dxf file
 (first
 one sector at a time).
 The import didn't seem to work that well, so i converted lines to
 boundaries and used v.clean to get areas, and inserted a centroid with
 v.digit and created a rastermap with v.to.rast (source: val, and
 featuretype area).
 using the rastermap as mask I can use r.report or r.stats to get the
 waterarea/watercells.

 Because there are 160 of these areas i was wondering if there is a
 possibility to use all of the areas at once (or at least more than
 one at
 a time) assign some kind of an ID to every area and get the results
 separately for every area.
 trying to use more than one area at a time always got me the total 

stats

 for all areas.

 Just give each centroid a different category value (e.g. using
 v.category, or by hand using v.digit), then v.to.rast use=cat. Then
 r.stats/r.report should give you the result by category.

Or v.to.db option=area?

Markus M




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