> However, the same doesn't work within the display manager with, for
> instance, d.vect. In that case, the 'where' parameter ends up within
> braces in the actual call.
Some more fiddling led me to find out the correct syntax in display
manager:
str_3='"W Arctic"'
which creates a valid sql query and the map plots correctly. However,
this runs into another problem with d.out.file from a display of the
queried map and says:
Sorry <Arctic'> is not a valid option
Could this be a bug? If the 'where' statement does its job with this
string, I would have expected d.out.file to work too.
I suspect that this is a bug in G_recreate_command().
On Sun, 25 Mar 2007 02:48:15 +0100,
Glynn Clements <glynn@gclements.plus.com> wrote:
[...]
I suspect that this is a bug in G_recreate_command().
What does "d.save -a" output?
This returns the following for the 'where' parameter:
where="str_3='"W Arctic"'"
exactly as it was entered in the display manager, which wouldn't work from
the command line or a script because the double quotes (within the single
quotes) are not escaped.
> I suspect that this is a bug in G_recreate_command().
> What does "d.save -a" output?
This returns the following for the 'where' parameter:
where="str_3='"W Arctic"'"
exactly as it was entered in the display manager, which wouldn't work from
the command line or a script because the double quotes (within the single
quotes) are not escaped.
By "display manager", are you referring to d.m or gis.m? d.m is
essentially obsolete; any non-trivial bugs are unlikely to get fixed.
OTOH, gis.m shouldn't require any additional quoting in most cases (in
a command layer, complex options should be enclosed entirely in
braces, e.g. "d.vect map {where=str_3 = 'W Arctic'}").
On Sun, 25 Mar 2007 03:59:45 +0100,
Glynn Clements <glynn@gclements.plus.com> wrote:
[...]
By "display manager", are you referring to d.m or gis.m? d.m is
essentially obsolete; any non-trivial bugs are unlikely to get fixed.
Indeed, I was doing this in d.m, and didn't find this problem with gis.m.
However, how do you tell d.save in gis.m what monitor to use? I have
gotten very used to x0-... kind of names, and I don't see these anymore in
gis.m. Thanks for your feedback.
> By "display manager", are you referring to d.m or gis.m? d.m is
> essentially obsolete; any non-trivial bugs are unlikely to get fixed.
Indeed, I was doing this in d.m, and didn't find this problem with gis.m.
However, how do you tell d.save in gis.m what monitor to use? I have
gotten very used to x0-... kind of names, and I don't see these anymore in
gis.m. Thanks for your feedback.
gis.m doesn't use monitors, so you can't use d.save on the gis.m displays.
In any case, there are several issues here.
One is the problem which d.m has with option values which contain
spaces, quotes or other characters which are significant to the shell.
I'm not sure that this is likely to get fixed; currently, d.m is
considered obsolete, gis.m is being maintained, and active development
is focusing on a new Python-based GUI.
The most significant issue is that G_recreate_command (which
reconstructs a command line) doesn't appear to handle shell characters
correctly. However, it *should* handle your where= case correctly. If
you run d.vect from the command line, "d.save -a" should show a valid
representation of the command.
Beyond that, it's possible that there is a problem which is specific
to d.out.file, although it's just evalutating the output from d.save.
On Sun, 25 Mar 2007 17:08:08 +0100,
Glynn Clements <glynn@gclements.plus.com> wrote:
[...]
gis.m doesn't use monitors, so you can't use d.save on the gis.m
displays.
Is there some analog for d.save in gis.m? I started getting more
acquainted with gis.m and another thing I'm struggling with is placing
legends and scale bars outside of the region. Is this somehow possible,
or should I stick to d.m for this? Thanks again.
On Sun, 25 Mar 2007 17:08:08 +0100,
Glynn Clements <glynn@gclements.plus.com> wrote:
[...]
gis.m doesn't use monitors, so you can't use d.save on the gis.m
displays.
Is there some analog for d.save in gis.m? I started getting more
acquainted with gis.m and another thing I'm struggling with is placing
legends and scale bars outside of the region. Is this somehow possible,
or should I stick to d.m for this? Thanks again.
You can save the content of your map display by clicking on the little floppy disk button (fourth from the right) and choosing the format you want to save your map as. Is this what you are looking for ?
On Mon, 26 Mar 2007 10:55:34 +0200,
Moritz Lennert <mlennert@club.worldonline.be> wrote:
[...]
You can save the content of your map display by clicking on the little
floppy disk button (fourth from the right) and choosing the format you
want to save your map as. Is this what you are looking for ?
No, d.save creates a list of commands to recreate the display and I was
wondering if the same exists in gis.m, but I guess there's not something
like that. Thanks.
On Mon, 26 Mar 2007 10:55:34 +0200,
Moritz Lennert <mlennert@club.worldonline.be> wrote:
[...]
You can save the content of your map display by clicking on the little
floppy disk button (fourth from the right) and choosing the format you
want to save your map as. Is this what you are looking for ?
No, d.save creates a list of commands to recreate the display and I was
wondering if the same exists in gis.m, but I guess there's not something
like that. Thanks.
Sorry, wasn't awake yet when answering that.
You can save all the content of the 'Output' window into a text file, which also includes all the display commands. You would then have to clean this to get rid of all the warnings and other messages, but it is usable, with the only problem being that the quoting in the command lines will be appropriate for the GUI, not for the CLI...
>> You can save the content of your map display by clicking on the little
>> floppy disk button (fourth from the right) and choosing the format you
>> want to save your map as. Is this what you are looking for ?
>
> No, d.save creates a list of commands to recreate the display and I was
> wondering if the same exists in gis.m, but I guess there's not something
> like that. Thanks.
Sorry, wasn't awake yet when answering that.
You can save all the content of the 'Output' window into a text file,
which also includes all the display commands. You would then have to
clean this to get rid of all the warnings and other messages, but it is
usable, with the only problem being that the quoting in the command
lines will be appropriate for the GUI, not for the CLI...
Note that you should be able to run such scripts using tclsh.
Thanks everybody for your input, I'm slowly getting used to gis.m. I'll
be back with what the cs2cs (via m.proj as Hamish suggested) returns,
compared to straight r.in.xyz.
WRT scripting, what was very convenient about d.save is that it also
inserted a g.region line, and there was no cleaning up to do. Nothing
unsurmountable though.