[GRASS-user] r.le.setup trouble

Hi list,

I have some trouble with the r.le.setup module, maybe someone knows the
solution to this.

When I run r.le.setup to define my moving window specification to use in
further r.le analysis the module stalls when I'm being asked to specify
the size of my (rectangular) moving window. If I do so, let's say a 3 by
3 window, it complains about a 0 being present while I didn't type any
zeros.

The full output of the procedure I followed is listed below:

HOW WILL YOU SPECIFY THE MOVING WINDOW?

       Use keyboard to enter moving window dimensions 1
       Use mouse to draw moving window 2

                                            Which Number? 1

    If a MASK is not present (see r.mask) a beep may sound
    and a WARNING may be printed that can be ignored.
    If a MASK is present there will be no warning.
WARNING: unable to open raster map [MASK in PERMANENT]

    Do you want to sample using rectangles
       (including squares) (y) or circles (n)? (y/n) [y]

    Enter number of COLUMNS & ROWS for the dimensions of
       the moving window (e.g., 10 10): 3 3

    You entered a dimension as 0; enter dimensions again

---

Entering other delimiters other than space didn't work either.

Any clues why I can't define ar rectangular moving window. I tried a
circular one and that did work?

Kind regards,
Koen

Koen Hufkens wrote:

I have some trouble with the r.le.setup module, maybe someone knows
the solution to this.

When I run r.le.setup to define my moving window specification to use
in further r.le analysis the module stalls when I'm being asked to
specify the size of my (rectangular) moving window. If I do so, let's
say a 3 by 3 window, it complains about a 0 being present while I
didn't type any zeros.

The full output of the procedure I followed is listed below:

HOW WILL YOU SPECIFY THE MOVING WINDOW?

       Use keyboard to enter moving window dimensions 1
       Use mouse to draw moving window 2

                                            Which Number? 1

    If a MASK is not present (see r.mask) a beep may sound
    and a WARNING may be printed that can be ignored.
    If a MASK is present there will be no warning.
WARNING: unable to open raster map [MASK in PERMANENT]

    Do you want to sample using rectangles
       (including squares) (y) or circles (n)? (y/n) [y]

    Enter number of COLUMNS & ROWS for the dimensions of
       the moving window (e.g., 10 10): 3 3

    You entered a dimension as 0; enter dimensions again

---

Entering other delimiters other than space didn't work either.

Any clues why I can't define ar rectangular moving window. I tried a
circular one and that did work?

What version of GRASS? There were substantial fixes for r.le.setup right
before GRASS 6.2.0 was released. If 6.3-cvs, check out r.li too.

The above works fine for me using the spearfish dataset. Space as the
delim between "3 3". Draws the box, then moves on to the next question.

here is the relevant code from r.le.setup/mv_wind.c

