[GRASS-user] working on a mounted external disk
Moritz Lennert
mlennert at club.worldonline.be
Wed Apr 8 10:44:24 EDT 2009
On 08/04/09 15:37, Vincent Bain wrote:
> In raster/r.proj/main.c, line 208 I wrote :
>
> if (strcmp(inlocation->answer, G_location()) == 0 &&
> !indbase->answer || strcmp(indbase->answer, G_gisdbase())==
> 0))
> G_fatal_error(_("Input and output locations can not be the
> same"));
>
> G_get_window(&outcellhd);
>
> Then compiled and installed again, but the error remains, and what's
> more puzzling to me is that the message string is different from what I
> have in the modified file ("You have to use a different location for
> input than the current")...
>
> What have I done wrong ?
This sounds like you modified and compiled a grass6 version, but are
running grass7.
Apparently a fix for this issue done by Markus a long time ago in
grass6, but this got lost, when (IIUC) r.proj.seg became r.proj in grass7.
Markus' fix was this:
-if (strcmp(inlocation->answer, G_location()) == 0)
- G_fatal_error(_("You have to use a different location for input
- than the current"));
+ if (!indbase->answer && strcmp(inlocation->answer, G_location()) == 0)
+ G_fatal_error(_("Input and output locations can not be the same"));
but this was never applied to r.proj.seg. His fix does not take into
account the case where someone gives a value for dbase, but this is the
same as the current location. Probably highly improbable, but not
impossible, so my fix is a bit more complete...
So, to make this story short:
- You have to figure out which version of grass you are working with.
- In grass6.3+ this shouldn't be an issue, but it is in grass6.2 and
before and again in grass7.
- The message ""You have to use a different location for input than the
current" is in grass6.2 and before and in grass7, but was changed to
"Input and output locations can not be the same" in grass6.3+.
I'll apply my fix (but using Markus' wording) grass7, but I'll leave
devel6 alone as the Markus' fix should handle most cases.
Moritz
More information about the grass-user
mailing list