[GRASS5] [bug #875] (grass) v.reclass does nothing...

Alex Shevlakov sixote at yahoo.com
Thu Dec 20 06:03:20 EST 2001


Hi,

it seems to me that v.reclass works as it is supposed
to in your example:

cat fields.recl | v.reclass fields out=fields.recl
type=area

here is the result query d.what.vect output:

-------------
Buttons
 Left:  what's here
 Right: quit

606242.1(E) 4924342(N)
     fields in PERMANENT  Line - Category <not tagged>
Area - Category 41 D. Portillo#1
Size - Sq Meters: 5034387.990		Hectares: 503.439
           Acres: 1243.994		Sq Miles: 1.9437
fields.recl in user1      Line - Category <not tagged>
Area - Category 1 private
Size - Sq Meters: 5034387.990		Hectares: 503.439
           Acres: 1243.994		Sq Miles: 1.9437

596637(E) 4918350.7(N)
     fields in PERMANENT  Area - Category 63 Black
Hills Natl. Forest
Size - Sq Meters: 116514876.800		Hectares: 11651.488
           Acres: 28790.754		Sq Miles: 44.9856
fields.recl in user1      Area - Category 2 Black
Hills Natl. Forest
Size - Sq Meters: 116514876.800		Hectares: 11651.488
           Acres: 28790.754		Sq Miles: 44.9856
---------------

So actually there are only 2 categories in fields.recl

However, when you run d.area, the function plot1 has
this:
-------------

 if (colorcycle)
                {
                  color_number=color_number + 1;   
                  if (color_number == backgroundcolor)
                     color_number=color_number + 1; 
                  if (color_number > MAX_COLOR_NUM) 
                     color_number=1;                
                  if (color_number == backgroundcolor)
                     color_number=color_number + 1;
                     
                  R_standard_color(color_number);
                }
                else
                  R_color(fillcolor);

                R_polygon_abs(x_screen, y_screen, i);
-----------------------
Each polygon would be colored differently (even those
having the same new category) in d.area.

You can try -d option with v.reclass and get fewer
colors in the result map, but not two. This is what I
think strange (bug?).

To get only two polygons in the result d.area, perhaps
you'd better use v.extract with -d. 

--alex

--- Markus Neteler via RT <grass-bugs at intevation.de>
wrote:
> Hi Eric,
> 
> I tried again today, but v.reclass still produces
> in=out results.
> The same procedure works well with raster maps
> (using Spearfish,
> note that I am *not* in PERMANENT mapset):
> 
> cat fields.recl
> 1 thru 62 = 1 private
> 63        = 2 Black Hills Natl. Forest
> 
> cat fields.recl | r.reclass fields  out=fields.recl
> d.rast fields
> d.rast fields.recl
> -> result is fine
> 
> cat fields.recl | v.reclass fields type=area
> out=fields.recl
> v.support fields.recl
> d.area -f fields
> d.area -f fields.recl
> -> result is identical - oops.
> 
> Is it possible for you to try my example? Would be
> great...
> 
> Thanks,
> 
>  Markus
> 
> 
> -------------------------------------------- Managed
> by Request Tracker
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5


__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com



More information about the grass-dev mailing list