[GRASS-user] r.in.wms and d.wms difference

2016-05-25 Thread Martin Album Ytre-Eide
Hello list!

For me the d.wms in the gui works perfect. But when I script, I need to 
download the wms layer (?) and for that I use r.in.wms which works, but gives 
not as pleasant image. The image looks distorted in some way. I can adjust it 
some with different 'g.region res='

When I in the gui (using d.wms) choose the save the layer - I get the same as 
for r.in.wms - which I guess is used for saving.

I looked into the d.wms.py script to try to reproduce what d.wms does, but I 
can not get the right input to wms.GetMap(options,flags)  - And I can't find 
any good documentation.

from wms_drv import WMSDrv
wms = WMSDrv()

I don't really need to dowload the wms, but I want to use it as a background 
when scripting.

Is there maybe a way to use d.wms when scripting?


Martin


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

Re: [GRASS-user] d.text greek letters.

2016-05-19 Thread Martin Album Ytre-Eide
Great! Thanks a lot Vaclov! :)

os.environ['GRASS_FONT']='Ubuntu:Regular'

did the trick for me - of course I am on Ubuntu :)

Thanks for the wxPython text explanation - I was wondering if there where some 
other d.text-function I might use in my scripting.

Actually d.text in the gui crashed when I tried it (several times without 
any greek letters)

Thanks again!

Hope to see you in Bonn

Cheers

Martin


Fra: Vaclav Petras [wenzesl...@gmail.com]
Sendt: 18. mai 2016 16:05
Til: Martin Album Ytre-Eide
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] d.text greek letters.

Hello Martin,

On Wed, May 18, 2016 at 8:30 AM, Martin Album Ytre-Eide 
<martin.album.ytre-e...@nrpa.no<redir.aspx?REF=0ttkY6nIrJupCR7XQZZ8PTzl5wgHhbzIWrqK6QB9Lr0KnZJCt3_TCAFtYWlsdG86TWFydGluLkFsYnVtLll0cmUtRWlkZUBucnBhLm5v>>
 wrote:
I am struggling with using the greek letter µ in my d.text from a python script:

I trying something like this

Module('d.text',text='µ',at=('85','20') charset='utf8')

you need to set GRASS_FONT to some font which supports Greek letters. Use 
d.fontlist or d.font -l to get the proper names of fonts. This works for me in 
command line on Ubuntu:

export GRASS_FONT=Ubuntu:Regular
d.mon wx0
d.text text=θωερτψυιοπασδφγηςκλζχξωβνμάέήίϊΐόύϋΰώ at=5,95


I know that the issue is with the encoding of the characters. but I do not 
know how to fix it.

I'm not sure which operating system you are using but on Linux, you usually 
don't need to set the font, everything is UTF-8.


In the gui i can use µ with add text layer - so I guess this is a python to 
grass issue.

The behavior is different (for good or bad) - in GUI, d.text is actually not 
used and wxPython text drawing is used instead.

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

[GRASS-user] d.text greek letters.

2016-05-18 Thread Martin Album Ytre-Eide
Hello list.

I am struggling with using the greek letter µ in my d.text from a python script:

I trying something like this

Module('d.text',text='µ',at=('85','20') charset='utf8')

I know that the issue is with the encoding of the characters. but I do not 
know how to fix it.

In the gui i can use µ with add text layer - so I guess this is a python to 
grass issue.

I trying to write a png-file. I guess a could use the ps.map, but I rather not.

I using grass 7.0.4

anyone know what to do?

Martin

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

Re: [GRASS-user] r.category value range

2015-02-05 Thread Martin Album Ytre-Eide
Hey, thanks!

r.recode worked for me. As mentioned r.category clames it can do this, and in 
different cases - it might be more usefull to work with labels. I was trying to 
add labels and then do a r.mapcalc expression=snow_type= @lwc_2014_05_15  
in order to use the labels as values. But r.recode did this in one go, so that 
was better. But if one was to use the labels in a label instead of the values - 
it would be good if the r.category worked as intended. I think I have done that 
before, so maybe label range (with r.category) works with d.legend? - did you 
try this Moritz?

Martin



Fra: grass-user-boun...@lists.osgeo.org [grass-user-boun...@lists.osgeo.org] 
p#229; vegne av Moritz Lennert [mlenn...@club.worldonline.be]
Sendt: 4. februar 2015 16:55
Til: Markus Metz
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] r.category value range

On 04/02/15 15:51, Moritz Lennert wrote:
 On 04/02/15 15:45, Moritz Lennert wrote:
 On 04/02/15 15:23, Markus Metz wrote:
 On Wed, Feb 4, 2015 at 1:14 PM, Moritz Lennert
 mlenn...@club.worldonline.be wrote:
 On 04/02/15 11:48, Martin Album Ytre-Eide wrote:

 Hello!

 I trying to set a label  for a range of values in  a raster.

 I am using r.category (grass 7.0)

 r.category map=lwc_2014 separator=':' rules=lwc.rules

 My lwc.rules looks like this:

 0:30:0.9
 31:90:0.7
 91:252:0.5

 so, r.category does not seem to read my range, but in stead gives me
 labels for value 31 (label=90:0.7) and value 91 (label=252:0.5)

 Any clues to what I am doing wrong ? or is r.category not working as
 intended?


 You should use r.recode, not r.category.

 According to the manual, r.category should work with these rules.

 You're right. Sorry, I wrote to fast.

 Actually the manual also says concerning the example: The format is
 given as follows (when separator is set to colon). So, AFAIU, you have
 to set the separator parameter to whatever separator you use in the rules.


 Sorry, I really should take the time before I write. I can reproduce the
 issue actually:


 g.copy raster=geology_30m,mygeol
 r.category mygeol rules=- separator=':' EOF
 217:270:1
 405:862:2
 910:948:3
 EOF
 r.category mygeol
 217   270:1
 262
 270
 405   862:2
 583
 720
 766
 862
 910   948:3
 921
 945
 946
 948

 So, yes, there seems to be a bug in r.category. Please file a ticket.

Looking at the code, I actually think that r.category works well in
terms of setting the label for the range. At least the cats file reads:

# 948 categories


0.00 0.00 0.00 0.00
217:270:1
405:862:2
910:948:3

which looks correct to me.

However, it does not know how to display it in a decent manner. The same
goes for d.legend. Or r.what. IIUC, modules that read cat values just
don't seem to have been foreseen for this case.

So, for the OP, I would go back to my original answer to suggest using
r.recode.

And maybe someone who understands the code better than me can clarify
how GRASS is supposed to actually use such range labels ?

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


[GRASS-user] r.category value range

2015-02-04 Thread Martin Album Ytre-Eide
Hello!

I trying to set a label  for a range of values in  a raster.

I am using r.category (grass 7.0)

r.category map=lwc_2014 separator=':' rules=lwc.rules

My lwc.rules looks like this:

0:30:0.9
31:90:0.7
91:252:0.5

so, r.category does not seem to read my range, but in stead gives me labels for 
value 31 (label=90:0.7) and value 91 (label=252:0.5)

Any clues to what I am doing wrong ? or is r.category not working as intended?

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

Re: [GRASS-user] Interpolation method for parallel samples

2015-01-05 Thread Martin Album Ytre-Eide
Thanks for your answer Markus! 

Here are my thoughts and trials: 

The normal screen output when running v.surf.bspline looks something like this:

Reading values from attribute table...
Initializing output...
 100%
Load masking map
 100%
Processing subregion 1 of 25...
  90%

##
..but when running with  ew_step=50 and ns_step=1000, I get:

Reading values from attribute table...
Initializing output...
 100%
Load masking map
 100%
 100%
 100%
 100%
  10%

... and it does not seem to finish at any point.

Even setting the ew_step=90 generates the same behaviour.

My result with 100 and 1000 is not that bad actually - I might say I'm happy 
with that.

 I am experimenting with v.surf.rst, but for some reason it ignores a lot of 
points (to dence). I also don't know if I understand the theta and scalex 
parameters. For me, it seems they are optimizing the results from a feature 
that is anisotropic. Does this feature in my case mean my area with samples 
that I wont to interpolate? My area is somewhat rectangular - being about twice 
the size in the nort-south direction, but my data - as I mentioned , are spaced 
by 50 m in the e-w direction and 1000 m in the n-s directions. So what combo of 
theta and scalex should I use?

Thanks!

Martin

___
Fra: Markus Metz [markus.metz.gisw...@gmail.com]
Sendt: 17. desember 2014 22:11
Til: Martin Album Ytre-Eide
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] Interpolation method for parallel samples

