[GRASS-dev] gis.m: resolution not preserved

Michael,

There is a problem with resolution handling in gis.m (6.3 CVS and 6.1).
It's not preserved when zooming, and switching to "Map fills display
window" corrupts it.

Start Grass in spearfish.

# terminal:
g.region rast=slope -a

# gis.m
add raster 'slope'
display it

# gis.m CLI
g.region -g

n=4928030
s=4913690
w=589980
e=609000
nsres=30
ewres=30
rows=478
cols=634

# gis.m
zoom in/out a bit

# gis.m CLI
g.region -g
n=4925065.04215
s=4921067.9817
w=593703.886256
e=599027.771749
nsres=30.05308609
ewres=30.07844911
rows=133
cols=177

As you see, the resolution is not preserved.

It's even worse if you switch to "Map fills display window" mode: once
you do it, the resolution goes really funky:

# gis.m CLI
g.region -g

n=4925065.04215
s=4921067.9817
w=593703.886256
e=599027.771749
nsres=8.29265654
ewres=8.29265653
rows=482
cols=642

I tried adding -a for g.region calls in mapcanvas.tcl and it seems to
solve the problem, but I'm not entirely sure which g.region calls really
require it, and which should be be left without it. Moreover, I don't
know how to fix the "Map fills display window" resolution bug.

Also, it seems that rastnum.tcl and georect.tcl would require same fix (?).

As I'm not sure how to fix these, can I ask you to take a look at them?

Maciek

I posted a message on this over a week ago and got no reply.

<http://grass.itc.it/pipermail/grass-dev/2006-August/024866.html&gt;

I also discovered this and thought it was a bug at first. But when I looked
at the code (this new 'explore mode' was developed by Cedric Shock), I
realized that it was intentional.

That is, it is dynamically changing resolution to speed display times as you
zoom in and out.

I asked if this is what we wanted or not. There are advantages and
disadvantages. It needs to be documented in any case, of course.

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

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

From: Maciej Sieczka <tutey@o2.pl>
Date: Fri, 18 Aug 2006 12:12:32 +0200
To: Michael Barton <michael.barton@asu.edu>, grass-dev
<grass-dev@grass.itc.it>
Cc: Jarek Jasiewicz <jarekj@amu.edu.pl>
Subject: gis.m: resolution not preserved

Michael,

There is a problem with resolution handling in gis.m (6.3 CVS and 6.1).
It's not preserved when zooming, and switching to "Map fills display
window" corrupts it.

Start Grass in spearfish.

# terminal:
g.region rast=slope -a

# gis.m
add raster 'slope'
display it

# gis.m CLI
g.region -g

n=4928030
s=4913690
w=589980
e=609000
nsres=30
ewres=30
rows=478
cols=634

# gis.m
zoom in/out a bit

# gis.m CLI
g.region -g
n=4925065.04215
s=4921067.9817
w=593703.886256
e=599027.771749
nsres=30.05308609
ewres=30.07844911
rows=133
cols=177

As you see, the resolution is not preserved.

It's even worse if you switch to "Map fills display window" mode: once
you do it, the resolution goes really funky:

# gis.m CLI
g.region -g

n=4925065.04215
s=4921067.9817
w=593703.886256
e=599027.771749
nsres=8.29265654
ewres=8.29265653
rows=482
cols=642

I tried adding -a for g.region calls in mapcanvas.tcl and it seems to
solve the problem, but I'm not entirely sure which g.region calls really
require it, and which should be be left without it. Moreover, I don't
know how to fix the "Map fills display window" resolution bug.

Also, it seems that rastnum.tcl and georect.tcl would require same fix (?).

As I'm not sure how to fix these, can I ask you to take a look at them?

Maciek

Michael Barton napisa?(a):

I posted a message on this over a week ago and got no reply.

<http://grass.itc.it/pipermail/grass-dev/2006-August/024866.html&gt;

I also discovered this and thought it was a bug at first. But when I looked
at the code (this new 'explore mode' was developed by Cedric Shock), I
realized that it was intentional.

