[GRASS-dev] gis.m: artifacts renderend

Hi,

I hope you don't hate me. Yet. :wink:

There is a bug in gis.m that zooming, turning off and redisplaying
layers leads to artifacts:

1. add 2 vector layers - both the same vector
2. zoom to one of them [1]
3. turn off the 2nd one
4. zoom in [2]
5. turn on the 2nd one
6. redraw [3]

[1] whole_layer.png
[2] zoom.png
[3] dna.png

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/

(attachments)

dna.png
whole_layer.png
zoom.png

Maciek,

I haven't had a chance to do this with some of my own vectors. But the
images you send *look* like they are behaving exactly as they should. Each
images looks like the zoom is to one or the other of the two vectors.

Images 1 & 2 appear to be zooming to the bottom vector; image 3 appears to
be zooming to the top vector.

How is this different from what you expected?

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Maciek Sieczka <werchowyna@epf.pl>
Date: Sun, 7 May 2006 19:51:52 +0200
To: <grass-dev@grass.itc.it>
Cc: <cedricgrass@shockfamily.net>, <michael.barton@asu.edu>
Subject: gis.m: artifacts renderend

Hi,

I hope you don't hate me. Yet. :wink:

There is a bug in gis.m that zooming, turning off and redisplaying
layers leads to artifacts:

1. add 2 vector layers - both the same vector
2. zoom to one of them [1]
3. turn off the 2nd one
4. zoom in [2]
5. turn on the 2nd one
6. redraw [3]

[1] whole_layer.png
[2] zoom.png
[3] dna.png

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko
najlepsze z nich!
http://katalog.panoramainternetu.pl/

Currently, the zoom to selected layer doesn't do anything if the layer is
not also checked for display. This can be changed, but in general unchecked
layers are ignored by all GIS Manager functions.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Maciek Sieczka <werchowyna@epf.pl>
Date: Sun, 7 May 2006 19:51:52 +0200
To: <grass-dev@grass.itc.it>
Cc: <cedricgrass@shockfamily.net>, <michael.barton@asu.edu>
Subject: gis.m: artifacts renderend

Hi,

I hope you don't hate me. Yet. :wink:

There is a bug in gis.m that zooming, turning off and redisplaying
layers leads to artifacts:

1. add 2 vector layers - both the same vector
2. zoom to one of them [1]
3. turn off the 2nd one
4. zoom in [2]
5. turn on the 2nd one
6. redraw [3]

[1] whole_layer.png
[2] zoom.png
[3] dna.png

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko
najlepsze z nich!
http://katalog.panoramainternetu.pl/

On Sun, 07 May 2006 11:17:10 -0700
Michael Barton <michael.barton@asu.edu> wrote:

Maciek,

I haven't had a chance to do this with some of my own vectors. But the
images you send *look* like they are behaving exactly as they should.
Each images looks like the zoom is to one or the other of the two
vectors.

They the same vector in 2 instances (ie. 2 gis.m vector layers - one
duplicated from the other). They should be identical. The way they are
in d.m.

Images 1 & 2 appear to be zooming to the bottom vector; image 3
appears to be zooming to the top vector.

How is this different from what you expected?

They should perfectly cover one another. Both layers are the same
vector file! So why should they be displayed at different zoom levels
within the same display? gis.m, provided the conditions I describe,
displays the 1st instance in one zoom level, and the 2nd instance in
another zoom level, while within the same "Map display" they should
cover each other. This is wrong.

Just try my procedure. Easy to replicate. In d.m it works OK. Only
gis.m is affected.

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/

On Sun, 07 May 2006 11:23:56 -0700
Michael Barton <michael.barton@asu.edu> wrote:

Currently, the zoom to selected layer doesn't do anything if the
layer is not also checked for display. This can be changed,

IMHO it should be then.

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/

On Sun, 7 May 2006 21:10:31 +0200
Maciek Sieczka <werchowyna@epf.pl> wrote:

