[GRASS-windows] r.report, r.patch

13 messages Options
Embed this post
Permalink
Helena Mitasova

[GRASS-windows] r.report, r.patch

Reply Threaded More More options
Print post
Permalink
I have few issues from our class that I would like to ask about winGRASS

1. r.report does not work for two students (one has VISTA one has XP)
it does not print anything - it works for me
and others - has anybody had a similar problem?

2. r.patch does not work for one student on VISTA-
it is exactly the same problem reported as bug #118 but
according to bug tracker it was fixed and closed
http://trac.osgeo.org/grass/ticket/118
The command works for me and others on XP. Is there anybody else
who still has this problem? Michael did your students get it working?

3. copy and paste to cmd section of output window makes it copy it twice
- shift insert works- I have this problem too - is this a feature?

4. first one or two letters in output are sometimes skipped  - e.g. min
is n for r.univar and there are some others. Not a big deal but it is
somewhat confusing

5. r.in.xyz would import into a different LOCATION  if two are opened  
at once
I did not check this one.

6. When using GUI - what is the simplest way to draw a legend next to  
the
image? When using d.mon I just stretch the window to create some  
white space
and draw the legend there - fast and simple. When I try to do that  
using GUI
the legend is always written into the image. Am I missing something?

7. I am working on removing the sites related stuff
fom simwe so that we can get it back
but it is more work than I have expected, hopefully I will get it  
done for
the next release.

Everything else has been working so far - thanks a lot,

Helena

==============
Helena Mitasova
Associate Professor
Department of Marine, Earth
and Atmospheric Sciences
1125 Jordan Hall, Campus Box 8208
North Carolina State University
Raleigh NC 27695-8208
http://skagit.meas.ncsu.edu/~helena/




_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Moritz Lennert

Re: [GRASS-windows] r.report, r.patch

Reply Threaded More More options
Print post
Permalink
On 30/09/08 15:42, Helena Mitasova wrote:
> 2. r.patch does not work for one student on VISTA-
> it is exactly the same problem reported as bug #118 but
> according to bug tracker it was fixed and closed
> http://trac.osgeo.org/grass/ticket/118
> The command works for me and others on XP. Is there anybody else
> who still has this problem? Michael did your students get it working?

Did you follow Marco's advice of disabling UAC ?

> 6. When using GUI - what is the simplest way to draw a legend next to the
> image? When using d.mon I just stretch the window to create some white
> space
> and draw the legend there - fast and simple. When I try to do that using
> GUI
> the legend is always written into the image. Am I missing something?


http://lists.osgeo.org/pipermail/grass-user/2008-September/046703.html

Moritz
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Helena Mitasova

Re: [GRASS-windows] r.report, r.patch

Reply Threaded More More options
Print post
Permalink

On Sep 30, 2008, at 10:03 AM, Moritz Lennert wrote:

> On 30/09/08 15:42, Helena Mitasova wrote:
>> 2. r.patch does not work for one student on VISTA-
>> it is exactly the same problem reported as bug #118 but
>> according to bug tracker it was fixed and closed
>> http://trac.osgeo.org/grass/ticket/118
>> The command works for me and others on XP. Is there anybody else
>> who still has this problem? Michael did your students get it working?
>
> Did you follow Marco's advice of disabling UAC ?

I looked at it and as this is not my computer I would be hesitant to  
have
the student ask to disable it on her laptop.
Everything else is working well for her.

After reading about UAC troubles that people have I would say go back
to XP or you have to deal with it. But this would explain why r.patch  
works
for some people and not for others.

thanks a lot for the hint,

Helena

>
>> 6. When using GUI - what is the simplest way to draw a legend next  
>> to the
>> image? When using d.mon I just stretch the window to create some  
>> white space
>> and draw the legend there - fast and simple. When I try to do that  
>> using GUI
>> the legend is always written into the image. Am I missing something?
>
>
> http://lists.osgeo.org/pipermail/grass-user/2008-September/046703.html
>
> Moritz