That is, it is dynamically changing resolution to speed display times as you
zoom in and out.

I asked if this is what we wanted or not. There are advantages and
disadvantages. It needs to be documented in any case, of course.

Michael,

OK as to "explore" mode. BUT, there is still another issue - that the
resolution is not preserved after zooming in gis.m in "normal" mode. Did
you try to reproduce it? Could you fix it?

I'm reffering to the following part of my email:

Start Grass in spearfish.

# terminal:
g.region rast=slope -a

# gis.m
add raster 'slope'
display it

# gis.m CLI
g.region -g

n=4928030
s=4913690
w=589980
e=609000
nsres=30
ewres=30
rows=478
cols=634

# gis.m
zoom in/out a bit

# gis.m CLI
g.region -g
n=4925065.04215
s=4921067.9817
w=593703.886256
e=599027.771749
nsres=30.05308609
ewres=30.07844911
rows=133
cols=177

As you see, the resolution is not preserved.

I tried adding -a for g.region calls in mapcanvas.tcl and it seems to
solve the problem, but I'm not entirely sure which g.region calls really
require it, and which should be be left without it.

Also, it seems that rastnum.tcl and georect.tcl would require same fix (?).

Maciek

Maciek,

Perhaps something has changed. But when I discovered this behavior in
explore mode, I also did a bunch of tests in normal mode and looked at the
code. AFAICT, normal mode does not change resolution--though sometimes it
can get confusing as to what is happening between the different modes. Could
you please test it further and see if this is really happening and under
what circumstances.

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

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

From: Maciej Sieczka <tutey@o2.pl>
Date: Fri, 18 Aug 2006 18:18:14 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: grass-dev <grass-dev@grass.itc.it>, Jarek Jasiewicz <jarekj@amu.edu.pl>
Subject: Re: gis.m: resolution not preserved

Michael Barton napisa?(a):

I posted a message on this over a week ago and got no reply.

<http://grass.itc.it/pipermail/grass-dev/2006-August/024866.html&gt;

I also discovered this and thought it was a bug at first. But when I looked
at the code (this new 'explore mode' was developed by Cedric Shock), I
realized that it was intentional.

That is, it is dynamically changing resolution to speed display times as you
zoom in and out.

I asked if this is what we wanted or not. There are advantages and
disadvantages. It needs to be documented in any case, of course.

Michael,

OK as to "explore" mode. BUT, there is still another issue - that the
resolution is not preserved after zooming in gis.m in "normal" mode. Did
you try to reproduce it? Could you fix it?

I'm reffering to the following part of my email:

Start Grass in spearfish.

# terminal:
g.region rast=slope -a

# gis.m
add raster 'slope'
display it

# gis.m CLI
g.region -g

n=4928030
s=4913690
w=589980
e=609000
nsres=30
ewres=30
rows=478
cols=634

# gis.m
zoom in/out a bit

# gis.m CLI
g.region -g
n=4925065.04215
s=4921067.9817
w=593703.886256
e=599027.771749
nsres=30.05308609
ewres=30.07844911
rows=133
cols=177

As you see, the resolution is not preserved.

I tried adding -a for g.region calls in mapcanvas.tcl and it seems to
solve the problem, but I'm not entirely sure which g.region calls really
require it, and which should be be left without it.

Also, it seems that rastnum.tcl and georect.tcl would require same fix (?).

Maciek