Martin Album Ytre-Eide wrote:
 Hello!

 I have airborne gamma measurements obtain in lines. The spatial distance
 between the 'points' along the line is 50m (e-w direction) and the spatial
 distance between the lines is 1000m (n-s direction)

 I am currently experimenting with the v.surf.bspline function - setting
 ew_step=100 and ns_step=1000. I am having trouble setting the ew_step any
 lower.?

What exactly is the trouble with setting ew_step any lower? In theory,
it should be possible to set ew_step to any value.

Markus M

 I am also using the smoothing parameter lambda_i.

 If anyone have some interpolation tips with this type of data - I would be
 happy to hear about it.



 Martin

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


[GRASS-user] Interpolation method for parallel samples

2014-12-12 Thread Martin Album Ytre-Eide
Hello!

I have airborne gamma measurements obtain in lines. The spatial distance 
between the 'points' along the line is 50m (e-w direction) and the spatial 
distance between the lines is 1000m (n-s direction)

I am currently experimenting with the v.surf.bspline function - setting  
ew_step=100 and ns_step=1000. I am having trouble setting the ew_step any 
lower.? I am also using the smoothing parameter lambda_i.

If anyone have some interpolation tips with this type of data - I would be 
happy to hear about it.



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

[GRASS-user] Gauss filter in r.neighbors

2014-10-02 Thread Martin Album Ytre-Eide
Hello!

I am using the the r.neighbors function and I have an idea about what the 
'Gauss' parameter will do for me, but I can't find any documentation for it. 
Experimenting with it, left me clueless.

What I won't to do:
Apply a Gaussian weighting of cell neighbors and sum the values of the 
neighbors. If all cells=1, I would get  only 1's back. I have a map of zeros 
and ones. I tried this:

r.neighbors -c input='input_map' output='output_map' method=sum gauss=10 size=33

The result is a map with only zeros. So, my question is: What does 'gauss' do? 
I' am guessing I am using it wrong but I would like to know.

Best regards,

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

Re: [GRASS-user] Gauss filter in r.neighbors

2014-10-02 Thread Martin Album Ytre-Eide
Hello and thanks a lot!

I followed you examples and it did not work in grass 6.4.4 so I tried them in 
grass7.1 and they worked for me as well.

Tried my map - and it worked. I result looks good :)

Thanks!

(maybe there is a problem in r.neighbors for grass 6.4.4?)

Martin


Fra: Glynn Clements [gl...@gclements.plus.com]
Sendt: 2. oktober 2014 14:27
Til: Martin Album Ytre-Eide
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] Gauss filter in r.neighbors

Martin Album Ytre-Eide wrote:

 I am using the the r.neighbors function and I have an idea about
 what the 'Gauss' parameter will do for me, but I can't find any
 documentation for it. Experimenting with it, left me clueless.

Using gauss= is equivalent to using weight= with a weights file
corresponding to a Gaussian filter.

The exact weights which are used can be found in the
gaussian_weights() function in raster/r.neighbors/readweights.c. They
are effectively:

ncb.weights[i][j] = exp(-(x*x+y*y)/(2*sigma2))/(2*M_PI*sigma2);

where x, y is the offset (in cells) from the centre of the
neighbourhood and sigma2 is the square of the value passed to the
gauss= option.

 What I won't to do:

 Apply a Gaussian weighting of cell neighbors and sum the values of
 the neighbors. If all cells=1, I would get only 1's back.

You need to use method=average to make the effective weights sum to
one (when weights are used, method=average divides the weighted sum of
the cell values by the sum of the weights).

IIRC, the weights are such that they would sum to one if you had an
infinitely-large neighbourhood, but the fact that you're cropping the
curve to a finite neighbourhood means that the sum will always be less
than one.

The weights are determined by sigma alone, and are unaffected by the
neighbourhood size.

 I have a map of zeros and ones. I tried this:

 r.neighbors -c input='input_map' output='output_map' method=sum gauss=10 
 size=33

 The result is a map with only zeros.

It works for me; e.g.

$ r.mapcalc --o 'foo = rand(0,2)' seed=1
$ r.neighbors --o -c in=foo out=bar method=average size=33 gauss=10
$ r.info -r bar
min=0.44217781042
max=0.568925311919939
$ r.neighbors --o -c in=foo out=bar method=sum size=33 gauss=10
$ r.info -r bar
min=0.0985901293262625
max=0.449425795562072

$ r.mapcalc --o 'foo = 1'
$ r.neighbors --o -c in=foo out=bar method=average size=33 gauss=10
$ r.info -r bar
min=1
max=1
$ r.neighbors --o -c in=foo out=bar method=sum size=33 gauss=10
$ r.info -r bar
min=0.221413499330273
max=0.812157275619236

--
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] digitizer

2014-01-02 Thread Martin Album Ytre-Eide
Ok, so  I got grass70 working with digitizer - the do and undo buttons worked 
good. But I could not get solve my original probelm. I will try qgis now I 
think.

martin


Fra: Vaclav Petras [wenzesl...@gmail.com]
Sendt: 14. desember 2013 06:14
Til: Martin Album Ytre-Eide
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] digitizer




On Fri, Dec 13, 2013 at 6:03 AM, Martin Album Ytre-Eide 
martin.album.ytre-e...@nrpa.nomailto:martin.album.ytre-e...@nrpa.no wrote:
Hello all.

I have been trying the digitizer in 6.4.2, and I am having several 
difficulties. I am working with a polygon map, and as a test, I am trying to 
create a polygon which I try split into four smaller polygons. First I divide 
it in half and then a divide one of the new halves in two. Afterwards, I have 
generated centroids for the area. I have used only the new boundary tool for 
this - and that may be wrong? But I have tried some other options without any 
luck.

Does anyone know how to do this? There also seems to be a problem that the map 
is saved even though I say no thanks. So, if you do a mistake - it could be 
hard to fix - is there an undo function in an other version?

Hi, I'm not using digitizer regularly, so I cannot answer you first question. 
However, there are definitively some improvements in GRASS 7 digitizer 
including the undo button. I'm not sure about GRASS 6.4.3, so if nightly build 
(or what ever) of GRASS 7 is acceptable for you, try it.

Thanks!

Martin

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

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

[GRASS-user] digitizer

2013-12-13 Thread Martin Album Ytre-Eide
Hello all.

I have been trying the digitizer in 6.4.2, and I am having several 
difficulties. I am working with a polygon map, and as a test, I am trying to 
create a polygon which I try split into four smaller polygons. First I divide 
it in half and then a divide one of the new halves in two. Afterwards, I have 
generated centroids for the area. I have used only the new boundary tool for 
this - and that may be wrong? But I have tried some other options without any 
luck.

Does anyone know how to do this? There also seems to be a problem that the map 
is saved even though I say no thanks. So, if you do a mistake - it could be 
hard to fix - is there an undo function in an other version?

Thanks!

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

Re: [GRASS-user] Grass PostgreSQL problem

2013-10-01 Thread Martin Album Ytre-Eide
SOLVED - somehow. 
I thought that this was a unix domain socket problem, but It was not. (I help 
to look at the db.test output :) )

I upgraded both psql and postgres to 9.1 and had it working. 
I made pgadmin3 up and running. (fixed privliges and div. for postgres and my 
user name).
Made changes to the .grasslogin64.

I have earlier done some changes to pg_hba.conf. - suggested by Markus. - 
changed some connections to trust.

tried db.test, and everything seems fine. Hope this can help others.

Martin



Fra: grass-user-boun...@lists.osgeo.org [grass-user-boun...@lists.osgeo.org] 
p#229; vegne av Martin Album Ytre-Eide [martin.album.ytre-e...@nrpa.no]
Sendt: 27. september 2013 12:46
Til: Markus Neteler
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] Grass PostgreSQL problem

After trying different options - I now get :
DBMI-Postgres driver error:
Cannot connect to Postgres: could not connect to server: No such file or 
directory
Is the server running locally and accepting
connections on Unix domain socket /var/run/postgresql/.s.PGSQL.5432?
(The same problem for grass 6.4.2)

Postgres use the unix_domain_socket /tmp/ - so it seems to me that grass is 
listening to the wrong place. This could be changed in  postgresql.conf file at 
database build time.

Is there a way to change what unix_domain_socket grass is listening to?

postgres server and databases seems to be working ok, and I can connect trough 
psql.

Martin




Fra: neteler.os...@gmail.com [neteler.os...@gmail.com] p#229; vegne av Markus 
Neteler [nete...@osgeo.org]
Sendt: 26. september 2013 12:11
Til: Martin Album Ytre-Eide
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] Grass70 PostgreSQL problem

On Wed, Sep 25, 2013 at 10:51 AM, Martin Album Ytre-Eide
martin.album.ytre-e...@nrpa.no wrote:
 Hello all.

 I have done this before on different installs, but this time I can't get it
 right.

 I am trying to add a table to a postgres database, by importing a .shp-file.
 It fails to import the table and gives this error:

 DBMI-PostgreSQL driver error:
 Connection failed.
 fe_sendauth: no password supplied