_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Glynn Clements

Re: [GRASS-windows] r.report, r.patch

Reply Threaded More More options
Print post
Permalink
In reply to this post by Helena Mitasova

Helena Mitasova wrote:

> 1. r.report does not work for two students (one has VISTA one has XP)
> it does not print anything - it works for me
> and others - has anybody had a similar problem?

Maybe a problem with writing temporary files?

This (amongst other things[1]) will fail if there are spaces in
$GISDBASE. r.report constructs and executes (with system()) an r.stats
command which redirects to a temporary file, and the temporary
filename isn't quoted.

I've worked around the issue in 7.0 with r33627, which quotes the
filename.

More generally, we need to start eradicating the use of system() in
favour of e.g. G_spawn_ex(). Apart from anything else, this means that
someone needs to do a proper port to Windows using CreateProcess().

[There's currently a half-baked Windows version based around
spawnvpe(), but it doesn't handle redirection. Redirecting to a named
file could be fudged with spawnvpe(), but not redirecting to an open
handle.]

FWIW, I count 41 occurrences of [G_]system and [G_]popen in 7.0.

[1] In the process of converting the scripts to Python, I've noticed
that the output from "v.db.connect -g" isn't suitable for its intended
purpose, as it uses spaces to separate the fields, even though one of
the fields is typically a filename.

> 2. r.patch does not work for one student on VISTA-
> it is exactly the same problem reported as bug #118 but
> according to bug tracker it was fixed and closed
> http://trac.osgeo.org/grass/ticket/118
> The command works for me and others on XP. Is there anybody else
> who still has this problem? Michael did your students get it working?

I think that Windows users will ultimately need to ensure GISDBASE is
within their "Documents" directory. But that will require fixing the
myriad spaces-in-pathnames issues such as the above.

If any non-Windows users want to help out, Unix doesn't prohibit the
use of spaces in pathnames, so you can put a space in the name of the
GISDBASE directory and report any errors you encounter.

--
Glynn Clements <[hidden email]>
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Markus Neteler

Re: [GRASS-windows] r.report, r.patch

Reply Threaded More More options
Print post
Permalink
On Wed, Oct 1, 2008 at 12:06 AM, Glynn Clements
<[hidden email]> wrote:
...
> This (amongst other things[1]) will fail if there are spaces in
> $GISDBASE. r.report constructs and executes (with system()) an r.stats
> command which redirects to a temporary file, and the temporary
> filename isn't quoted.
>
> I've worked around the issue in 7.0 with r33627, which quotes the
> filename.

Backported to 6.4. with r33629.

...
> If any non-Windows users want to help out, Unix doesn't prohibit the
> use of spaces in pathnames, so you can put a space in the name of the
> GISDBASE directory and report any errors you encounter.

I did so for several weeks while intensively using it but didn't come
across many problems. I'll guess I'll change again my "grassdata/"
to "grass data/" to see what happens.

Markus
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Helena Mitasova

Re: [GRASS-windows] r.report, r.patch

Reply Threaded More More options
Print post
Permalink
In reply to this post by Glynn Clements

On Sep 30, 2008, at 6:06 PM, Glynn Clements wrote:

>
> Helena Mitasova wrote:
>
>> 1. r.report does not work for two students (one has VISTA one has XP)
>> it does not print anything - it works for me
>> and others - has anybody had a similar problem?
>
> Maybe a problem with writing temporary files?
>
> This (amongst other things[1]) will fail if there are spaces in
> $GISDBASE. r.report constructs and executes (with system()) an r.stats
> command which redirects to a temporary file, and the temporary
> filename isn't quoted.

The installer puts the sample data locations into a directory with a  
space[1]
in its name so that may be it. For the lab computers I have moved the  
data into
a directory that does not have space in its name but the students  
that have
problems might have kept it in the original directory - I will check  
for that.

[1]The sample data files will be installed into a directory called  
GIS DataBase,
that will be created in your Documents folder

