Details Ticket 4381


Comment | Reply | Take | Resolve


Serial Number 4381
Subject export location for r.out.* differs
Area grass6
Queue grass
Requestors wegmann@biozentrum.uni-wuerzburg.de
Owner none
Status open
Last User Contact Fri May 5 14:44:55 2006 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Fri May 5 14:44:55 2006 (2 yr ago)
Created Thu May 4 18:45:34 2006 (2 yr ago)

Transaction History Ticket 4381


Thu, May 4 2006 18:45:34    Request created by guest  
Subject: export location for r.out.* differs

Platform: GNU/Linux/x86
grass binary for platform: Compiled from Sources
GRASS Version: cvs today

if I start GRASS from /home/user and change the working directory afterwards
inside GRASS e.g.

> mkdir new_dir
> cd new_dir

called from gis.m:
r.out.gdal/r.out.bin exports to /home/user
r.out.ascii/r.out.arc/r.out.tiff exports to /home/user/new_dir

I did not check all export modules but can do it, if the error is user 
independent. 

A consistent behaviour would be good - I would prefer the latter behaviour 
for all export functions.

Martin

Thu, May 4 2006 21:55:35    Mail sent by werchowyna@epf.pl  
Return-Path <werchowyna@epf.pl>
Delivered-To grass-bugs@lists.intevation.de
Date Thu, 4 May 2006 21:55:09 +0200
From Maciek Sieczka <werchowyna@epf.pl>
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS-dev] [bug #4381] (grass) export location for r.out.* differs
Message-Id <20060504215509.997e8c71.werchowyna@epf.pl>
In-Reply-To <20060504164534.5CCA51005DB@lists.intevation.de>
References <20060504164534.5CCA51005DB@lists.intevation.de>
X-Mailer Sylpheed version 2.1.1 (GTK+ 2.8.6; i486-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=0.0 tagged_above=-999.0 required=3.0 tests=
X-Spam-Level
> called from gis.m:
> r.out.gdal/r.out.bin exports to /home/user
> r.out.ascii/r.out.arc/r.out.tiff exports to /home/user/new_dir

BTW

Moreover, some commands accept and some don't accept directory names in
the "output=". Eg. r.out.tiff will fail with an error if you try to
put a dir name here.

Secondly, some export modules force (well, at least r.out.tiff does)
the file extension, and some leave it up to the user to set it.

It would be great if this behaviour could be unified too.

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze
z nich!
http://katalog.panoramainternetu.pl/


Fri, May 5 2006 14:44:55    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Sat, 6 May 2006 00:44:20 +1200
From Hamish <hamish_nospam@yahoo.com>
To Maciek Sieczka <werchowyna@epf.pl>
Cc grass-bugs@intevation.de, grass-dev@grass.itc.it
Subject Re: [GRASS-dev] [bug #4381] (grass) export location for r.out.* differs
Message-Id <20060506004420.64fc0634.hamish_nospam@yahoo.com>
In-Reply-To <20060504215509.997e8c71.werchowyna@epf.pl>
References <20060504164534.5CCA51005DB@lists.intevation.de> <20060504215509.997e8c71.werchowyna@epf.pl>
X-Mailer Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.0 tagged_above=-999.0 required=3.0 tests=BAYES_00, FORGED_YAHOO_RCVD
X-Spam-Level
> Secondly, some export modules force (well, at least r.out.tiff does)
> the file extension, and some leave it up to the user to set it.

A good solution is to check to see if the name already has the extension
on it before "forcing" one on. (so you don't get .tif.tif)

shell:
FILE="`basename $output .tif`.tif"

tcl:
if { [string compare [file extension $fname] ".tif"] != 0 } then {
   append fname ".tif"
}

C:
<string.h>   :)



Hamish


Comment | Reply | Take | Resolve

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request