This is probably a backend setup error (not related to GRASS itself).
See for example (random link):

http://superuser.com/questions/565510/postgresql-authentication-failure-with-trust-option

Markus
___
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 PostgreSQL problem

2013-09-27 Thread Martin Album Ytre-Eide
After trying different options - I now get :
DBMI-Postgres driver error:
Cannot connect to Postgres: could not connect to server: No such file or 
directory
Is the server running locally and accepting
connections on Unix domain socket /var/run/postgresql/.s.PGSQL.5432?
(The same problem for grass 6.4.2)

Postgres use the unix_domain_socket /tmp/ - so it seems to me that grass is 
listening to the wrong place. This could be changed in  postgresql.conf file at 
database build time.

Is there a way to change what unix_domain_socket grass is listening to?

postgres server and databases seems to be working ok, and I can connect trough 
psql. 

Martin




Fra: neteler.os...@gmail.com [neteler.os...@gmail.com] p#229; vegne av Markus 
Neteler [nete...@osgeo.org]
Sendt: 26. september 2013 12:11
Til: Martin Album Ytre-Eide
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] Grass70 PostgreSQL problem

On Wed, Sep 25, 2013 at 10:51 AM, Martin Album Ytre-Eide
martin.album.ytre-e...@nrpa.no wrote:
 Hello all.

 I have done this before on different installs, but this time I can't get it
 right.

 I am trying to add a table to a postgres database, by importing a .shp-file.
 It fails to import the table and gives this error:

 DBMI-PostgreSQL driver error:
 Connection failed.
 fe_sendauth: no password supplied

This is probably a backend setup error (not related to GRASS itself).
See for example (random link):

http://superuser.com/questions/565510/postgresql-authentication-failure-with-trust-option

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


[GRASS-user] Grass70 PostgreSQL problem

2013-09-25 Thread Martin Album Ytre-Eide
Hello all.

I have done this before on different installs, but this time I can't get it 
right.

I am trying to add a table to a postgres database, by importing a .shp-file. It 
fails to import the table and gives this error:

DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied

I have set the password like this
db.login driver=pg database=marine_box user=xxx password=xxx
and the connection like this:
db.connect driver=pg database=host=localhost,dbname=marine_box

Is this not  way to do it?

I also tried to copy a table from dbf to pg without success.

are there any other parameters that need to be set?

I installed grass70 using the ppa found here:
https://launchpad.net/~grass/+archive/grass-devel

I have also recently upgraded to ubuntu 13.04

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

[GRASS-user] Bar in ps.map

2013-02-22 Thread Martin Album Ytre-Eide
Hello all.

is it possible to bars in ps.map - like you would do in v.thematic.chart ?

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


[GRASS-user] v.to.rast not working?

2012-12-07 Thread Martin Album Ytre-Eide
Hi all.

When V.to.rast starts - my computer hangs. It takes most of memory  and I have 
to kill the process to get my laptop back. I first encountered this whil trying 
to run v.rast.stats. Later I just tried to run v.to.rast whith the same error. 
It seems to run (taking all memory and much time) Loading data...
Pass 1 of 58:
Reading features...
 100%
Writing raster map...
Killed
GRASS 6.4.2

I tried waiting for a while after Writing raster map  but no luck.

Any help or suggestions for diagnostic is welcome..


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


Re: [GRASS-user] v.in.lines not working in Python script

2012-12-07 Thread Martin Album Ytre-Eide
As I remember you might need to have write NaN|NaN  after each line in your 
file. ( I have a python script doing this for a large set of lines). But if you 
only have one  line this might not be your issue.

Have you tried doing it from the command line? (yes, you should work in a linux 
environment ;)

Martin



Fra: grass-user-boun...@lists.osgeo.org [grass-user-boun...@lists.osgeo.org] på 
vegne av Andrés Silva [andres.silv...@gmail.com]
Sendt: 7. desember 2012 13:05
To: GRASS Users list
Emne: [GRASS-user] v.in.lines not working in Python script

I get the following error when I use v.in.lines in a Python Script in Windows 
(sorry):

C:\Program Files\GRASS 6.4.2\scripts\v.in.lines: 126: v.in.mapgen: command not 
found

My script It's quite simple:

import grass.script as g
g.run_command('v.in.lines', input='points.txt', output='contour')

And my point.txt file:

-71.20805823448374|-30.59771251456061
-71.20765621447394|-30.5974583122
-71.20736018153805|-30.59778541778508
-71.20648094588758|-30.59723716721055
-71.20723941992262|-30.59621434252238
-71.20833309148421|-30.59734839427609
-71.20805823448374|-30.59771251456061

Others commands work find (like v.in.ascii)... and v.in.mapgen is in the folder.

Any idea?

Andrés Silva Marambio
Ingeniero Agrónomo, Mención en Gestión Ambiental
Pontificia Universidad Católica de Valparaíso

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


Re: [GRASS-user] v.krige and v.autokrige

2012-12-06 Thread Martin Album Ytre-Eide
Hello all. 

I have not seen a reply yet and I am just wondering if it is stuck in some 
spam-filter or if there are some other problem?

Martin


-Opprinnelig melding-
Fra: Anne Ghisla [mailto:a.ghi...@gmail.com] 
Sendt: 7. november 2012 11:33
Til: Martin Album Ytre-Eide; grass-user@lists.osgeo.org
Kopi: Margherita Di Leo
Emne: Re: [GRASS-user] v.krige and v.autokrige

On Tue, 6 Nov 2012 14:06:36 +0100
Margherita Di Leo direg...@gmail.com wrote:

 -- Forwarded message --
 From: Martin Album Ytre-Eide martin.album.ytre-e...@nrpa.no
 Date: Tue, Nov 6, 2012 at 2:02 PM
 Subject: [GRASS-user] v.krige and v.autokrige
 To: grass-user@lists.osgeo.org grass-user@lists.osgeo.org
 
 
  Hello all.

Hi all,

thanks Margherita for forwarding the mail.

 Is v.krige working with grass 6.4.2? I'm not able to install it.
 v.autokrige installs seems to install, but does not work. I use 
 g.extension

v.krige is not currently working, due to GUI reorganisation and also issues 
with rpy2 library. I will give it a more accurate look in next days and tell 
you when it will be functioning again.

Best,
Anne
--
http://wiki.osgeo.org/wiki/User:Aghisla
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] v.krige and v.autokrige

2012-11-06 Thread Martin Album Ytre-Eide
Hello all.

Is v.krige working with grass 6.4.2? I'm not able to install it. v.autokrige 
installs seems to install, but does not work. I use g.extension

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


Re: [GRASS-user] before v.vect.stats

2012-10-09 Thread Martin Album Ytre-Eide
Thanks!  

I ment GRASS 7 ;)

g.extention extention=v.vect.stats   

worked very well.

Martin 



Fra: neteler.os...@gmail.com [neteler.os...@gmail.com] p#229; vegne av Markus 
Neteler [nete...@osgeo.org]
Sendt: 8. oktober 2012 11:30
To: Martin Album Ytre-Eide
Cc: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] before v.vect.stats

On Mon, Oct 8, 2012 at 10:45 AM, Martin Album Ytre-Eide
martin.album.ytre-e...@nrpa.no wrote:
 Hello all.

 I see that in 6.7 there is a v.vect.stats function which I would like to

[you mean GRASS 7.scvn]

 use. However, I  am running 6.4.2 and don't want to install 6.7 (again).

You can install v.vect.stats via the extension manager in GRASS 6.

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


[GRASS-user] v.buffer and categories

2012-10-09 Thread Martin Album Ytre-Eide
Hello all.

I have three points for which I create three areas with v.buffer. However, this 
new polygon map have no attribute table - so I create one with  v.category and 
v.db.addtable. This gives an attribute table with 3 categories but they are all 
linked to all polygons! I won't each polygon to have a separate category.

Anyone knows what to do?

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


[GRASS-user] before v.vect.stats

2012-10-08 Thread Martin Album Ytre-Eide
Hello all.

I see that in 6.7 there is a v.vect.stats function which I would like to use. 
However, I  am running 6.4.2 and don't want to install 6.7 (again).

Anyone knows what was done before? v.to.rast of points and then v.rast.stats?

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


[GRASS-user] wms trouble

2012-04-25 Thread Martin Album Ytre-Eide
Hello!

I am trying to follow the tutorial on:
http://grass.osgeo.org/wiki/WMS

but when I try : r.in.wms output=akl_srtm   
mapserver=http://onearth.jpl.nasa.gov/wms.cgi;   -c layers=worldwind_dem 
format=geotiff style=short_int   maxcols=1600 maxrows=1600

