r.reclass using pipe from r.stats?

View: New views
3 Messages — Rating Filter:   Alert me  

r.reclass using pipe from r.stats?

by Miltinho Astronauta :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear all,

I have a raster map with all categories (~50)
and I have about 500 spatial subsets of the same
original map. As is expected, each of spatial subset
map have less categories than the original map.

I can check the list of categories for each subset
map using r.stats. But I need to generate a new
set of maps with the spatial range of original map,
but keeping only those classes of my original map.

Just supose that "r.stats mysubset1" result something
like:

2
4
9
11
43

So, I would like that my new map with my full spatial
range keep only these 5 categories, and all other
categories come to be "no data".

I know if I generate a rule file with 
2=2
4=9
11=11
43=43
I can get the desired results, but as the number
of spatial subsets is very large I would like turn it
more operational.

Is there a suggestion of how can I do this using pipe like
r.stats mysubset1 | r.reclass mysubset1 mysubset1_fullrange rules= -??

Thanks for all
Best regards

Miltinho Brazil

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

Re: r.reclass using pipe from r.stats?

by Glynn Clements :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Milton Cezar Ribeiro wrote:

> I have a raster map with all categories (~50)
> and I have about 500 spatial subsets of the same
> original map. As is expected, each of spatial subset
> map have less categories than the original map.
>
> I can check the list of categories for each subset
> map using r.stats. But I need to generate a new
> set of maps with the spatial range of original map,
> but keeping only those classes of my original map.
>
> Just supose that "r.stats mysubset1" result something
> like:
>
> 2
> 4
> 9
> 11
> 43
>
> So, I would like that my new map with my full spatial
> range keep only these 5 categories, and all other
> categories come to be "no data".
>
> I know if I generate a rule file with
> 2=2
> 4=9
> 11=11
> 43=43
> I can get the desired results, but as the number
> of spatial subsets is very large I would like turn it
> more operational.
>
> Is there a suggestion of how can I do this using pipe like
> r.stats mysubset1 | r.reclass mysubset1 mysubset1_fullrange rules= -??

        r.stats mysubset1 | awk '{print $1,"=",$1} ; END {print "* = NULL"}' | r.reclass ...

--
Glynn Clements <glynn@...>
_______________________________________________
grass-user mailing list
grass-user@...
http://lists.osgeo.org/mailman/listinfo/grass-user

Parent Message unknown Re: r.reclass using pipe from r.stats?

by Dawn Abbot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I am trying to create a single color map to overlay the elevation map to show the different elevations.  I clicked on properties of my raster map and was able to create the color map by choosing psudocolors but I do not have any luck when I pick custom color map.  Does anyone have any suggestions?



----- Original Message ----
From: Glynn Clements <glynn@...>
To: Milton Cezar Ribeiro <miltinho.astronauta@...>
Cc: grass-user@...
Sent: Friday, October 10, 2008 10:47:08 AM
Subject: Re: [GRASS-user] r.reclass using pipe from r.stats?


Milton Cezar Ribeiro wrote:

> I have a raster map with all categories (~50)
> and I have about 500 spatial subsets of the same
> original map. As is expected, each of spatial subset
> map have less categories than the original map.
>
> I can check the list of categories for each subset
> map using r.stats. But I need to generate a new
> set of maps with the spatial range of original map,
> but keeping only those classes of my original map.
>
> Just supose that "r.stats mysubset1" result something
> like:
>
> 2
> 4
> 9
> 11
> 43
>
> So, I would like that my new map with my full spatial
> range keep only these 5 categories, and all other
> categories come to be "no data".
>
> I know if I generate a rule file with
> 2=2
> 4=9
> 11=11
> 43=43
> I can get the desired results, but as the number
> of spatial subsets is very large I would like turn it
> more operational.
>
> Is there a suggestion of how can I do this using pipe like
> r.stats mysubset1 | r.reclass mysubset1 mysubset1_fullrange rules= -??

    r.stats mysubset1 | awk '{print $1,"=",$1} ; END {print "* = NULL"}' | r.reclass ...

--
Glynn Clements <glynn@...>
_______________________________________________
grass-user mailing list
grass-user@...
http://lists.osgeo.org/mailman/listinfo/grass-user


_______________________________________________
grass-user mailing list
grass-user@...
http://lists.osgeo.org/mailman/listinfo/grass-user
LightInTheBox - Buy quality products at wholesale price!