[GRASS-user] Error using v.rast.stats script in cigwin and wingrass

Hi,

Using v.rast.stats in grass6.3 both in cygwin and native windows,

v.rast.stats vector=myupland_lowland@allah_valley layer=1
raster=allah_dem@allah_valley colprefix=dem percentile=90

I get this error

:/GRASS/scripts/v.rast.stats: r.cats: command not found

I see no entry in the 6.3 manual on r.cats

any ideas on using v.rast.stats?

On Wed, May 21, 2008 at 2:44 AM, Jonathan Greenberg
<greenberg@ucdavis.edu> wrote:

Juan:

Some responses below:

Well, that's exactly the problem, i cannot make a complete mosaic for the
region i'm working on with only images taken on one day, and it adds
another
problem: the images do not overlay well... if they did, i would been able
to
do a radiometric normalization easily (as Johnattan Greenberg
suggested)...

By "do not overlay well" I assume you mean they aren't well orthorectified
to one another -- although I consider this a "must do" for mosaicking and
for any level of image-to-image work (because of the time savings), you
COULD manually pick PIFs in the overlap zone (e.g. you'd pick a point in the
reference image, then visually pick the corresponding pixel in the
uncorrected image) -- orthorectifying first saves you the time of having to
pick two points per image -- rather, you just pick one point. How many
images do you have in your mosaic? Image-to-image rectification with
landsat imagery is fairly painless, shouldn't take you much more than 30
mins per image once you get going with it.
At any rate, once you pick your PIFs, you can use v.what.rast or starspan
(starspan.casil.ucdavis.edu) to get this data out to a table to do the
regression calculations.

So my problem now is how to overlay landsat images taken in different
days.
I've already asked for help on this issue (with no solution so far; mail
subject="mosaic with landsat geotiff"), so guess i'll resume that
thread...

if it is simply an "automatic contrast" adjustment, you could linearly
interpolate between bands so they matched. (but then which is correct?) I
don't think it would be though, as LANDSAT has fixed calibration for each
band.

How's that?

This is what I suggested as well -- the question of which one is "correct"
is somewhat moot -- your goal, as I understand it, is to have all of the
images in the same radiometric scale, so you can just pick one (usually one
that's in the middle of your mosaic, and often temporally at the "edge" of
your time period (either a very early or a very recent image). If

if you run i.landsat.rgb on the two images with the same parameters do
they
match up well?

what do you mean with 'the same parameters'? (maybe "cropping
intensity"...)

that doesn't touch the values, only the colors, but it may
give you a clue about the cause of the difference.

How exactly? as an example, i can see a subtle difference in the color of
water in a river as it pases on to another 'tile', but what does it means,
i
don't have a clue... (the values changes from: |32|40|86| to |20|26|69|,
for
bands 3, 2, 1 respectively)

I guess the important thing is the ratio of the bands, not the exact
values
of one particular band. I take it you see a hard line at the boundary in
the processed image?

i suspect you mean the same as Johnattan G. with the radiometric
normalization... anyway, i don't know what you mean with 'proccesed
image'.
The original images come with a null region as a result of the
georreferencing, and after i use r.null -r to remove the NULL-value bitmap
file, yes, there is a hard line in the boundary, but what would that mean?

It just means your images aren't radiometrically normalized to one another.
If you correctly normalize them you won't see a line in the mosaic.

Hamish

JM
-------------------------------------------------------
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

--
Jonathan A. Greenberg, PhD
Postdoctoral Scholar
Center for Spatial Technologies and Remote Sensing (CSTARS)
University of California, Davis
One Shields Avenue
The Barn, Room 250N
Davis, CA 95616
Cell: 415-794-5043
AIM: jgrn307, MSN: jgrn307@hotmail.com, Gchat: jgrn307

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

--
|---------|----------------------------------------------------------|
| __.-._ |"Ohhh. Great warrior. Wars not make one great." -Yoda |
| '-._"7' |"Freedom is still the most radical idea of all" -N.Branden|
| /'.-c |Linux registered user #402901, http://counter.li.org/ |
| | /T |http://esambale.wikispaces.com|
| _)_/LI
|---------|----------------------------------------------------------|

maning sambale:

Using v.rast.stats in grass6.3 both in cygwin and native
windows,