I get:
akl_srtm__0.geotiff' not recognised as a supported file format.

ERROR: r.in.gdalwarp: gdalwarp failure.
ERROR: r.in.gdalwarp failed

It seems this could be related to having different versions installed - so I 
removed my svn installation (6.4.3) - following: 
http://grass.osgeo.org/wiki/Compile_and_Install_Ubuntu

reinstalled with apt-get install grass.

Still - same problem. Can someone help?

Martin

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


SV: [GRASS-user] wms trouble

2012-04-25 Thread Martin Album Ytre-Eide
Thank you for replying. Unfortunatly the file was emty..

I am doing this as a test, because I got this error in the first place. If you 
know a tutorial or a wms I could test - I think that would be a good way to 
start. 

My overal goal is to get wms to work in grass.

Martin



Fra: Hamish [hamis...@yahoo.com]
Sendt: 25. april 2012 13:49
To: grass-user@lists.osgeo.org; Martin Album Ytre-Eide
Emne: Re: [GRASS-user] wms trouble

Martin Album Ytre-Eide wrote:
 akl_srtm__0.geotiff' not recognised as a supported file format.

 ERROR: r.in.gdalwarp: gdalwarp failure.
 ERROR: r.in.gdalwarp failed

find the akl_srtm__0.geotiff file in you filesystem (probably
in $LOCATION/wms_download/ or so) and look inside it. It probably
contains the text of an error message instead of a tiff image.

I have not yet figured a reliable cross platform way for it to
detect that, unfortunately each wms server handles errors in their
own way, so it is not that easy to test for. (sometimes it is
even a graphics image which says error on the tile)

if the akl you seek is in the south pacific, I may be able
to help with alternate sources of the data. (guessing from
airport codes)


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


[GRASS-user] freetype support in grass6.4.2

2011-12-16 Thread Martin Album Ytre-Eide
Hello.

I am using grass6.4.2svn on an ubuntu laptop and I would like to use a 
different font - DejaVuSansMono-Bold. 

I have tried:   grass.run_command('d.text',flags='s' ,at='15,80',size='18', 
text='testings', 
path='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf')
without errors, but no text.

When I try: g.mkfontcap -o extradirs='/usr/share/fonts/truetype/ttf-dejavu/' 
I get :

WARNING: This GRASS installation was compiled without Freetype support,
 extradirs parameter ignored

When I compile I have: --with-freetype 
--with-freetype-includes=/usr/include/freetype2

And for me it seems to compile wtih Freetype support.

What do I do wrong? 


Martin


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


[GRASS-user] divide a vector map in the display monitor.

2011-07-01 Thread Martin Album Ytre-Eide
Hello all!

I am trying to divide a vector map of Norway in the display monitor (I am 
running a python script and using the png-driver).  I have made to separeted 
vector files which I now wont to put next to each other.

I have experimented with using d.frame and d.split.frame - but the results is 
not good. When doing a split the dimensions are lost? - when doing a horizontal 
split the height is set equal which in my case is not correct. When doing a 
vertical split , the heigt is preserved, but the width get messued up.

I have attached a file which shows what I wont to do (except the island in the 
top left corner). 

Anyone knows how this should be done?


Thanks!


Martinattachment: norgeskart.jpg___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


SV: [GRASS-user] Re: Limit d.raster with vector map

2011-07-01 Thread Martin Album Ytre-Eide
Thanks!

I also got an answer from Sylvain (see under). I tested both methods, but the 
best (and safest) is v.to.rast and r.mask. Worked nicely!
I was kind of hoping that was a function for this..well it is not to hard 
to do when scripting.

Thanks.

Martin



hi,

2 ways to do that:
- set the region extents to match the vector map (g.region vect=your_vector)
- transform the vector into raster (v.to.rast), then use this new raster as a 
mask


Sylvain



Fra: grass-user-boun...@lists.osgeo.org 
[mailto:grass-user-boun...@lists.osgeo.org] På vegne av Nick Jachowski
Sendt: 30. juni 2011 18:37
Til: Daniel Lee
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] Re: Limit d.raster with vector map

I would do what Daniel said, but use the raster (use command v.to.rast) as a 
mask (use command r.mask) to limit the displayed area to the vector map area.

On Thu, Jun 30, 2011 at 9:40 PM, Daniel Lee 
l...@isi-solutions.orgmailto:l...@isi-solutions.org wrote:
I would do the following, assuming you've got an area vector that's covering
the raster data you want to show:

1. Convert the vector to a raster with r.to.vect
2. Reclassify it so that it's got only two values: 1 and NoData.
3. Multiply the reclassified raster with the raster data that you want to
limit to the area of the vector. The old values will be preserved in the
resulting map because x * 1 = x, but everything that's not collocated with
the vector map will be removed because it's multiplied with NoData.

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Limit-d-raster-with-vector-map-tp6533406p6533536.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.orgmailto:grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

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


[GRASS-user] Limit d.raster with vector map

2011-06-30 Thread Martin Album Ytre-Eide
Is there a way to limit the displayed raster with a vector map? E.g. I have a 
rather large raster and I only want to display the values that are inside a 
vector area. I don't see how this could be done in a simple way, but I am 
thinking it should :) and hopefully there is something I am not seeing or I 
have done some bad research.

Please help.

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


SV: SV: SV: [GRASS-user] Vector map text legend (now more spesific about logarithmic raster legend)

2011-05-27 Thread Martin Album Ytre-Eide
Thanks, this do work and I get an ok label,  But I don't get a smooth gradient 
in this way. Is there a way? 
I am also not getting any category labels I don't understand way they not 
show up at all?

Martin 

-Opprinnelig melding-
Fra: Hamish [mailto:hamis...@yahoo.com] 
Sendt: 25. mai 2011 11:52
Til: Martin Album Ytre-Eide; Moritz Lennert
Kopi: grass-user@lists.osgeo.org
Emne: Re: SV: SV: [GRASS-user] Vector map text legend (now more spesific about 
logarithmic raster legend)

Moritz wrote:

 Martin Album Ytre-Eide wrote:
  I think Arc  copycats use class breaks so much in their legends 
  simply as a matter of ...

(fwiw, those were my words, not Martin's)


 Definitely an interesting debate. But even the author of How to Lie 
 with Maps does not put into question the use of categories in maps...

Perhaps not, but I certainly do! The sensitivity in selection of number of 
histogram breaks when your n is small or not purely a normal distribution is 
hardly a fringe theory or novel insight though, it's basic statistics.

I'm not saying don't use category breaks if you want to, just that if you do, 
be aware of what you're doing and perhaps do some sensitivity trials with 
breaks set at different places and see if your interpretation is the same. It's 
only since I started doing those that I've really been aware how important it 
is.

As earlier mentioned my current favorite method is to have contour lines (ie 
category breaks) drawn over the top of a continuous gradient background. Then 
you get the benefits of both ways.


regards,
Hamish

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


SV: SV: SV: [GRASS-user] Vector map text legend (now more spesific about logarithmic raster legend)

2011-05-25 Thread Martin Album Ytre-Eide
In my case, I am looking for a way to get a logarithmic legend and thought that 
I might use categories for this.
You can set the r.colors -g to get logarithmic scaling of your map, but the 
legend will still be linear. - I can not get a logarithmic legend. I can do 
r.macalc log_map=log(map,10) and get a legend with values I would have to do 
10^x to get the numerical value - so for now I use gimp to change the values 
1,2,3 to 10,100,1000. -but I wish there was another way

Martin

-Opprinnelig melding-
Fra: Moritz Lennert [mailto:mlenn...@club.worldonline.be] 
Sendt: 25. mai 2011 10:05
Til: Martin Album Ytre-Eide
Kopi: 'Hamish'; grass-user@lists.osgeo.org
Emne: Re: SV: SV: [GRASS-user] Vector map text legend (now more spesific about 
logarithmic raster legend)

On 23/05/11 15:34, Martin Album Ytre-Eide wrote:
 I think Arc  copycats use class breaks so much in their legends 
 simply as a matter of the vector-feature heritage of that software; 
 histogram classes make more sense if you start with a number of sparse 
 data points. In raster maps (traditionally GRASS's strong
 point) it is more a case of continuous gradations. shrug; just a small 
 theory.

Classification of data into a limited number of categories is always about 
reduction of information for ease of interpretation. Yes, you can lie with 
maps, but at the same time a series of treatments of information become much 
easier with a reduced set of categories (e.g. 
comparison of situation over time and space).

Definitely an interesting debate. But even the author of How to Lie with Maps 
does not put into question the use of categories in maps...

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


SV: [GRASS-user] Modifying Vector Attribute Table Values

2011-05-24 Thread Martin Album Ytre-Eide
My advise to you: use mysql or postgres. In linux it is very easy to install 
both of these. I think it is easiest to start with mysql, but postgres is 
somewhat better. So if you have good time and will do a lot with vector maps - 
go for postgres (which also have the very interesting postgis feature). If you 
want get on in a hurry - go for mysql with the phpmyadmin interface. Mysql: 
install lamp (linux, apache, mysql, php) and phpmyadmin. For postgres - I like 
the pgadmin3 interface.

You should look at some basic tutorial as well.


Change the database - it's worth the effort.(use db.connect for each mapset 
before you import the maps) It will save you some headache. I do all my queries 
in the database-interface and connect the maps to views or new tables with 
v.db.connect.