>
> I've worked around the issue in 7.0 with r33627, which quotes the
> filename.
>
> More generally, we need to start eradicating the use of system() in
> favour of e.g. G_spawn_ex(). Apart from anything else, this means that
> someone needs to do a proper port to Windows using CreateProcess().
>
> [There's currently a half-baked Windows version based around
> spawnvpe(), but it doesn't handle redirection. Redirecting to a named
> file could be fudged with spawnvpe(), but not redirecting to an open
> handle.]
>
> FWIW, I count 41 occurrences of [G_]system and [G_]popen in 7.0.
>
> [1] In the process of converting the scripts to Python, I've noticed
> that the output from "v.db.connect -g" isn't suitable for its intended
> purpose, as it uses spaces to separate the fields, even though one of
> the fields is typically a filename.
>
>> 2. r.patch does not work for one student on VISTA-
>> it is exactly the same problem reported as bug #118 but
>> according to bug tracker it was fixed and closed
>> http://trac.osgeo.org/grass/ticket/118
>> The command works for me and others on XP. Is there anybody else
>> who still has this problem? Michael did your students get it working?
>
> I think that Windows users will ultimately need to ensure GISDBASE is
> within their "Documents" directory. But that will require fixing the
> myriad spaces-in-pathnames issues such as the above.

at least the sample data get installed there, but the GISDBASE directory
name has a space. We are going quite systematically through GRASS,
mostly raster, some vector commands and this is what we had so far.
I will report whatever else we find.

thanks a lot

Helena

>
> If any non-Windows users want to help out, Unix doesn't prohibit the
> use of spaces in pathnames, so you can put a space in the name of the
> GISDBASE directory and report any errors you encounter.
>
> --
> Glynn Clements <[hidden email]>

_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Glynn Clements

Re: [GRASS-windows] r.report, r.patch

Reply Threaded More More options
Print post
Permalink

Helena Mitasova wrote:

> >> 1. r.report does not work for two students (one has VISTA one has XP)
> >> it does not print anything - it works for me
> >> and others - has anybody had a similar problem?
> >
> > Maybe a problem with writing temporary files?
> >
> > This (amongst other things[1]) will fail if there are spaces in
> > $GISDBASE. r.report constructs and executes (with system()) an r.stats
> > command which redirects to a temporary file, and the temporary
> > filename isn't quoted.
>
> The installer puts the sample data locations into a directory with a  
> space[1]
> in its name so that may be it. For the lab computers I have moved the  
> data into
> a directory that does not have space in its name but the students  
> that have
> problems might have kept it in the original directory - I will check  
> for that.
>
> [1]The sample data files will be installed into a directory called  
> GIS DataBase,
> that will be created in your Documents folder

Well, the Documents folder itself normally contains spaces in English
installations, e.g.: "C:\Documents and Settings\<user>\My Documents".

You can often get around this using 8.3 filenames, e.g.
"c:\docume~1\<user>\mydocu~1\", but it sometimes falls down (e.g.
getcwd() returns the "official" version).

--
Glynn Clements <[hidden email]>
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Marco Pasetti

Re: [GRASS-windows] r.report, r.patch

Reply Threaded More More options
Print post
Permalink
In reply to this post by Helena Mitasova
Hi Helena,

>I have few issues from our class that I would like to ask about winGRASS

First thing: thanks a lot for your feedbacks, I really appreciate your help,
specially because comes from a high-professional GRASS user ;)
Unfortunaltely I'm very busy in these months (yesterday I passed the first
PhD entry test), so I cannot partecipate to the project as much I would...
but the next months will be better...

> 1. r.report does not work for two students (one has VISTA one has XP)
> it does not print anything - it works for me
> and others - has anybody had a similar problem?

No, it's working for me

> 2. r.patch does not work for one student on VISTA-
> it is exactly the same problem reported as bug #118 but
> according to bug tracker it was fixed and closed
> http://trac.osgeo.org/grass/ticket/118
> The command works for me and others on XP. Is there anybody else
> who still has this problem? Michael did your students get it working?