I got this error when compiling simlib on a PPC iMac G5 from latest cvs:
cc -dynamiclib -flat_namespace -compatibility_version 6.3 -current_version 6.3 -install_name /usr/local/grass-6.3.cvs/lib/libgrass_sim.dylib -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib/libgrass_sim.6.3.cvs.dylib -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib OBJ.powerpc-apple-darwin8.7.0/input.o OBJ.powerpc-apple-darwin8.7.0/random.o OBJ.powerpc-apple-darwin8.7.0/hydro.o OBJ.powerpc-apple-darwin8.7.0/output.o OBJ.powerpc-apple-darwin8.7.0/erod.o -lgrass_gis -lgrass_datetime -lz -lgrass_bitmap -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gmath -L/usr/local/lib -lfftw -lgrass_linkm -lz -lgrass_sites && if [ -z "" ] ; then ln -f -s libgrass_sim.6.3.cvs.dylib /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib/libgrass_sim.dylib; fi
ld: warning can't open dynamic library: /usr/local/grass-6.3.cvs/lib/libgrass_vect.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: warning can't open dynamic library: /usr/local/grass-6.3.cvs/lib/libgrass_dig2.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: warning can't open dynamic library: /usr/local/grass-6.3.cvs/lib/libgrass_dgl.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: warning can't open dynamic library: /usr/local/grass-6.3.cvs/lib/libgrass_rtree.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: Undefined symbols:
_Vect_append_point
_Vect_build
_Vect_cat_get
_Vect_cat_set
_Vect_close
_Vect_get_comment
_Vect_get_field
_Vect_get_name
_Vect_is_3d
_Vect_new_cats_struct
_Vect_new_line_struct
_Vect_open_new
_Vect_open_old
_Vect_read_next_line
_Vect_reset_cats
_Vect_reset_line
_Vect_set_comment
_Vect_set_date
_Vect_set_map_name
_Vect_set_open_level
_Vect_write_line
/usr/bin/libtool: internal link edit command failed
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib/libgrass_sim.6.3.cvs.dylib] Error 1
r.sim.water
gcc -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib -I/usr/local/include -DPACKAGE=\""grassmods"\" -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/r.sim.water OBJ.powerpc-apple-darwin8.7.0/main.o -lgrass_sim -lgrass_bitmap -lgrass_linkm -lgrass_sites -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -L/usr/local/lib -lgdal -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz -lgrass_datetime -lgrass_gmath -L/usr/local/lib -lfftw -lz
/usr/bin/ld: can't locate file for: -lgrass_sim
collect2: ld returned 1 exit status
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/r.sim.water] Error 1
r.sim.sediment
gcc -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib -I/usr/local/include -DPACKAGE=\""grassmods"\" -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/r.sim.sediment OBJ.powerpc-apple-darwin8.7.0/main.o -lgrass_sim -lgrass_bitmap -lgrass_linkm -lgrass_sites -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -L/usr/local/lib -lgdal -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz -lgrass_datetime -lgrass_gmath -L/usr/local/lib -lfftw -lz
/usr/bin/ld: can't locate file for: -lgrass_sim
collect2: ld returned 1 exit status
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/r.sim.sediment] Error 1

*******************************************************
Dr. Agustin Diez Castillo
Departament de Prehistoria i Arqueologia
Universitat de Valencia Phone: +34 963 86 42 42
Avda. Blasco Iba–ez, 28 Fax: +34 963 98 38 87
Valencia 46010
*******************************************************

Michael Barton napisa?(a):

Maciek,

Perhaps something has changed. But when I discovered this behavior in
explore mode, I also did a bunch of tests in normal mode and looked at the
code. AFAICT, normal mode does not change resolution--though sometimes it
can get confusing as to what is happening between the different modes. Could
you please test it further and see if this is really happening and under
what circumstances.

Michael,

I'm perfectly sure the resolution IS changed as I described it in detail
and in an EASILY reproducible way. I'm also sure I'm referring ONLY to
CONSTRAIN display mode in this case. Please try the procedure I put in
my previous email (as it is based on spearfish60 you should have no
trobles) and let me know if you really can't reproduce that.

I'm using Grass 6.3 CVS of today.

Maciek

P.S.

I'm leaving tonight in about 1,5 hours and I will be not available till
Thursday Aug 24 (next week).

A bit of a quirk with Apple's linker (though it might be more general), if you've never installed 6.3 before. Some of those libraries needed by simlib also use other grass libraries. Normally the linker would find those automatically from their install locations, but since you don't have GRASS installed yet (this version at least), it fails.

Edit raster/simwe/simlib/makefile, and add $(VECTLIB) to EXTRA_LIBS.