Good luck.

Martin 

-Opprinnelig melding-
Fra: grass-user-boun...@lists.osgeo.org 
[mailto:grass-user-boun...@lists.osgeo.org] På vegne av Rich Shepard
Sendt: 24. mai 2011 02:00
Til: grass-us...@lists.osgeo.org
Emne: Re: [GRASS-user] Modifying Vector Attribute Table Values

On Mon, 23 May 2011, Rich Shepard wrote:

  In GRASS-6.x is there a way to modify the data in the default .dbf 
 vector attribute tables?

   This is interesting. I opened the .dbf in OO.o and there are the county 
names in the attribute column, 'NAMES'. When I query the table with the db.* 
tools I don't see the names, only the numbers in the previous two columns.

   Also, when I try to export the table I see errors and nothing is exported:

GRASS 6.5.svn (Nevada-aea):~/grassdata  db.out.ogr in=county_bnd 
dsn=/home/rshepard/counties for=CSV
WARNING: The map contains islands. To preserve them in the output map, use
  the -c flag
WARNING: 47 boundary(ies) found, but not requested to be exported. Verify
  'type' parameter.
WARNING: 17 centroid(s) found, but not requested to be exported. Verify
  'type' parameter.
WARNING: 17 areas found, but not requested to be exported. Verify 'type'
  parameter.
WARNING: No points found, but requested to be exported. Will skip this
  geometry type.
WARNING: Nothing to export

   If I'm asking for attribute data to be exported from the .dbf why do I get 
errors about geographic attributes?

Confused, but wanting to learn,

Rich
___
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


SV: SV: [GRASS-user] Vector map text legend (now more spesific about logarithmic raster legend)

2011-05-23 Thread Martin Album Ytre-Eide

Hello again. 

I have followed your suggestion about r.catagory with rules like:
1:2:10-100
2:3:100-1000
 etc

r.catagory map='name_map' vals=1,2

Confirms that these categories are present. However I have not been able to 
display these categories with d.legend with a number of combinations of flags 
and range, use etc.

What could I be missing?

Best regards,

Martin


-Opprinnelig melding-
Fra: Hamish [mailto:hamis...@yahoo.com] 
Sendt: 5. april 2011 09:30
Til: grass-user@lists.osgeo.org; Martin Album Ytre-Eide
Emne: Re: SV: [GRASS-user] Vector map text legend

Hamish:
 the way to do this is to use
 r.category to add category labels to each of your four raster 
 category numbers, then use d.legends's -c flag to hide the value of 
 the number, so only the label is displayed.

Martin Album Ytre-Eide wrote:
 This was exactly what I was looking for. This solves many of my legend 
 issues. Thanks a lot.

glad to hear it.

 A follow up question is: Would this be a good way to deal with 
 logarithmic values in a legend?

d.legend use=, but the version from GRASS 6.5 or 7, with Dylan's verbatim patch.
 
 -I convert rasters to have logarithmic values with
 r.mapcal: map = log(old_map,10)
 -This gives me a nice map with a nice legend. One could use r.colors 
 -g (logarithmic scaling), but this messes up the legend - the legend 
 is still linear- and it does not look good.
 -The problem is(my way of doing things) that the category numbers are 
 log values as well(say 1-3-5 insted of 10-1000-10), which there is 
 noting wrong with, it is just not that easy to read.

use= will draw at whatever levels you give it; I plan to backport the 
(anti-)rounding patch for 6.4.2, ie after some time of live testing. see 
https://trac.osgeo.org/grass/ticket/1147
feedback welcome.

 So, is it a good idea to add category labels to all values (or a range 
 of values) x - 10^x ( so for 1, I add 10 and so
 fort) or is it a better way to do this as well?

It's a matter of taste, but personally I am not a fan of band
rendering- where you (as a human) decide to arbitrarily assign the category 
breaks can have a most remarkable(!) effect on how the map is interpreted by 
other humans. See how to lie with statistics, how to lie with maps, and 
other related books  articles. You'll probably be most convinced by your own 
data one day, when you pop one of your own insights after a new rendering.
In nature such thresholds are not so clearly defined. To aid the viewer of a 
figure my favourite method is a continuous color gradation + overlaid contour 
lines.


but anyway, ... the easiest way to display classes from raster data in GRASS is 
to make a r.colors rule set like:

0% blue
25% blue
25% cyan
50% cyan
50% yellow
75% yellow
75% red
100% red

then r.category 'a - b' classes + d.legend use= can work.
hint for the above: remember that if you are careful the map displayed and the 
legend displayed can actually be for two different maps (one of which being a 
dummy which just exists for making the legend).

(note to self- verify that GRASS 7 doesn't optimize that step functionality 
away)