On Sun, 07 May 2006 11:23:56 -0700
Michael Barton <michael.barton@asu.edu> wrote:

> Currently, the zoom to selected layer doesn't do anything if the
> layer is not also checked for display. This can be changed,

IMHO it should be then.

And then performance goes down :/. But hey, gis.m is slow anyway -
making it display wrong is not the way to speed it up.

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/

Maciek,

There is a bug in gis.m that zooming, turning off and redisplaying
layers leads to artifacts:

1. add 2 vector layers - both the same vector
2. zoom to one of them [1]
3. turn off the 2nd one
4. zoom in [2]
5. turn on the 2nd one
6. redraw [3]

Please try the new version in CVS. I just committed a change that fixes this.

Thanks,

--Cedric

This should have no effect on performance.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Maciek Sieczka <werchowyna@epf.pl>
Date: Sun, 7 May 2006 21:15:17 +0200
To: Maciek Sieczka <werchowyna@epf.pl>
Cc: <michael.barton@asu.edu>, <cedricgrass@shockfamily.net>,
<grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] Re: gis.m: artifacts renderend

On Sun, 7 May 2006 21:10:31 +0200
Maciek Sieczka <werchowyna@epf.pl> wrote:

On Sun, 07 May 2006 11:23:56 -0700
Michael Barton <michael.barton@asu.edu> wrote:

Currently, the zoom to selected layer doesn't do anything if the
layer is not also checked for display. This can be changed,

IMHO it should be then.

And then performance goes down :/. But hey, gis.m is slow anyway -
making it display wrong is not the way to speed it up.

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko
najlepsze z nich!
http://katalog.panoramainternetu.pl/

Maciek,

I cannot duplicate your results exactly. However, doing what you describe
locks up gism for me.

Here is what I'm pretty sure is happening.

1. vector added twice (layers 1 & 2)

2. zoom to any region extents: d.vect is run producing PPM files for layers
1 & 2 that are composited using g.pnmcomp.

3. turn off layer 1 and zoom to any new region extents: active layer 2 is
re-rendered, but inactive layer 1 is not re-rendered because it is not
active (THIS is the problem. There was a check for this that apparently has
been lost in very recent changes).

4. make layer 1 active again and attempt to display: Layer 2 is correctly
rendered, but layer 1 is not rerendered. G.pnmcomp attempts to composite
layers 1 and 2, but they have different geometries causing it to hang (on my
system) or incorrectly display layer 1 (on your system).

We need to fix the bug in step 3. Thanks for finding it.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Maciek Sieczka <werchowyna@epf.pl>
Date: Sun, 7 May 2006 19:51:52 +0200
To: <grass-dev@grass.itc.it>
Cc: <cedricgrass@shockfamily.net>, <michael.barton@asu.edu>
Subject: gis.m: artifacts renderend

Hi,

I hope you don't hate me. Yet. :wink:

There is a bug in gis.m that zooming, turning off and redisplaying
layers leads to artifacts:

1. add 2 vector layers - both the same vector
2. zoom to one of them [1]
3. turn off the 2nd one
4. zoom in [2]
5. turn on the 2nd one
6. redraw [3]

[1] whole_layer.png
[2] zoom.png
[3] dna.png

Maciek

Thinking about it, I agree with you in this case at least. The issue here is
specifically zoom to selected map and query selected map (both share a
procedure to return the map name). In both cases, these functions should
operate whether a map is displayed or not. I'll change the appropriate
procedures.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Maciek Sieczka <werchowyna@epf.pl>
Date: Sun, 7 May 2006 21:10:31 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: <grass-dev@grass.itc.it>, <cedricgrass@shockfamily.net>
Subject: Re: gis.m: artifacts renderend

On Sun, 07 May 2006 11:23:56 -0700
Michael Barton <michael.barton@asu.edu> wrote:

Currently, the zoom to selected layer doesn't do anything if the
layer is not also checked for display. This can be changed,

IMHO it should be then.

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko
najlepsze z nich!
http://katalog.panoramainternetu.pl/