I also have to do this when I build a universal GRASS, since everything is going thru the Universal SDK which alters paths on the fly. I've been a bit hesitant (and lazy) to file this as a bug, but maybe I should.

On Aug 18, 2006, at 1:05 PM, Agustin Diez Castillo wrote:

I got this error when compiling simlib on a PPC iMac G5 from latest cvs:
cc -dynamiclib -flat_namespace -compatibility_version 6.3 -current_version 6.3 -install_name /usr/local/grass-6.3.cvs/lib/libgrass_sim.dylib -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib/libgrass_sim.6.3.cvs.dylib -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib OBJ.powerpc-apple-darwin8.7.0/input.o OBJ.powerpc-apple-darwin8.7.0/random.o OBJ.powerpc-apple-darwin8.7.0/hydro.o OBJ.powerpc-apple-darwin8.7.0/output.o OBJ.powerpc-apple-darwin8.7.0/erod.o -lgrass_gis -lgrass_datetime -lz -lgrass_bitmap -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gmath -L/usr/local/lib -lfftw -lgrass_linkm -lz -lgrass_sites && if [ -z "" ] ; then ln -f -s libgrass_sim.6.3.cvs.dylib /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib/libgrass_sim.dylib; fi
ld: warning can't open dynamic library: /usr/local/grass-6.3.cvs/lib/libgrass_vect.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: warning can't open dynamic library: /usr/local/grass-6.3.cvs/lib/libgrass_dig2.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: warning can't open dynamic library: /usr/local/grass-6.3.cvs/lib/libgrass_dgl.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: warning can't open dynamic library: /usr/local/grass-6.3.cvs/lib/libgrass_rtree.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: Undefined symbols:
_Vect_append_point
_Vect_build
_Vect_cat_get
_Vect_cat_set
_Vect_close
_Vect_get_comment
_Vect_get_field
_Vect_get_name
_Vect_is_3d
_Vect_new_cats_struct
_Vect_new_line_struct
_Vect_open_new
_Vect_open_old
_Vect_read_next_line
_Vect_reset_cats
_Vect_reset_line
_Vect_set_comment
_Vect_set_date
_Vect_set_map_name
_Vect_set_open_level
_Vect_write_line
/usr/bin/libtool: internal link edit command failed
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib/libgrass_sim.6.3.cvs.dylib] Error 1
r.sim.water
gcc -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib -I/usr/local/include -DPACKAGE=\""grassmods"\" -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/r.sim.water OBJ.powerpc-apple-darwin8.7.0/main.o -lgrass_sim -lgrass_bitmap -lgrass_linkm -lgrass_sites -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -L/usr/local/lib -lgdal -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz -lgrass_datetime -lgrass_gmath -L/usr/local/lib -lfftw -lz
/usr/bin/ld: can't locate file for: -lgrass_sim
collect2: ld returned 1 exit status
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/r.sim.water] Error 1
r.sim.sediment
gcc -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib -I/usr/local/include -DPACKAGE=\""grassmods"\" -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/r.sim.sediment OBJ.powerpc-apple-darwin8.7.0/main.o -lgrass_sim -lgrass_bitmap -lgrass_linkm -lgrass_sites -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -L/usr/local/lib -lgdal -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz -lgrass_datetime -lgrass_gmath -L/usr/local/lib -lfftw -lz
/usr/bin/ld: can't locate file for: -lgrass_sim
collect2: ld returned 1 exit status
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/r.sim.sediment] Error 1

*******************************************************
Dr. Agustin Diez Castillo
Departament de Prehistoria i Arqueologia
Universitat de Valencia Phone: +34 963 86 42 42
Avda. Blasco Iba–ez, 28 Fax: +34 963 98 38 87
Valencia 46010
*******************************************************

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"I ache, therefore I am. Or in my case - I am, therefore I ache."

- Marvin

Michael Barton napisa?(a):

I posted a message on this over a week ago and got no reply.

<http://grass.itc.it/pipermail/grass-dev/2006-August/024866.html&gt;