v.rast.stats vector=myupland_lowland@allah_valley layer=1
raster=allah_dem@allah_valley colprefix=dem percentile=90

I get this error

:/GRASS/scripts/v.rast.stats: r.cats: command not found

I see no entry in the 6.3 manual on r.cats

any ideas on using v.rast.stats?

Are you using the official 6.3.0 or an old SVN snapshot? I though this was fixed for 6.3.0.

r.cats was renamed r.category, and (with 6.3.0) there should be a r.cats script which calls r.category. Before the script there was a symlink (alias) for it, but that didn't work so well with MSys and so was replaced with the forwarding script.

since then v.rast.stats has been updated to use the new name.

Hamish

from http://grass.ibiblio.org/grass63/binary/mswindows/cygwin/
downloaded last 2008/05/08

According to the site
grass-6.3.0-2.cygwin.tar.bz2 22-Apr-2008 10:09 20M

So the packages are 22 of April.

maning

On 5/21/08, Hamish <hamish_b@yahoo.com> wrote:

maning sambale:

Using v.rast.stats in grass6.3 both in cygwin and native
windows,

v.rast.stats vector=myupland_lowland@allah_valley layer=1
raster=allah_dem@allah_valley colprefix=dem percentile=90

I get this error

:/GRASS/scripts/v.rast.stats: r.cats: command not found

I see no entry in the 6.3 manual on r.cats

any ideas on using v.rast.stats?

Are you using the official 6.3.0 or an old SVN snapshot? I though this was
fixed for 6.3.0.

r.cats was renamed r.category, and (with 6.3.0) there should be a r.cats
script which calls r.category. Before the script there was a symlink (alias)
for it, but that didn't work so well with MSys and so was replaced with the
forwarding script.

since then v.rast.stats has been updated to use the new name.

Hamish

--
|---------|----------------------------------------------------------|
| __.-._ |"Ohhh. Great warrior. Wars not make one great." -Yoda |
| '-._"7' |"Freedom is still the most radical idea of all" -N.Branden|
| /'.-c |Linux registered user #402901, http://counter.li.org/ |
| | /T |http://esambale.wikispaces.com|
| _)_/LI
|---------|----------------------------------------------------------|

> maning sambale:
>> Using v.rast.stats in grass6.3 both in cygwin and
>> native windows,
>>
>> v.rast.stats vector=myupland_lowland@allah_valley
>> layer=1 raster=allah_dem@allah_valley colprefix=dem
>> percentile=90
>>
>> I get this error
>>
>> :/GRASS/scripts/v.rast.stats: r.cats: command not found
>>
>> I see no entry in the 6.3 manual on r.cats
>>
>> any ideas on using v.rast.stats?

Hamish:

> Are you using the official 6.3.0 or an old SVN
> snapshot? I though this was fixed for 6.3.0.
>
> r.cats was renamed r.category, and (with 6.3.0) there
> should be a r.cats script which calls r.category.
> Before the script there was a symlink (alias)
> for it, but that didn't work so well with MSys and
> so was replaced with the forwarding script.
>
> since then v.rast.stats has been updated to use the
> new name.

maning:

from
http://grass.ibiblio.org/grass63/binary/mswindows/cygwin/
downloaded last 2008/05/08

According to the site
grass-6.3.0-2.cygwin.tar.bz2 22-Apr-2008 10:09 20M

So the packages are 22 of April.

hmmm, don't know. the r.cats script should be there- it was included in the release source code:
http://trac.osgeo.org/grass/browser/grass/tags/release_20080423_grass_6_3_0_1/scripts/r.cats

oh well. the easiest solution is to edit the v.rast.stats script in a text editor to rename it, as seen here:
  http://trac.osgeo.org/grass/changeset/31306

(maybe do the edit in something more advanced than notepad - something that can handle UNIX newlines. e.g. TextPad, or nedit in Cygwin)

Hamish

Hamish,

hmmm, don't know. the r.cats script should be there- it was included in the
release source code:
http://trac.osgeo.org/grass/browser/grass/tags/release_20080423_grass_6_3_0_1/scripts/r.cats

oh well. the easiest solution is to edit the v.rast.stats script in a text
editor to rename it, as seen here:
  http://trac.osgeo.org/grass/changeset/31306

Done! It's running now. Will take a while to finish.