...
      /* if sampling using rectangles/squares */

        else {
back:
           fprintf(stderr, "\n Enter number of COLUMNS & ROWS for the dimensions of");
           fprintf(stderr, "\n the moving window (e.g., 10 10): ");

           numtrap(2, tmp);
           u_w = fabs(tmp[0]);
           u_l = fabs(tmp[1]);
           u_w0 = fabs(tmp[0])/mx[0];
           u_l0 = fabs(tmp[1])/mx[1];

        /* trap possible errors in dimensions */

           if (!u_w0 || !u_l0) {
              fprintf(stderr, "\n You entered a dimension as 0; enter dimensions again\n");

              goto back;
           }

numtrap() is at the end of r.le.setup/sample.c.

Hamish

I'm using 6.0.2 from the ubuntu repositories.

I'm currently looking for a repository offering a more recent release
but I don't seem to find one.

It has something to with this release because I tried the same thing on
the computer of friend of mine and it gave the same error.

Koen

On Tue, 2006-12-12 at 00:11 +1300, Hamish wrote:

Koen Hufkens wrote:
> I have some trouble with the r.le.setup module, maybe someone knows
> the solution to this.
>
> When I run r.le.setup to define my moving window specification to use
> in further r.le analysis the module stalls when I'm being asked to
> specify the size of my (rectangular) moving window. If I do so, let's
> say a 3 by 3 window, it complains about a 0 being present while I
> didn't type any zeros.
>
> The full output of the procedure I followed is listed below:
>
> HOW WILL YOU SPECIFY THE MOVING WINDOW?
>
> Use keyboard to enter moving window dimensions 1
> Use mouse to draw moving window 2
>
> Which Number? 1
>
> If a MASK is not present (see r.mask) a beep may sound
> and a WARNING may be printed that can be ignored.
> If a MASK is present there will be no warning.
> WARNING: unable to open raster map [MASK in PERMANENT]
>
>
> Do you want to sample using rectangles
> (including squares) (y) or circles (n)? (y/n) [y]
>
> Enter number of COLUMNS & ROWS for the dimensions of
> the moving window (e.g., 10 10): 3 3
>
> You entered a dimension as 0; enter dimensions again
>
> ---
>
> Entering other delimiters other than space didn't work either.
>
> Any clues why I can't define ar rectangular moving window. I tried a
> circular one and that did work?

What version of GRASS? There were substantial fixes for r.le.setup right
before GRASS 6.2.0 was released. If 6.3-cvs, check out r.li too.

The above works fine for me using the spearfish dataset. Space as the
delim between "3 3". Draws the box, then moves on to the next question.

here is the relevant code from r.le.setup/mv_wind.c

...
      /* if sampling using rectangles/squares */

        else {
back:
           fprintf(stderr, "\n Enter number of COLUMNS & ROWS for the dimensions of");
           fprintf(stderr, "\n the moving window (e.g., 10 10): ");

           numtrap(2, tmp);
           u_w = fabs(tmp[0]);
           u_l = fabs(tmp[1]);
           u_w0 = fabs(tmp[0])/mx[0];
           u_l0 = fabs(tmp[1])/mx[1];

        /* trap possible errors in dimensions */

           if (!u_w0 || !u_l0) {
              fprintf(stderr, "\n You entered a dimension as 0; enter dimensions again\n");

              goto back;
           }

numtrap() is at the end of r.le.setup/sample.c.

Hamish

hi,
On Mon, Dec 11, 2006 at 02:29:46PM +0100, Koen Hufkens wrote:

I'm using 6.0.2 from the ubuntu repositories.

I'm currently looking for a repository offering a more recent release
but I don't seem to find one.

try this:

deb http://les-ejk.cz/ubuntu edgy multiverse

I got at least one positive feedback

please, let me know, if the packages are all right

thank you

jachym

P.S. GRASS 6.2.0, gdal 1.3.2, proj 4.5, qgis 0.8

It has something to with this release because I tried the same thing on
the computer of friend of mine and it gave the same error.

Koen

On Tue, 2006-12-12 at 00:11 +1300, Hamish wrote:
> Koen Hufkens wrote:
> > I have some trouble with the r.le.setup module, maybe someone knows
> > the solution to this.
> >
> > When I run r.le.setup to define my moving window specification to use
> > in further r.le analysis the module stalls when I'm being asked to
> > specify the size of my (rectangular) moving window. If I do so, let's
> > say a 3 by 3 window, it complains about a 0 being present while I
> > didn't type any zeros.
> >
> > The full output of the procedure I followed is listed below:
> >
> > HOW WILL YOU SPECIFY THE MOVING WINDOW?
> >
> > Use keyboard to enter moving window dimensions 1
> > Use mouse to draw moving window 2
> >
> > Which Number? 1
> >
> > If a MASK is not present (see r.mask) a beep may sound
> > and a WARNING may be printed that can be ignored.
> > If a MASK is present there will be no warning.
> > WARNING: unable to open raster map [MASK in PERMANENT]
> >
> >
> > Do you want to sample using rectangles
> > (including squares) (y) or circles (n)? (y/n) [y]
> >
> > Enter number of COLUMNS & ROWS for the dimensions of
> > the moving window (e.g., 10 10): 3 3
> >
> > You entered a dimension as 0; enter dimensions again
> >
> > ---
> >
> > Entering other delimiters other than space didn't work either.
> >
> > Any clues why I can't define ar rectangular moving window. I tried a
> > circular one and that did work?
>
> What version of GRASS? There were substantial fixes for r.le.setup right
> before GRASS 6.2.0 was released. If 6.3-cvs, check out r.li too.
>
>
> The above works fine for me using the spearfish dataset. Space as the
> delim between "3 3". Draws the box, then moves on to the next question.
>
>
> here is the relevant code from r.le.setup/mv_wind.c
>
> ...
> /* if sampling using rectangles/squares */
>
> else {
> back:
> fprintf(stderr, "\n Enter number of COLUMNS & ROWS for the dimensions of");
> fprintf(stderr, "\n the moving window (e.g., 10 10): ");
>
> numtrap(2, tmp);
> u_w = fabs(tmp[0]);
> u_l = fabs(tmp[1]);
> u_w0 = fabs(tmp[0])/mx[0];
> u_l0 = fabs(tmp[1])/mx[1];
>
> /* trap possible errors in dimensions */
>
> if (!u_w0 || !u_l0) {
> fprintf(stderr, "\n You entered a dimension as 0; enter dimensions again\n");
>
> goto back;
> }
>
>
>
> numtrap() is at the end of r.le.setup/sample.c.
>
>
>
> Hamish

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

--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub
-----------------------------------------
OFFICE:
Department of Geoinformation Technologies
Zemedelska 3
613 00, Brno
Czech Republick
e-mail: xcepicky@node.mendelu.cz
URL: http://mapserver.mendelu.cz
Tel.: +420 545 134 514

Thank you, but it doesn't seem to work. Probably because I work on an
amd64 machine not i386.

But I'll keep looking, my current efforts to install from tarball were
not a succes so I'll try to get hold of a .dep package.

Koen

On Mon, 2006-12-11 at 14:53 +0100, Jachym Cepicky wrote:

hi,
On Mon, Dec 11, 2006 at 02:29:46PM +0100, Koen Hufkens wrote:
> I'm using 6.0.2 from the ubuntu repositories.
>
> I'm currently looking for a repository offering a more recent release
> but I don't seem to find one.

try this:

deb http://les-ejk.cz/ubuntu edgy multiverse

I got at least one positive feedback

please, let me know, if the packages are all right

thank you

jachym

P.S. GRASS 6.2.0, gdal 1.3.2, proj 4.5, qgis 0.8
>
> It has something to with this release because I tried the same thing on
> the computer of friend of mine and it gave the same error.
>
> Koen
>
> On Tue, 2006-12-12 at 00:11 +1300, Hamish wrote:
> > Koen Hufkens wrote:
> > > I have some trouble with the r.le.setup module, maybe someone knows
> > > the solution to this.
> > >
> > > When I run r.le.setup to define my moving window specification to use
> > > in further r.le analysis the module stalls when I'm being asked to
> > > specify the size of my (rectangular) moving window. If I do so, let's
> > > say a 3 by 3 window, it complains about a 0 being present while I
> > > didn't type any zeros.
> > >
> > > The full output of the procedure I followed is listed below:
> > >
> > > HOW WILL YOU SPECIFY THE MOVING WINDOW?
> > >
> > > Use keyboard to enter moving window dimensions 1
> > > Use mouse to draw moving window 2
> > >
> > > Which Number? 1
> > >
> > > If a MASK is not present (see r.mask) a beep may sound
> > > and a WARNING may be printed that can be ignored.
> > > If a MASK is present there will be no warning.
> > > WARNING: unable to open raster map [MASK in PERMANENT]
> > >
> > >
> > > Do you want to sample using rectangles
> > > (including squares) (y) or circles (n)? (y/n) [y]
> > >
> > > Enter number of COLUMNS & ROWS for the dimensions of
> > > the moving window (e.g., 10 10): 3 3
> > >
> > > You entered a dimension as 0; enter dimensions again
> > >
> > > ---
> > >
> > > Entering other delimiters other than space didn't work either.
> > >
> > > Any clues why I can't define ar rectangular moving window. I tried a
> > > circular one and that did work?
> >
> > What version of GRASS? There were substantial fixes for r.le.setup right
> > before GRASS 6.2.0 was released. If 6.3-cvs, check out r.li too.
> >
> >
> > The above works fine for me using the spearfish dataset. Space as the
> > delim between "3 3". Draws the box, then moves on to the next question.
> >
> >
> > here is the relevant code from r.le.setup/mv_wind.c
> >
> > ...
> > /* if sampling using rectangles/squares */
> >
> > else {
> > back:
> > fprintf(stderr, "\n Enter number of COLUMNS & ROWS for the dimensions of");
> > fprintf(stderr, "\n the moving window (e.g., 10 10): ");
> >
> > numtrap(2, tmp);
> > u_w = fabs(tmp[0]);
> > u_l = fabs(tmp[1]);
> > u_w0 = fabs(tmp[0])/mx[0];
> > u_l0 = fabs(tmp[1])/mx[1];
> >
> > /* trap possible errors in dimensions */
> >
> > if (!u_w0 || !u_l0) {
> > fprintf(stderr, "\n You entered a dimension as 0; enter dimensions again\n");
> >
> > goto back;
> > }
> >
> >
> >
> > numtrap() is at the end of r.le.setup/sample.c.
> >
> >
> >
> > Hamish
>
> _______________________________________________
> grassuser mailing list
> grassuser@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grassuser

Koen Hufkens wrote:

Thank you, but it doesn't seem to work. Probably because I work on an
amd64 machine not i386.

But I'll keep looking, my current efforts to install from tarball were
not a succes so I'll try to get hold of a .dep package.

On GRASS download site there are generic binary packages for 64bit. Not
as convenient as debs, but still easier to handle than building from
source:

http://grass.itc.it/grass62/binary/linux/snapshot/

You'll need the 6.2.1 snapshot (safer and richer than latest 6.0.x or
6.2; 6.2.1 will be soon released).

How-to install is there on the site.

Maciek

Hamish wrote:

> What version of GRASS? There were substantial fixes for r.le.setup
> right before GRASS 6.2.0 was released. If 6.3-cvs, check out r.li
> too.

Koen Hufkens wrote:

I'm using 6.0.2 from the ubuntu repositories.

Ok, you will need to use GRASS 6.2.x. if you want to use r.le.* as it is
somewhat broken in 6.0.2.

I'm currently looking for a repository offering a more recent release
but I don't seem to find one.

Jachym's; also you might try the DebianGIS experimental amd64 version:
  http://packages.debian.org/grass

or compile it yourself. my instructions are for Debian, but Ubuntu
should be near identical:
  http://grass.gdf-hannover.de/wiki/Compile_and_Install#Platform_Specific_Notes
  http://hamish.bowman.googlepages.com/debiangisfiles#compile

generic binary packages

These are not for a debian based distro, so I worry that these could be
more problematic in the long-run due to different library naming, etc.
versus compiling it yourself.

Hamish

I installed the debian packages and everything runs fine but my problem
isn't resolved with the upgrade.

I'll try to read in my input data again, maybe this will help.

Koen

On Tue, 2006-12-12 at 01:12 +0100, Hamish wrote:

Hamish wrote:
> > What version of GRASS? There were substantial fixes for r.le.setup
> > right before GRASS 6.2.0 was released. If 6.3-cvs, check out r.li
> > too.

Koen Hufkens wrote:
> I'm using 6.0.2 from the ubuntu repositories.

Ok, you will need to use GRASS 6.2.x. if you want to use r.le.* as it
is
somewhat broken in 6.0.2.

> I'm currently looking for a repository offering a more recent
release
> but I don't seem to find one.

Jachym's; also you might try the DebianGIS experimental amd64 version:
  http://packages.debian.org/grass

or compile it yourself. my instructions are for Debian, but Ubuntu
should be near identical:

http://grass.gdf-hannover.de/wiki/Compile_and_Install#Platform_Specific_Notes
  http://hamish.bowman.googlepages.com/debiangisfiles#compile

> generic binary packages

These are not for a debian based distro, so I worry that these could
be
more problematic in the long-run due to different library naming, etc.
versus compiling it yourself.

Hamish