I also discovered this and thought it was a bug at first. But when I looked
at the code (this new 'explore mode' was developed by Cedric Shock), I
realized that it was intentional.

That is, it is dynamically changing resolution to speed display times as you
zoom in and out.

A thought on this: how is switching from res=30 to res=8.29265653 (se my
previous message) supposed to speed anything up? Did you miss something
in my writing or is it me missing something?

Maciek

Maciek,

I think that it's going from res=8 to res=30 as your extents go from 100x100
to 1000x1000 that is supposed to make it faster. The resolution is a
function of the extents. This code is only implemented (in 6.1 at least) if
you go into the explore mode. So that's why I'm trying to track your
problems better. I've done this, going back and forth between modes and can
only get it to change resolution if I'm in explore mode. I'll keep looking
into it.

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

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

From: Maciej Sieczka <tutey@o2.pl>
Date: Fri, 18 Aug 2006 20:45:58 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: grass-dev <grass-dev@grass.itc.it>, Jarek Jasiewicz <jarekj@amu.edu.pl>
Subject: Re: gis.m: resolution not preserved

Michael Barton napisa?(a):

I posted a message on this over a week ago and got no reply.

<http://grass.itc.it/pipermail/grass-dev/2006-August/024866.html&gt;

I also discovered this and thought it was a bug at first. But when I looked
at the code (this new 'explore mode' was developed by Cedric Shock), I
realized that it was intentional.

That is, it is dynamically changing resolution to speed display times as you
zoom in and out.

A thought on this: how is switching from res=30 to res=8.29265653 (se my
previous message) supposed to speed anything up? Did you miss something
in my writing or is it me missing something?

Maciek

Michael Barton napisa?(a):

I think that it's going from res=8 to res=30

No. It's going from 30 to 8.

Another example:

#0 grass63 -text, spearfish60, g.region rast=slope -a, gis.m

ALL COMMANDS BELOW ARE CALLED FROM gis.m:

#1 g.region -g
n=4928030
s=4913690
w=589980
e=609000
nsres=30
ewres=30
rows=478
cols=634

#2 add 'slope' raster, display, zoom in (CONSTRAIN mode)

#3 g.region -g
n=4925144.14938
s=4922139.29461
w=595930.207469
e=599887.095436
nsres=30.0485477
ewres=29.97642399
rows=100
cols=132

#4 swith to EXPLORE mode

#5 g.region -g
n=4925144.14938
s=4922139.29461
w=595907.492984
e=599909.809921
nsres=6.23413853
ewres=6.23413853
rows=482
cols=642

As you see, the resolution goes from ~30 to ~6. This will not speed up
the display, will it?

I've done this, going back and forth between modes and can only
get it to change resolution if I'm in explore mode. I'll keep
looking into it.

Above you can also see that resolution changed a bit between #1 and #2.
This proves that gis.m doesn't allign region to resolution, while it
should (like d.zoom did) to avoid weird results in the output of
commands that use current region settings.

I must be really going now. See you next week!

Cheers,
Maciek

Maciej,

See below. I hope you realize that I and others appreciate the work you do
to find and get fixed all the little (and some not so little) things that
can frustrate GRASS users.

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

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

From: Maciej Sieczka <tutey@o2.pl>
Date: Fri, 18 Aug 2006 21:55:49 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: grass-dev <grass-dev@grass.itc.it>, Jarek Jasiewicz <jarekj@amu.edu.pl>
Subject: Re: gis.m: resolution not preserved

Michael Barton napisa?(a):

I think that it's going from res=8 to res=30

No. It's going from 30 to 8.

Another example:

#0 grass63 -text, spearfish60, g.region rast=slope -a, gis.m

ALL COMMANDS BELOW ARE CALLED FROM gis.m:

#1 g.region -g
n=4928030
s=4913690
w=589980
e=609000
nsres=30
ewres=30
rows=478
cols=634

#2 add 'slope' raster, display, zoom in (CONSTRAIN mode)

#3 g.region -g
n=4925144.14938
s=4922139.29461
w=595930.207469
e=599887.095436
nsres=30.0485477
ewres=29.97642399
rows=100
cols=132

#4 swith to EXPLORE mode

#5 g.region -g
n=4925144.14938
s=4922139.29461
w=595907.492984
e=599909.809921
nsres=6.23413853
ewres=6.23413853
rows=482
cols=642

The resolution is a function of the extents. If you zoom in from here, the
res value gets smaller; if you zoom out it gets bigger. It is not related to
prior resolution. It is set so that you get a +/- constant number of pixels
in the display output. This is why it is faster overall.

As you see, the resolution goes from ~30 to ~6. This will not speed up
the display, will it?

I've done this, going back and forth between modes and can only
get it to change resolution if I'm in explore mode. I'll keep
looking into it.

Above you can also see that resolution changed a bit between #1 and #2.
This proves that gis.m doesn't allign region to resolution, while it
should (like d.zoom did) to avoid weird results in the output of
commands that use current region settings.

This is the -a issue, rather than a big change in resolution. I see now.
There is some complication as to where to put the -a so that it doesn't mess
things up when you DON'T want to align to region. I'll try again to put it
in somewhere.

Michael

I must be really going now. See you next week!

Cheers,
Maciek

William,
$(VECTLIB) did it in simwe, but make stills fails at lidar and nviz.
/usr/bin/libtool: internal link edit command failed
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib/libgrass_lidar.6.3.cvs.dylib] Error 1
v.bspline
gcc -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib -I/usr/local/include -DPACKAGE=\""grassmods"\" -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/v.bspline OBJ.powerpc-apple-darwin8.7.0/main.o -lgrass_lidar -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -L/usr/local/lib -lgdal -lgrass_gis -lgrass_datetime -lz -lgrass_segment -lgrass_gmath -L/usr/local/lib -lfftw -lz
/usr/bin/ld: can't locate file for: -lgrass_lidar
collect2: ld returned 1 exit status
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/v.bspline] Error 1
v.outlier
gcc -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib -I/usr/local/include -DPACKAGE=\""grassmods"\" -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/v.outlier OBJ.powerpc-apple-darwin8.7.0/main.o OBJ.powerpc-apple-darwin8.7.0/outlier.o -lgrass_lidar -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -L/usr/local/lib -lgdal -lgrass_gis -lgrass_datetime -lz -lgrass_segment -lgrass_gmath -L/usr/local/lib -lfftw -lz
/usr/bin/ld: can't locate file for: -lgrass_lidar
collect2: ld returned 1 exit status
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/v.outlier] Error 1
v.lidar.correction
gcc -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib -I/usr/local/include -DPACKAGE=\""grassmods"\" -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/v.lidar.correction OBJ.powerpc-apple-darwin8.7.0/correction.o OBJ.powerpc-apple-darwin8.7.0/main.o -lgrass_lidar -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -L/usr/local/lib -lgdal -lgrass_gis -lgrass_datetime -lz -lgrass_segment -lgrass_gmath -L/usr/local/lib -lfftw -lz
/usr/bin/ld: can't locate file for: -lgrass_lidar
collect2: ld returned 1 exit status
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/v.lidar.correction] Error 1
v.lidar.edgedetection
gcc -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib -I/usr/local/include -DPACKAGE=\""grassmods"\" -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/v.lidar.edgedetection OBJ.powerpc-apple-darwin8.7.0/edgedetection.o OBJ.powerpc-apple-darwin8.7.0/main.o -lgrass_lidar -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -L/usr/local/lib -lgdal -lgrass_gis -lgrass_datetime -lz -lgrass_segment -lgrass_gmath -L/usr/local/lib -lfftw -lz
/usr/bin/ld: can't locate file for: -lgrass_lidar
collect2: ld returned 1 exit status
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/v.lidar.edgedetection] Error 1
v.lidar.growing
gcc -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib -I/usr/local/include -DPACKAGE=\""grassmods"\" -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/v.lidar.growing OBJ.powerpc-apple-darwin8.7.0/ConvexHull.o OBJ.powerpc-apple-darwin8.7.0/growing.o OBJ.powerpc-apple-darwin8.7.0/main.o -lgrass_lidar -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -L/usr/local/lib -lgdal -lgrass_gis -lgrass_datetime -lz -lgrass_segment -lgrass_gmath -L/usr/local/lib -lfftw -lz
/usr/bin/ld: can't locate file for: -lgrass_lidar
collect2: ld returned 1 exit status
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/v.lidar.growing] Error 1
__________
At nviz
____________
gcc -I/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/include -I/usr/local/include -I/usr/include -g -O3 -D_FILE_OFFSET_BITS=64 -I/usr/include -I/usr/X11R6/include -I/usr/X11R6/include -I/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/include -I/usr/local/include -I/usr/local/include -DPACKAGE=\""grassmods"\" -I/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/include \
         -o OBJ.powerpc-apple-darwin8.7.0/togl.o -c togl.c
In file included from togl.c:55:
/usr/include/tkMacOSX.h:19:19: error: tkInt.h: No such file or directory
In file included from /usr/include/tkMacOSX.h:32,
                  from togl.c:55:
/usr/include/tkPlatDecls.h:107: error: parse error before '*' token
/usr/include/tkPlatDecls.h:152: error: parse error before '*' token
togl.c:56:54: error: tkMacOSXInt.h: No such file or directory

*******************************************************
Dr. Agustin Diez Castillo
Departament de Prehistoria i Arqueologia
Universitat de Valencia Phone: +34 963 86 42 42
Avda. Blasco Iba–ez, 28 Fax: +34 963 98 38 87
Valencia 46010
*******************************************************

On 18/08/2006, at 08:29 PM, William Kyngesburye wrote:

A bit of a quirk with Apple's linker (though it might be more general), if you've never installed 6.3 before. Some of those libraries needed by simlib also use other grass libraries. Normally the linker would find those automatically from their install locations, but since you don't have GRASS installed yet (this version at least), it fails.

Edit raster/simwe/simlib/makefile, and add $(VECTLIB) to EXTRA_LIBS.

I also have to do this when I build a universal GRASS, since everything is going thru the Universal SDK which alters paths on the fly. I've been a bit hesitant (and lazy) to file this as a bug, but maybe I should.

On Aug 18, 2006, at 1:05 PM, Agustin Diez Castillo wrote:

I got this error when compiling simlib on a PPC iMac G5 from latest cvs:
cc -dynamiclib -flat_namespace -compatibility_version 6.3 -current_version 6.3 -install_name /usr/local/grass-6.3.cvs/lib/libgrass_sim.dylib -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib/libgrass_sim.6.3.cvs.dylib -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib OBJ.powerpc-apple-darwin8.7.0/input.o OBJ.powerpc-apple-darwin8.7.0/random.o OBJ.powerpc-apple-darwin8.7.0/hydro.o OBJ.powerpc-apple-darwin8.7.0/output.o OBJ.powerpc-apple-darwin8.7.0/erod.o -lgrass_gis -lgrass_datetime -lz -lgrass_bitmap -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gmath -L/usr/local/lib -lfftw -lgrass_linkm -lz -lgrass_sites && if [ -z "" ] ; then ln -f -s libgrass_sim.6.3.cvs.dylib /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib/libgrass_sim.dylib; fi
ld: warning can't open dynamic library: /usr/local/grass-6.3.cvs/lib/libgrass_vect.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: warning can't open dynamic library: /usr/local/grass-6.3.cvs/lib/libgrass_dig2.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: warning can't open dynamic library: /usr/local/grass-6.3.cvs/lib/libgrass_dgl.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: warning can't open dynamic library: /usr/local/grass-6.3.cvs/lib/libgrass_rtree.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: Undefined symbols:
_Vect_append_point
_Vect_build
_Vect_cat_get
_Vect_cat_set
_Vect_close
_Vect_get_comment
_Vect_get_field
_Vect_get_name
_Vect_is_3d
_Vect_new_cats_struct
_Vect_new_line_struct
_Vect_open_new
_Vect_open_old
_Vect_read_next_line
_Vect_reset_cats
_Vect_reset_line
_Vect_set_comment
_Vect_set_date
_Vect_set_map_name
_Vect_set_open_level
_Vect_write_line
/usr/bin/libtool: internal link edit command failed
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib/libgrass_sim.6.3.cvs.dylib] Error 1
r.sim.water
gcc -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib -I/usr/local/include -DPACKAGE=\""grassmods"\" -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/r.sim.water OBJ.powerpc-apple-darwin8.7.0/main.o -lgrass_sim -lgrass_bitmap -lgrass_linkm -lgrass_sites -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -L/usr/local/lib -lgdal -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz -lgrass_datetime -lgrass_gmath -L/usr/local/lib -lfftw -lz
/usr/bin/ld: can't locate file for: -lgrass_sim
collect2: ld returned 1 exit status
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/r.sim.water] Error 1
r.sim.sediment
gcc -L/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/lib -L/usr/local/pgsql/lib -I/usr/local/include -DPACKAGE=\""grassmods"\" -o /Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/r.sim.sediment OBJ.powerpc-apple-darwin8.7.0/main.o -lgrass_sim -lgrass_bitmap -lgrass_linkm -lgrass_sites -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -L/usr/local/lib -lgdal -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz -lgrass_datetime -lgrass_gmath -L/usr/local/lib -lfftw -lz
/usr/bin/ld: can't locate file for: -lgrass_sim
collect2: ld returned 1 exit status
make[1]: *** [/Users/Shared/src/grass6_3/grass6/dist.powerpc-apple-darwin8.7.0/bin/r.sim.sediment] Error 1

*******************************************************
Dr. Agustin Diez Castillo
Departament de Prehistoria i Arqueologia
Universitat de Valencia Phone: +34 963 86 42 42
Avda. Blasco Iba–ez, 28 Fax: +34 963 98 38 87
Valencia 46010
*******************************************************

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"I ache, therefore I am. Or in my case - I am, therefore I ache."

- Marvin

On Aug 18, 2006, at 4:01 PM, Agustin Diez Castillo wrote:

William,
$(VECTLIB) did it in simwe, but make stills fails at lidar and nviz.

I got the lidar errors also, but I haven't pursued that yet, so I don't know what to say. If you don't need the lidar modules, you can ignore the errors and lidar just won't get installed.

__________
At nviz
____________

The options for configuring OpenGL use (for NVIZ) changed recently. By default it uses an X11 build (like it has always done in the past), so you would have to make sure you have an X11 build of Tcl/Tk, which is not standard on OS X. The explicit option is --with-opengl=x11. For an Aqua OpenGL, you use --with-opengl=aqua, and you must have installed an Aqua Tcl/Tk, like the one from Active State. BUT, NVIZ does not yet work in Aqua - crash on Intel and twitchy file browser dialog on PPC.

It will not work with Apple's Tcl/Tk because important private headers are missing - the ones from your errors.

Make sure you have an X11 Tcl/Tk installed and use that opengl option. You must build an X11 TclTk yourself. Also, explicitly set the tcltk dirs, --with-tcltk-includes and --with-tcltk-libs just to make sure you don't accidentally get Apple's TclTk. From your errors, it appears it is trying to use Apple's TclTk.

Even with that, I still had a small linking problem, for some reason my tcltk build didn't install the libtcl.dylib and libtk.dylib symlinks, so the link options -ltcl and -ltk found Apple's instead. After adding the symlinks, GRASS linked correctly.

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"I ache, therefore I am. Or in my case - I am, therefore I ache."

- Marvin

On Aug 18, 2006, at 3:01 PM, Agustin Diez Castillo wrote:

$(VECTLIB) did it in simwe, but make stills fails at lidar and nviz.

I have experienced a similar issue with sim and lidar - but I just ignore the failed modules, do a make install, and then they should build fine (change to the directory and issue 'make'), followed by a second make install...

Regards,

Jeshua Lacock, Owner
<http://OpenOSX.com>
phone: 877.240.1364