As it has been already discussed, I'm still convinced that for Vista it's
due to the UAC's presence. About XP, I don't know, r.patch works on my old
XP machine.

> 3. copy and paste to cmd section of output window makes it copy it twice
> - shift insert works- I have this problem too - is this a feature?

Confirm. I don't know why.

> 4. first one or two letters in output are sometimes skipped  - e.g. min
> is n for r.univar and there are some others. Not a big deal but it is
> somewhat confusing

Yes. I already opened a ticket. It should be fixed in 6.4 trunk, but I don't
have time to check it out (I should rebuild gdal libs, because I built them
with GRASS 6.3.0 support for QGIS, and at the moment I need the maximum
calculus power from my notebook... building on MinGW takes a lot of
resoruces and time....)

Well... about the differences within different machines running the same OS,
I cannot tell you what could be the problem. Both XP and Vista are very
delicate OS, specially XP (because more hackable from users and 3rd party
applications); lacking or conflicting DLLs, wrong or unusual registry
setting, anti-viruses or firewall applications may cause unexpected
problems.
The key should be, in this case, analyze the differences between a working
setup and the failing ones, and try to identify what may cause the failure.
It's not a really "scientific" way (it would be nice for a doctor, but not
for an engineer...), but sometimes it's the smartest way to hit the target.

Thank you very much for your care on the WinGRASS Project,

Marco

_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Michael Denslow-2

Re: [GRASS-windows] r.report, r.patch

Reply Threaded More More options
Print post
Permalink
In reply to this post by Glynn Clements
Hello GRASS users, I seem to be having the same problem with r.report as mentioned below. I am using Windows XP.



Helena Mitasova wrote:

> 1. r.report does not work for two students (one has VISTA one has XP)
> it does not print anything - it works for me
> and others - has anybody had a similar problem?


I get the following error when I type the command
r.report -h towns units=h
into the command line (this is an example from page 101 of the Neteler and Mitasova book)

Sorry <and> is not a valid option
Sorry <Setting/md/My> is not a valid option
and so on...

I think it has to do with spaces in the file paths. So can I just move the GIS Database folder to a path without spaces and remove the space in the folder name? I am not sure what to do here. Also I am not a programmer so I am in need of a simple suggestion.

Thanks in advance,
Michael
 
Markus Neteler

Re: [GRASS-windows] r.report, r.patch

Reply Threaded More More options
Print post
Permalink
On Fri, Oct 24, 2008 at 6:41 PM, Michael D. <[hidden email]> wrote:

>
> Hello GRASS users, I seem to be having the same problem with r.report as
> mentioned below. I am using Windows XP.
>
> Helena Mitasova wrote:
>
>> 1. r.report does not work for two students (one has VISTA one has XP)
>> it does not print anything - it works for me
>> and others - has anybody had a similar problem?
>
>
> I get the following error when I type the command
> r.report -h towns units=h
> into the command line (this is an example from page 101 of the Neteler and
> Mitasova book)
>
> Sorry <and> is not a valid option
> Sorry <Setting/md/My> is not a valid option
> and so on...
>
> I think it has to do with spaces in the file paths. So can I just move the
> GIS Database folder to a path without spaces and remove the space in the
> folder name? I am not sure what to do here. Also I am not a programmer so I
> am in need of a simple suggestion.

Yes, it should be as simple as that (no white spaces in the path).
Please continue to report so that we can try to fix them.

Markus
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Michael Denslow-2

Re: [GRASS-windows] r.report, r.patch

Reply Threaded More More options
Print post
Permalink
Hi Markus,

On Fri, Oct 24, 2008 at 2:13 PM, Markus Neteler <[hidden email]> wrote:

> On Fri, Oct 24, 2008 at 6:41 PM, Michael D. <[hidden email]> wrote:
>>
>> Hello GRASS users, I seem to be having the same problem with r.report as
>> mentioned below. I am using Windows XP.
>>
>> Helena Mitasova wrote:
>>
>>> 1. r.report does not work for two students (one has VISTA one has XP)
>>> it does not print anything - it works for me
>>> and others - has anybody had a similar problem?
>>
>>
>> I get the following error when I type the command
>> r.report -h towns units=h
>> into the command line (this is an example from page 101 of the Neteler and
>> Mitasova book)
>>
>> Sorry <and> is not a valid option
>> Sorry <Setting/md/My> is not a valid option
>> and so on...
>>
>> I think it has to do with spaces in the file paths. So can I just move the
>> GIS Database folder to a path without spaces and remove the space in the
>> folder name? I am not sure what to do here. Also I am not a programmer so I
>> am in need of a simple suggestion.
>
> Yes, it should be as simple as that (no white spaces in the path).
> Please continue to report so that we can try to fix them.
>

Thanks for the suggestion, this fixed the problem. Both functions work
as expected now. Should I report this in a more formal way?
Michael
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Markus Neteler

Re: [GRASS-windows] r.report, r.patch

Reply Threaded More More options
Print post
Permalink
Hi Michael,

On Mon, Oct 27, 2008 at 2:30 PM, Michael Denslow
<[hidden email]> wrote:

> On Fri, Oct 24, 2008 at 2:13 PM, Markus Neteler <[hidden email]> wrote:
>> On Fri, Oct 24, 2008 at 6:41 PM, Michael D. <[hidden email]> wrote:
>>> Hello GRASS users, I seem to be having the same problem with r.report as
>>> mentioned below. I am using Windows XP.
>>>
>>> Helena Mitasova wrote:
>>>
>>>> 1. r.report does not work for two students (one has VISTA one has XP)
>>>> it does not print anything - it works for me and others - has anybody
>>>> had a similar problem?
>>>
>>>
>>> I get the following error when I type the command
>>> r.report -h towns units=h
>>> into the command line (this is an example from page 101 of the Neteler and
>>> Mitasova book)
>>>
>>> Sorry <and> is not a valid option
>>> Sorry <Setting/md/My> is not a valid option
>>> and so on...
...
>> Yes, it should be as simple as that (no white spaces in the path).
>> Please continue to report so that we can try to fix them.
>>
>
> Thanks for the suggestion, this fixed the problem. Both functions work
> as expected now. Should I report this in a more formal way?

I recently fixed a series of vector commands for white space
problems (which I could reproduce on Linux) but I don't
manage to reproduce the r.report problem.

GRASS 6.4.svn (nc_spm_07):~/grass data > r.report -h towns units=h
 100%
+-----------------------------------------------------------------------------+
|                      Category Information                        |          |
|#|description                                                     |  hectares|
|-----------------------------------------------------------------------------|
|1|CARY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .|  2608.490|
...

Note "grass data" above. It must be really XP/Vista specific.
Please check if there is a similar report already in trac, otherwise
I suggest to open a new report:

 http://trac.osgeo.org/grass/

Markus
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Glynn Clements

Re: [GRASS-windows] r.report, r.patch

Reply Threaded More More options
Print post
Permalink

Markus Neteler wrote:

> >>> I get the following error when I type the command
> >>> r.report -h towns units=h
> >>> into the command line (this is an example from page 101 of the Neteler and
> >>> Mitasova book)
> >>>
> >>> Sorry <and> is not a valid option
> >>> Sorry <Setting/md/My> is not a valid option
> >>> and so on...
> ...
> >> Yes, it should be as simple as that (no white spaces in the path).
> >> Please continue to report so that we can try to fix them.
> >>
> >
> > Thanks for the suggestion, this fixed the problem. Both functions work
> > as expected now. Should I report this in a more formal way?
>
> I recently fixed a series of vector commands for white space
> problems (which I could reproduce on Linux) but I don't
> manage to reproduce the r.report problem.

As I mentioned before, the whitespace problem with r.report was fixed
in 7.0 with r33627. You back-ported this fix to 6.4 with r33629, so
you won't be able to reproduce it with a current version.

--
Glynn Clements <[hidden email]>
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows