RE: [GRASS5] r.out.gdal not working in CVS HEAD

I suggest try changing from:

WKT=`g.proj -wf`
if [ -n $WKT ] ; then
  PROJECTION="-a_srs '${WKT}'"
fi

to:

WKT=`g.proj -wf`
if [ -n "$WKT" ] ; then
  PROJECTION="-a_srs ${WKT}"
fi

If that doesn't work, try this:

WKT=`g.proj -wf`
if [ -n "$WKT" ] ; then
  PROJECTION="-a_srs \"${WKT}\""
fi

(untested)
REF: tldp.org "Advanced Bash-Scripting Guide", section 4.1, 7.3
John

Dear developers,

Last changes between 1.14 and 1.15 in CVS HEAD prevent r.out.gdal from
working (with my maschine).

When I revert the changes everything works well. The quoting seems to
be messed up a bit.

Cheers
  Stephan

> Dear developers,
>
> Last changes between 1.14 and 1.15 in CVS HEAD prevent r.out.gdal
> from working (with my maschine).
>
> When I revert the changes everything works well. The quoting seems
> to be messed up a bit.
>
> Cheers
> Stephan
>

On Mon, 9 May 2005 12:30:36 -0400
"John Gillette" <JGillette@rfmd.com> wrote:

I suggest try changing from:

WKT=`g.proj -wf`
if [ -n $WKT ] ; then
  PROJECTION="-a_srs '${WKT}'"
fi

to:

WKT=`g.proj -wf`
if [ -n "$WKT" ] ; then
  PROJECTION="-a_srs ${WKT}"
fi

If that doesn't work, try this:

WKT=`g.proj -wf`
if [ -n "$WKT" ] ; then
  PROJECTION="-a_srs \"${WKT}\""
fi

I commited the quoting fix on the -n line to CVS, but not the one on the
PROJECTION line. I think "-a_srs '${WKT}'" should infact expand $WKT;
while '-a_srs "${WKT}"' would not. Could you test?

Hamish

On Tue, 10 May 2005, Hamish wrote:

Dear developers,

Last changes between 1.14 and 1.15 in CVS HEAD prevent r.out.gdal
from working (with my maschine).

When I revert the changes everything works well. The quoting seems
to be messed up a bit.

Cheers
  Stephan

On Mon, 9 May 2005 12:30:36 -0400
"John Gillette" <JGillette@rfmd.com> wrote:

I suggest try changing from:

WKT=`g.proj -wf`
if [ -n $WKT ] ; then
  PROJECTION="-a_srs '${WKT}'"
fi

to:

WKT=`g.proj -wf`
if [ -n "$WKT" ] ; then
  PROJECTION="-a_srs ${WKT}"
fi

If that doesn't work, try this:

WKT=`g.proj -wf`
if [ -n "$WKT" ] ; then
  PROJECTION="-a_srs \"${WKT}\""
fi

I commited the quoting fix on the -n line to CVS, but not the one on the
PROJECTION line. I think "-a_srs '${WKT}'" should infact expand $WKT;
while '-a_srs "${WKT}"' would not. Could you test?

For the record I agree with all that (I think it was my fix that broke it), and the escaped double quotes was what I was going to change it to too last night before I got called away to something else.

Paul

Hello John,

On Mon, 9 May 2005 12:30:36 -0400 "John Gillette" <JGillette@rfmd.com>
wrote:

I suggest try changing from:

WKT=`g.proj -wf`
if [ -n $WKT ] ; then
  PROJECTION="-a_srs '${WKT}'"
fi

to:

WKT=`g.proj -wf`
if [ -n "$WKT" ] ; then
  PROJECTION="-a_srs ${WKT}"
fi

If that doesn't work, try this:

WKT=`g.proj -wf`
if [ -n "$WKT" ] ; then
  PROJECTION="-a_srs \"${WKT}\""
fi

(untested)
REF: tldp.org "Advanced Bash-Scripting Guide", section 4.1, 7.3
John

Thanks for clearing this up!

Best
  Stephan

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office (TCH) - Vahrenwalder Straße 7 - D-30165 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511-9357560 - Fax: ++49-(0)511-9357100