Details Ticket 875


Comment | Reply | Take | Open


Serial Number 875
Subject v.reclass does nothing...
Area none
Queue grass
Requestors neteler@itc.it
Owner none
Status resolved
Last User Contact Fri Dec 28 21:39:31 2001 (7 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Fri Dec 28 21:39:36 2001 (7 yr ago)
Created Sat Dec 15 19:10:08 2001 (7 yr ago)

Transaction History Ticket 875


Sat, Dec 15 2001 19:10:08    Request created by guest  
Subject: v.reclass does nothing...

Hi again,

it seems that v.reclass is not working at all. Maybe I am wrong,
but I need a hint: I tried to reclass a map in Spearfish dataset:


1 thru 62 = 1 private
63        = 2 Black Hills Natl. Forest

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

The result is fields == fields.recl...

Sorry for no better news,

 Markus
Mon, Dec 17 2001 10:06:36    Mail sent by egmiller  
Works for me... (didn't try it wish spearfish, but other data I had...)
Wed, Dec 19 2001 16:40:55    Mail sent by mneteler  
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
Thu, Dec 20 2001 12:03:39    Mail sent by sixote@yahoo.com  
Return-Path <sixote@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <20011220110320.23039.qmail@web13805.mail.yahoo.com>
Date Thu, 20 Dec 2001 03:03:20 -0800 (PST)
From Alex Shevlakov <sixote@yahoo.com>
Subject Re: [GRASS5] [bug #875] (grass) v.reclass does nothing...
To Markus Neteler via RT <grass-bugs@intevation.de>, neteler@itc.it
Cc grass5@grass.itc.it
In-Reply-To <20011219154055.6967213A04@lists.intevation.de>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Spam-Status No, hits=0 required=5 tests=
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@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@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


Thu, Dec 20 2001 12:17:59    Mail sent by neteler@itc.it  
Return-Path <neteler@itc.it>
Delivered-To grass-bugs@lists.intevation.de
Date Thu, 20 Dec 2001 12:17:43 +0100
From Markus Neteler <neteler@itc.it>
To Alex Shevlakov <sixote@yahoo.com>
Cc Markus Neteler via RT <grass-bugs@intevation.de>, grass5@grass.itc.it
Subject Re: [GRASS5] [bug #875] (grass) v.reclass does nothing...
Message-ID <20011220121743.J28867@itc.it>
Mail-Followup-To Alex Shevlakov <sixote@yahoo.com>, Markus Neteler via RT <grass-bugs@intevation.de>, grass5@grass.itc.it
References <20011219154055.6967213A04@lists.intevation.de> <20011220110320.23039.qmail@web13805.mail.yahoo.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.2.5i
In-Reply-To <20011220110320.23039.qmail@web13805.mail.yahoo.com>; from sixote@yahoo.com on Thu, Dec 20, 2001 at 03:03:20AM -0800
X-Spam-Status No, hits=0 required=5 tests=
Hi Alex,

On Thu, Dec 20, 2001 at 03:03:20AM -0800, Alex Shevlakov wrote:
> 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:
>
[...] 
> So actually there are only 2 categories in fields.recl


you are right! Thanks for the good news, it seems I was confused by 
two facts

 - d.area colors according to the polygon number, not the category
   number
   Maybe we want a flag "-c" to color according to the categorry numbers
   and not to the polygon numbers?

 - v.reclass does not eliminate boundaries properly when two adjacent 
   polygons are assigned to the same category, as you also say.

[...]
> Each polygon would be colored differently (even those
> having the same new category) in d.area.

Sorry for this, as I have implemented that flag in d.area
I should have known (oops :-)

So
 d.vect.labels fields.recl
runs well.

> 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?).

Yes, this is *really* a bug. "-d" also damages the topology
in the current implementation as open polygons occur.

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

Yes - my intention was to test v.reclass.

Thanks for your hints,

 Markus

 
> --- Markus Neteler via RT <grass-bugs@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@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
> _______________________________________________
> grass5 mailing list
> grass5@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5

-- 
Markus Neteler

ITC-irst, Istituto per la Ricerca Scientifica e Tecnologica
     Project on Predictive Models for the Environment    
Via Sommarive, 18        -      38050 Povo (Trento), Italia
tel +39 0461 314 -520 (fax -591)          http://mpa.itc.it


Fri, Dec 28 2001 21:39:31    Mail sent by mneteler  
followup from Alex:

--- "Eric G. Miller" <egm2@jps.net> wrote:
> It'd be impossible to get two polygons from the
> example
> in the test.  Compare with the original data.  There
> are double lines bordering "adjacent" parcels in
> some
> cases.  Presumably, these are "rights of way" for
> roads...
> Indeed they are...

Yes, these tiny double lines seen in the microscope..

They justify the areas not been reclassed together.

We can put away the v.reclass bug from the RT, I
think.

--alex


- so I will close this bug now.

Sorry for the confusion,

 Markus
Fri, Dec 28 2001 21:39:36    Status changed to resolved by mneteler  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request