I think Arc  copycats use class breaks so much in their legends simply as a 
matter of the vector-feature heritage of that software; histogram classes make 
more sense if you start with a number of sparse data points. In raster maps 
(traditionally GRASS's strong point) it is more a case of continuous gradations.
shrug; just a small theory.


hope it helps,
Hamish

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


SV: [GRASS-user] Some questions about d.vect and d.rast

2011-04-29 Thread Martin Album Ytre-Eide
My way of using d.vect and d.rast in a python script is by first setting some 
variables and then using d.mon with the png driver:

os.putenv(GRASS_PNGFILE,'%s/%s.png' % (dirname,filename))
os.putenv(.

grass.run_command('d.mon', start='PNG')
grass.run_command('d.rast',
grass.run_command('d.vect',...
grass.run_command('d.mon', stop='PNG')

#If you want to display your map right away you could end your script with 
something like:

os.system(eog '%s/%s.png' % ((dirname,filename))#linux eyes of gnome (eog)

Hope this helps.

Martin

-Opprinnelig melding-
Fra: grass-user-boun...@lists.osgeo.org 
[mailto:grass-user-boun...@lists.osgeo.org] På vegne av Hamish
Sendt: 29. april 2011 00:38
Til: grass-user@lists.osgeo.org; Johannes Radinger
Emne: Re: [GRASS-user] Some questions about d.vect and d.rast

Johannes wrote:
 First I've two general questions about d.vect:
 1) Is it possible to use own symbol for the point icons?

see
 http://grass.osgeo.org/wiki/IconSymbols#Authoring_instructions

 2) How can I change the line type (e.g dashed line, etc.)?

You can't. (only in ps.map)
Maybe it will be possible in grass7?

 I also want to use  d.vect and d.rast in a python script after some 
 other calculations but the maps aren't displayed in the running 
 display-window.

I'll leave that for others to answer.


Hamish

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


[GRASS-user] Grass 7 svn problem

2011-04-15 Thread Martin Album Ytre-Eide
Hello.

I'm trying to get grass 7 with svn checkout 
http://svn.osgeo.org/grass/grass/trunk;

It gets into trouble and I have to do svn up several times (as mentioned in 
other e-mails)

However, it stops completely when it reaches the grasslogo_vector.eps:Could not 
read status line: connection was closed by server 

Anyone knows what to do with this?

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


[GRASS-user] Raster addition

2011-04-14 Thread Martin Album Ytre-Eide
Hello.

I am trying to add some raster maps. I thought I could do this in r.mapcalc, 
but new_map= old_1 + old_2 seems to produce a map where the maps overlap and 
ignoring areas where only on of the maps have values. I would like to do 
something similar to v.overlay operator=or. 

Anyone who knows how to do this?

Martin Ytre-Eide___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


SV: [GRASS-user] Raster addition

2011-04-14 Thread Martin Album Ytre-Eide
I would like the NULL values that overlap with none NULL values to be treated 
as 0, and still have NULL values where both maps have NULL values. The combined 
map would be a large map with NULL values and added values.

Maybe the best way is to use r.null and set NULL values to 0. Add the maps and 
then convert the 0 values to NULL values?
Or could one set the value in the if statement to be a the sum of maps somehow? 
I guess my biggest problem is summing with NULL values - maybe there is a way 
to treat NULL values as 0? I'll have a look at the man page

Thanks,

Martin 

-Opprinnelig melding-
Fra: Moritz Lennert [mailto:mlenn...@club.worldonline.be] 
Sendt: 14. april 2011 14:15
Til: Martin Album Ytre-Eide
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] Raster addition

On 14/04/11 13:54, Martin Album Ytre-Eide wrote:
 Hello.

 I am trying to add some raster maps. I thought I could do this in 
 r.mapcalc, but new_map= old_1 + old_2 seems to produce a map where 
 the maps overlap and ignoring areas where only on of the maps have 
 values.

This is due to the way r.mapcalc handles NULL values. See the man page, section 
NULL support for an explanation.

 I would like to do something similar to v.overlay operator=or.

 Anyone who knows how to do this?

It depends on what you want the new map to contain as values. If you want to 
add the value of old_1 to old_2 in places where they overlap, one way would be 
to transform your null values to 0 using r.null null= and then applying your 
formula.

If you just want a (any) value where one of the maps is non-null, then you can 
use if. Something like this (untested):

new_map = if(!isnull(old_1) || !isnull(old_2), 1, null())

which should give you 1 where any of the two contains a value and a NULL value 
elsewhere.

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


SV: SV: [GRASS-user] Raster addition -Solved

2011-04-14 Thread Martin Album Ytre-Eide
Don't know who of you led me in the right direction, but eventually the line:
C=A + if(isnull(B),0,B) in the manual solved my issue.

New_map = if(isnull(old_1),0,old_1) + if(isnull(old_2,0,old_2)) + etc  and a 
following new_map=if(new_map0,new_map,null())
I had four maps in my case, and that is why new_map = if(!isnull(old_1)  
!isnull(old_2), old_1+old_2,
if(!isnull(old_1)  isnull(old_2), old_1, etc) would become to long (4!=24 
statements?)

Thank you both Johannes and Moritz.

Martin
 

-Opprinnelig melding-
Fra: Johannes Radinger [mailto:jradin...@gmx.at] 
Sendt: 14. april 2011 15:13
Til: Martin Album Ytre-Eide; mlenn...@club.worldonline.be
Kopi: grass-user@lists.osgeo.org
Emne: Re: SV: [GRASS-user] Raster addition


 Original-Nachricht 
 Datum: Thu, 14 Apr 2011 14:31:32 +0200
 Von: Martin Album Ytre-Eide martin.album.ytre-e...@nrpa.no
 An: \'Moritz Lennert\' mlenn...@club.worldonline.be
 CC: grass-user@lists.osgeo.org grass-user@lists.osgeo.org
 Betreff: SV: [GRASS-user] Raster addition

 I would like the NULL values that overlap with none NULL values to be 
 treated as 0, and still have NULL values where both maps have NULL 
 values. The combined map would be a large map with NULL values and added 
 values.

that is possible with the r.mapcalc and a if condition like:

if(map A  map B, 0, null()) 

something like that (untested) might work. the null () provides NULL values 
where the condition is false. The triple  is the logic and (treats NULL 
values different from double ).

see: http://grass.fbk.eu/gdp/html_grass64/r.mapcalc.html for more information.

/j

 
 Maybe the best way is to use r.null and set NULL values to 0. Add the 
 maps and then convert the 0 values to NULL values?
 Or could one set the value in the if statement to be a the sum of maps 
 somehow? I guess my biggest problem is summing with NULL values - 
 maybe there is a way to treat NULL values as 0? I'll have a look at 
 the man page
 
 Thanks,
 
 Martin
 
 -Opprinnelig melding-
 Fra: Moritz Lennert [mailto:mlenn...@club.worldonline.be]
 Sendt: 14. april 2011 14:15
 Til: Martin Album Ytre-Eide
 Kopi: grass-user@lists.osgeo.org
 Emne: Re: [GRASS-user] Raster addition
 
 On 14/04/11 13:54, Martin Album Ytre-Eide wrote:
  Hello.
 
  I am trying to add some raster maps. I thought I could do this in 
  r.mapcalc, but new_map= old_1 + old_2 seems to produce a map where 
  the maps overlap and ignoring areas where only on of the maps have 
  values.
 
 This is due to the way r.mapcalc handles NULL values. See the man 
 page, section NULL support for an explanation.
 
  I would like to do something similar to v.overlay operator=or.
 
  Anyone who knows how to do this?
 
 It depends on what you want the new map to contain as values. If you 
 want to add the value of old_1 to old_2 in places where they overlap, 
 one way would be to transform your null values to 0 using r.null null= 
 and then applying your formula.
 
 If you just want a (any) value where one of the maps is non-null, then 
 you can use if. Something like this (untested):
 
 new_map = if(!isnull(old_1) || !isnull(old_2), 1, null())
 
 which should give you 1 where any of the two contains a value and a 
 NULL value elsewhere.
 
 Moritz
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user

--
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit gratis Handy-Flat! 
http://portal.gmx.net/de/go/dsl
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


SV: [GRASS-user] Vector map text legend

2011-04-04 Thread Martin Album Ytre-Eide
Thank you for your suggestion. Unfortunately I don't know how to use qgis 
functions in python. I have had a look at it, and it seems tedious. 

I ended up doing it with ps.map - it seemed I could use the .ps format anyway. 
I made a script which altered my ps.map file for each iteration - using the 
data.replace() function in python.

Martin 

-Opprinnelig melding-
Fra: grass-user-boun...@lists.osgeo.org 
[mailto:grass-user-boun...@lists.osgeo.org] På vegne av Saber Razmjooei
Sendt: 1. april 2011 08:23
Til: Martin Album Ytre-Eide
Kopi: 'grass-user@lists.osgeo.org'
Emne: Re: [GRASS-user] Vector map text legend

How about using Grass Plugin in QGIS to load your vectors and create legend 
there?  Not sure how it ties up with your python script.

Cheers
Saber

On Thu, 2011-03-31 at 11:39 +0200, Martin Album Ytre-Eide wrote:
 Hello!
 
 I am looking for a way to make a legend to some vector area maps. The maps 
 contain four different types of areas and are given different names.
 
 I have made a python script running d.mon, d.vect etc. with the png driver 
 producing about 14 png files, which then is used to create a gif file.
 
 A way to create a vector legend is to do v.to.rast and use the d.legend from 
 the dummy rast - however, I don't see how you can get a legend with text in 
 this way? I don't think you can since raster should have numerical values. 
 You could make a legend without category numbers and try to add the text with 
 d.text, but I don't know if that's a good way of doing things.
 
 Then there is ps.map which solves this in a nice way - the problem is - I 
 would like to keep the png format. I could just make the legend with ps.map - 
 and add it to my png files with some image tools in python, but I am unsure 
 of the result is worth the effort.
 
 
 Any other ideas to do this?
 
 Thanks
 
 Martin Ytre-Eide
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user


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


SV: [GRASS-user] Vector map text legend

2011-04-04 Thread Martin Album Ytre-Eide
the way to do this is to use r.category to add category labels to each of your 
four raster category numbers, then use d.legends's -c flag to hide the value of 
the number, so only the label is displayed.

This was exactly what I was looking for. This solves many of my legend issues. 
Thanks a lot.

A follow up question is: Would this be a good way to deal with logarithmic 
values in a legend? 

-I convert rasters to have logarithmic values with r.mapcal: map = 
log(old_map,10)
-This gives me a nice map with a nice legend. One could use r.colors -g 
(logarithmic scaling), but this messes up the legend - the legend is still 
linear- and it does not look good.
-The problem is(my way of doing things) that the category numbers are log 
values as well(say 1-3-5 insted of 10-1000-10), which there is noting wrong 
with, it is just not that easy to read. 

So, is it a good idea to add category labels to all values (or a range of 
values) x - 10^x ( so for 1, I add 10 and so fort) or is it a better way to do 
this as well?

Martin


 


-Opprinnelig melding-
Fra: Hamish [mailto:hamis...@yahoo.com] 
Sendt: 2. april 2011 08:56
Til: grass-user@lists.osgeo.org
Kopi: Martin Album Ytre-Eide
Emne: Re: [GRASS-user] Vector map text legend

Martin Album Ytre-Eide wrote:
 I am looking for a way to make a legend to some vector area maps. The 
 maps contain four different types of areas and are given different 
 names.
 
 I have made a python script running d.mon, d.vect etc. with the png 
 driver producing about 14 png files, which then is used to create a 
 gif file.

 A way to create a vector legend is to do v.to.rast and use the 
 d.legend from the dummy rast -

(e.g. the v.colors script)

 however, I don't see how you can get a legend with text in this way? I 
 don't think you can since raster should have numerical values. You 
 could make a legend without category numbers and try to add the text 
 with d.text, but I don't know if that's a good way of doing things.

d.text would work, but it's a lot of trouble to get it right.

the way to do this is to use r.category to add category labels to each of your 
four raster category numbers, then use d.legends's -c flag to hide the value of 
the number, so only the label is displayed.

fwiw an approach to avoid the intermediary raster step is outlined in wish #89.


 Then there is ps.map which solves this in a nice way - the problem is 
 - I would like to keep the png format. I could just make the legend 
 with ps.map - and add it to my png files with some image tools in 
 python, but I am unsure of the result is worth the effort.

It is possible, actually I used this with html2latex's pstoimg program quite 
recently to add a custom legend in a journal figure created by other software, 
as it does such a nice job. Note there are some customizations I need to 
finish/clean up which make that a bit nicer to use (e.g. legend entries ordered 
by column before row), and the ps.output addon has made an entirely new vector 
legend tool.

pstoimg example:
  http://grass.osgeo.org/wiki/Ps.map_scripts#Converting_PostScript_to_PNG


good luck,
Hamish

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


[GRASS-user] Vector map text legend

2011-03-31 Thread Martin Album Ytre-Eide
Hello!

I am looking for a way to make a legend to some vector area maps. The maps 
contain four different types of areas and are given different names.

I have made a python script running d.mon, d.vect etc. with the png driver 
producing about 14 png files, which then is used to create a gif file.

A way to create a vector legend is to do v.to.rast and use the d.legend from 
the dummy rast - however, I don't see how you can get a legend with text in 
this way? I don't think you can since raster should have numerical values. You 
could make a legend without category numbers and try to add the text with 
d.text, but I don't know if that's a good way of doing things.

Then there is ps.map which solves this in a nice way - the problem is - I would 
like to keep the png format. I could just make the legend with ps.map - and add 
it to my png files with some image tools in python, but I am unsure of the 
result is worth the effort.


Any other ideas to do this?

Thanks

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


SV: [GRASS-user] Ps.map vlegend

2011-03-03 Thread Martin Album Ytre-Eide
I started making my own legend, but I can't seem to make one with pattern :( 
The rectangle function does not accept a pat command. Any workaround or ideas?

Thanks,

Martin 

-Opprinnelig melding-
Fra: Hamish [mailto:hamis...@yahoo.com] 
Sendt: 3. mars 2011 02:29
Til: grass-user@lists.osgeo.org; Martin Album Ytre-Eide
Emne: Re: [GRASS-user] Ps.map vlegend

Martin Album Ytre-Eide wrote:
 When using area fill patterns 
 (http://grass.osgeo.org/wiki/AreaFillPatterns#Example_Pattern_files)
 together with vlegend in ps.map trouble appears when customising the 
 patterns to my need. You can pretty much get the patterns you desire 
 with the aid of pwith and scale option, but the problem is that 
 vlegend does not follow up.
 Vlegend somewhat scales things down making the legend lock like 
 something else than what is seen in the map. One can change the size 
 of the legend by using width and fontsize but the pattern will still 
 have the same size.
 
 Is there any solution to this problem other than generating your own 
 legend?

Hi,

please file it as a wish/bug in the trac system. I might not be able to look at 
it for a few weeks, but don't want it to get forgotten about.
I've seen something like this before and I figured out a fix for it, but I'll 
have to remind myself how I did that.


thanks,
Hamish


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


[GRASS-user] Ps.map vlegend

2011-03-01 Thread Martin Album Ytre-Eide
Hello.

When using area fill patterns 
(http://grass.osgeo.org/wiki/AreaFillPatterns#Example_Pattern_files) together 
with vlegend in ps.map trouble appears when customising the patterns to my 
need. You can pretty much get the patterns you desire with the aid of pwith and 
scale option, but the problem is that vlegend does not follow up. Vlegend 
somewhat scales things down making the legend lock like something else than 
what is seen in the map. One can change the size of the legend by using width 
and fontsize but the pattern will still have the same size.

Is there any solution to this problem other than generating your own legend? 

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


[GRASS-user] texture instead of color

2011-02-11 Thread Martin Album Ytre-Eide
Hello.

Does any one know if there is a way to get texture areas instead of/or together 
with a color?

I tried to use psmap, and that work in a way, but it resulted in other problems.

I have also tried qgis with grass plugin, which have good support for different 
textures, but I could not set a geographical grid in other projections. 

Any solutions or ideas?

Martin



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


[GRASS-user] other language letters

2010-11-04 Thread Martin Album Ytre-Eide
Hello.

Does anyone know if there is a way to display (in label or text layer) other 
letters from other languages, for example Norwegian (æøå)

Martin


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


SV: [GRASS-user] Help installing from http://trac.osgeo.org/grass/browser/grass-addons/

2010-02-22 Thread Martin Album Ytre-Eide
Thank you for responding.
You are right. I installed grass with sudo and now tried as a normal user. It 
seems now that the permission and owner should be right. 

However, despite this, I have got a new error message today:

 U   ps.output
Checked out revision 41157.
Compiling ps.output...
/usr/local/grass-6.5.svn/include/Make/Module.make:25: warning: overriding 
commands for target `install'
/usr/local/grass-6.5.svn/include/Make/Rules.make:82: warning: ignoring old 
commands for target `install'
make: *** No rule to make target `default', needed by `first'.  Stop.
ERROR: Compilation failed, sorry. Please check above error messages.

Any ideas ?

Martin


Fra: neteler.os...@gmail.com [neteler.os...@gmail.com] p#229; vegne av Markus 
Neteler [nete...@osgeo.org]
Sendt: 19. februar 2010 16:10
Til: Martin Album Ytre-Eide
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] Help installing from 
http://trac.osgeo.org/grass/browser/grass-addons/

On Fri, Feb 19, 2010 at 11:48 AM, Martin Album Ytre-Eide
martin.album.ytre-e...@nrpa.no wrote:
 Hello.

 I updated my GRASS 6.5 and now I get a different error:

 mkdir -p 
 /usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/etc/paint/patterns/
 /usr/bin/install -c  -m 644 patterns/*.eps 
 /usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/etc/paint/patterns/
 Installing ps.output...
 touch: cannot touch `/usr/local/grass-6.5.svn/g.extension.12845': Permission 
 denied
 ERROR: Cannot write to /usr/local/grass-6.5.svn, installation failed

 The permission should be alright, but the catalog 
 /usr/local/grass-6.5.svn/g.extension.12845 does not seem to exist.

Please check the file permissions in
/usr/local/grass-6.5.svn
I suspect that it was installed with root permissions/sudo before and now you
try as normal user or so.

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


SV: [GRASS-user] Help installing from http://trac.osgeo.org/grass/browser/grass-addons/

2010-02-19 Thread Martin Album Ytre-Eide
Hello.

I updated my GRASS 6.5 and now I get a different error:

mkdir -p /usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/etc/paint/patterns/
/usr/bin/install -c  -m 644 patterns/*.eps 
/usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/etc/paint/patterns/
Installing ps.output...
touch: cannot touch `/usr/local/grass-6.5.svn/g.extension.12845': Permission 
denied
ERROR: Cannot write to /usr/local/grass-6.5.svn, installation failed

The permission should be alright, but the catalog 
/usr/local/grass-6.5.svn/g.extension.12845 does not seem to exist.

Martin

Fra: neteler.os...@gmail.com [neteler.os...@gmail.com] p#229; vegne av Markus 
Neteler [nete...@osgeo.org]
Sendt: 18. februar 2010 21:10
Til: Martin Album Ytre-Eide; E. Jorge Tizado
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] Help installing from 
http://trac.osgeo.org/grass/browser/grass-addons/

On Thu, Feb 18, 2010 at 2:52 PM, Markus Neteler nete...@osgeo.org wrote:
 Jorge,

 On Thu, Feb 18, 2010 at 2:15 PM, Martin Album Ytre-Eide
 martin.album.ytre-e...@nrpa.no wrote:
 Hello again, and thanks. I have installed GRASS 6.5 and the add-on ps.output 
 seems to download fine, but I get an compilation error I don't understand:

 mkdir -p 
 /usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/etc/paint/patterns/
 /usr/bin/install -c  -m 644 patterns/*.eps 
 /usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/etc/paint/patterns/
 /usr/bin/install: cannot stat `patterns/*.eps': No such file or directory
 make: *** [patt] Error 1
 ERROR: Compilation failed, sorry. Please check above error messages.
 GRASS 6.5.svn (utm33):~/gis/stratos/prog 

 Anyone who understands what goes wrong?

 (yes, the patterns/ directory has not yet been submitted to SVN.)

 Jorge: please submit it to GRASS-Addons in
 grass-addons/postscript/ps.output/

I have now found patterns in 6.4 and submitted them.
Now the module compiles.

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


SV: [GRASS-user] Help installing from http://trac.osgeo.org/grass/browser/grass-addons/

2010-02-18 Thread Martin Album Ytre-Eide
Hello again, and thanks. I have installed GRASS 6.5 and the add-on ps.output 
seems to download fine, but I get an compilation error I don't understand:

mkdir -p /usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/etc/paint/patterns/
/usr/bin/install -c  -m 644 patterns/*.eps 
/usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/etc/paint/patterns/
/usr/bin/install: cannot stat `patterns/*.eps': No such file or directory
make: *** [patt] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
GRASS 6.5.svn (utm33):~/gis/stratos/prog  

Anyone who understands what goes wrong?

Martin


-Opprinnelig melding-
Fra: neteler.os...@gmail.com [mailto:neteler.os...@gmail.com] På vegne av 
Markus Neteler
Sendt: 26. november 2009 19:43
Til: Martin Album Ytre-Eide
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] Help installing from 
http://trac.osgeo.org/grass/browser/grass-addons/

On Thu, Nov 26, 2009 at 10:28 AM, Martin Album Ytre-Eide 
martin.album.ytre-e...@nrpa.no wrote:
 Hello all.

 I have installed grass 7.0 and would like to add the module ps.output from 
 http://trac.osgeo.org/grass/browser/grass-addons/ps/. Unfortunately, I have 
 no idea how to do this and my wed-search did not help much.

 I tried g.extension, but ps.output is not listed in the default repository.

Please try again (but in GRASS 6), I have renamed the SVN directory from ps/ to 
postscript/:

g.extension ps.output svnurl=https://svn.osgeo.org/grass/grass-addons/

The code needs a few minor updates to compile with GRASS 7 (e.g., in vector.h:
grass/Vect.h   - grass/vector.h
)

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


[GRASS-user] Help installing from http://trac.osgeo.org/grass/browser/grass-addons/

2009-11-26 Thread Martin Album Ytre-Eide
Hello all.

I have installed grass 7.0 and would like to add the module ps.output from 
http://trac.osgeo.org/grass/browser/grass-addons/ps/. Unfortunately, I have no 
idea how to do this and my wed-search did not help much.

I tried g.extension, but ps.output is not listed in the default repository.

Any hints or links are appreciated.

Best regards,

Martin Album Ytre-Eide

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


SV: [GRASS-user] grid legend

2009-11-13 Thread Martin Album Ytre-Eide
d.grid does not seem to accept color=none .  I am sorry, but I was not able 
find the function ps.out. 

A solution could be to use d.graph together with d.region.box (thank you, I 
found it at wiki addons) . Then I will have to make shell-script  to generate 
the coordinates I want to use. 

I just thought there was an easier solution, since it seems to be done by 
others (http://www.valledemexico.ambitiouslemon.com/gallery.html).

 Martin


Fra: Hamish [hamis...@yahoo.com]
Sendt: 13. november 2009 05:59
Til: grass-user@lists.osgeo.org; Martin Album Ytre-Eide
Emne: Re: [GRASS-user] grid legend

try d.grid with grid line color set to none, and especially ps.out from
wiki addons.



Hamish


--- On Wed, 11/11/09, Martin Album Ytre-Eide wrote:

 From: Martin Album Ytre-Eide martin.album.ytre-e...@nrpa.no
 Subject: [GRASS-user] grid legend
 To: grass-user@lists.osgeo.org grass-user@lists.osgeo.org
 Date: Wednesday, November 11, 2009, 1:40 AM
 Hello.

 I wont to do something similar to what is done in:
 http://www.gdf-hannover.de/lit_html/grass60_v1.2_en/node81.html
 in figure 36 and 38 (processing figures with xfig). Having
 a figure where you could see the coordinates of your points

 The problem is to generate x and y-axes with numbers,
 surrounding the map.
 d.grid gives something similar, but I cant seem to turn of
 the grid lines and the numbers are inside the map.
 tried ps.map, but can't  move the numbers outside the
 x and y lines (see attachment)

 If anyone has any suggestions how to do this or know how
 this is done with xfig, I would appreciate it.

 Thanks.

 Martin Ytre-Eide




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


[GRASS-user] grid legend

2009-11-11 Thread Martin Album Ytre-Eide
Hello.

I wont to do something similar to what is done in:
http://www.gdf-hannover.de/lit_html/grass60_v1.2_en/node81.html
in figure 36 and 38 (processing figures with xfig). Having a figure where you 
could see the coordinates of your points

The problem is to generate x and y-axes with numbers, surrounding the map. 
d.grid gives something similar, but I cant seem to turn of the grid lines and 
the numbers are inside the map.
tried ps.map, but can't  move the numbers outside the x and y lines (see 
attachment) 

If anyone has any suggestions how to do this or know how this is done with 
xfig, I would appreciate it.

Thanks.

Martin Ytre-Eide

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


SV: SV: [GRASS-user] Raster legend

2009-10-09 Thread Martin Album Ytre-Eide
I am getting more confused by each time I try to edit the conf-files.

To be sure I get your suggestions right, I send you my conf-files.

The log.raster conf-file:
% 2.658010959625244140625 5.07434749603271484375
2.658010959625244140625:0:191:191 3.1412782669:0:255:0
3.1412782669:0:255:0  3.6245455742:255:255:0
3.6245455742:255:255:04.1078128815:255:127:0
4.1078128815:255:127:04.5910801888:191:127:63
4.5910801888:191:127:63   5.07434749603271484375:20

The non-log.raster conf-file
% 443.143585205078125 100252.296875
443.143585205078125:0:191:191 20404.9742431641:0:255:0
20404.9742431641:0:255:0  40366.804901123:255:255:0
40366.804901123:255:255:0 60328.635559082:255:127:0
60328.635559082:255:127:0 80290.466217041:191:127:63
80290.466217041:191:127:63100252.2968751:20

The result from r.what.colors whit converted log-values.
447.00: 0:191:191
1738.00: 0:195:179
6607.00: 0:210:133
25704.00: 67:255:0
10.00: 23:22:21

I tried to apply this values in the non-log.raster conf-file as suggested by 
Nikos, but without any luck. The legend values still wants to be linear.

If you still want to help, you could maybe make me a conf-file in the way you 
think it should be.

Thanks for all the help so far.



Fra: Nikos Alexandris [nikos.alexand...@felis.uni-freiburg.de]
Sendt: 8. oktober 2009 13:30
Til: Martin Album Ytre-Eide
Kopi: grass-user@lists.osgeo.org
Emne: Re: SV: [GRASS-user] Raster legend

--%---
On Thu, 2009-10-08 at 14:25 +0300, Nikos Alexandris wrote:
...
 why don't you draw the (non-log.raster) legend for it
 and try to match colors?
--%---

Maybe it's not that clear, but (as Hamish, again, note) it's possible to
draw any legend on any raster map. So,

# draw log.rast
d.rast log.rast

# draw non-log.raster (after having found correspondence of log ~
non-log values and colors)
d.legend non-log-legend

Nikos

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


SV: [GRASS-user] Raster legend

2009-10-08 Thread Martin Album Ytre-Eide
Thanks, but It did not seem to work, or I have not tried what you suggested.

The actual values are contained in the logarithmic, and that's fine. It is no 
problem converting the raster to non logarithmic with r.mapcalc, but it does 
not help me much. I cant use legend values from the non-logarithmic with the 
logarithmic raster since the scaling will not be right.

I have just used standard rules, but done some experiments with custom made 
without any luck.

I edited the rules in colr/directory as you described. It certainly did 
something, but not the intended. And I have yet not managed to get de-logged 
values in the legend. Have tried a lot of things, but I don't really understand 
the logic in the colr-files.

Any more/other ideas?


Regards,

Martin



-Opprinnelig melding-
Fra: Hamish [mailto:hamis...@yahoo.com]
Sendt: 29. september 2009 17:20
Til: grass-user@lists.osgeo.org; Martin Album Ytre-Eide
Emne: Re: [GRASS-user] Raster legend

Martin Album Ytre-Eide wrote:
 I am displaying a raster where the values are logarithmic and that is
 fine. The d.legend gives me a nice legend, but I would like to convert
 the values in the legend to non logarithmic values (keeping the raster
 as it is). I can't find a way to do this in d.legend or r.colors.

 How is this done?

Are the actual values contained in the logarithmic? eg convert back to normal 
with r.mapcalc pow(e, MAP) or pow(10, MAP)?

are the rules custom made?
does 'd.legend use=' help?

note the legend used does not have to match the raster it shows on, you could 
do a trick where you make a list of the values you want on the legend, 
calculate that their logs are, use r.what.color to find the matching color, 
then use those colors with the de-logged values.

probably easier actually to copy the internal rules file in the MAPSET's colr/ 
directory, convert the first column and range to de- logged version, perhaps 
run r.mapcalc to make a delogged version of the map (or any, just to get the 
range), copy in the adjusted colr/ file into the colr/ dir, then use that map 
for the legend.



does that make some sense?

Hamish










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