(maybe do the edit in something more advanced than notepad - something that
can handle UNIX newlines. e.g. TextPad, or nedit in Cygwin)

I use notepad++

Thanks again!

maning

On Wed, May 21, 2008 at 7:55 AM, Hamish <hamish_b@yahoo.com> wrote:

> maning sambale:
>> Using v.rast.stats in grass6.3 both in cygwin and
>> native windows,
>>
>> v.rast.stats vector=myupland_lowland@allah_valley
>> layer=1 raster=allah_dem@allah_valley colprefix=dem
>> percentile=90
>>
>> I get this error
>>
>> :/GRASS/scripts/v.rast.stats: r.cats: command not found
>>
>> I see no entry in the 6.3 manual on r.cats
>>
>> any ideas on using v.rast.stats?

Hamish:

> Are you using the official 6.3.0 or an old SVN
> snapshot? I though this was fixed for 6.3.0.
>
> r.cats was renamed r.category, and (with 6.3.0) there
> should be a r.cats script which calls r.category.
> Before the script there was a symlink (alias)
> for it, but that didn't work so well with MSys and
> so was replaced with the forwarding script.
>
> since then v.rast.stats has been updated to use the
> new name.

maning:

from
http://grass.ibiblio.org/grass63/binary/mswindows/cygwin/
downloaded last 2008/05/08

According to the site
grass-6.3.0-2.cygwin.tar.bz2 22-Apr-2008 10:09 20M

So the packages are 22 of April.

hmmm, don't know. the r.cats script should be there- it was included in the release source code:
http://trac.osgeo.org/grass/browser/grass/tags/release_20080423_grass_6_3_0_1/scripts/r.cats

oh well. the easiest solution is to edit the v.rast.stats script in a text editor to rename it, as seen here:
http://trac.osgeo.org/grass/changeset/31306

It's actually missing (seems to be 6.3.0 and not the re-release):

tar tvfj grass-6.3.0-2.cygwin.tar.bz2 | grep r.cat
-rwxr-xr-x neteler/users 52396 2008-04-19 22:21:09
usr/local/grass-6.3.0/bin/r.category.exe
-rw-r--r-- neteler/users 7743 2008-04-19 22:21:13
usr/local/grass-6.3.0/docs/html/r.category.html
-rwxr-xr-x neteler/users 23072 2008-04-19 22:13:52
usr/local/grass-6.3.0/etc/grocat.exe
-rw-r--r-- neteler/users 6291 2008-04-19 22:33:03
usr/local/grass-6.3.0/man/man1/r.category.1

Glynn, if you could send me the missing pieces, I'll update the package.

Markus

Markus Neteler wrote:

> hmmm, don't know. the r.cats script should be there- it was included in the release source code:
> http://trac.osgeo.org/grass/browser/grass/tags/release_20080423_grass_6_3_0_1/scripts/r.cats
>
> oh well. the easiest solution is to edit the v.rast.stats script in a text editor to rename it, as seen here:
> http://trac.osgeo.org/grass/changeset/31306

It's actually missing (seems to be 6.3.0 and not the re-release):

tar tvfj grass-6.3.0-2.cygwin.tar.bz2 | grep r.cat
-rwxr-xr-x neteler/users 52396 2008-04-19 22:21:09
usr/local/grass-6.3.0/bin/r.category.exe
-rw-r--r-- neteler/users 7743 2008-04-19 22:21:13
usr/local/grass-6.3.0/docs/html/r.category.html
-rwxr-xr-x neteler/users 23072 2008-04-19 22:13:52
usr/local/grass-6.3.0/etc/grocat.exe
-rw-r--r-- neteler/users 6291 2008-04-19 22:33:03
usr/local/grass-6.3.0/man/man1/r.category.1

Glynn, if you could send me the missing pieces, I'll update the package.

I think that I should send you a complete package built from the
updated 6_3_0_1 release.

Apart from the three "alias" scripts (d.paint.labels, p.out.vrml,
r.cats), and their HTML and manual pages, the 6.3.0-2 package is also
missing the manual pages for the imagery commands which were omitted
from the original release.

Also, many of the binaries differ (in terms of MD5 checksums) between
the two versions. This might indicate something significant, or it
might not.

--
Glynn Clements <glynn@gclements.plus.com>