[Gdal-dev] question on gdal_translate

francesco francesco.pirotti at unipd.it
Sat Jan 22 07:15:08 EST 2005


Hello,

Thought this might help.

Following this question (which I include below) which Frank kindly answered 
a while ago, I found that escaping the quote characters permits the 
gdal_translate utility to read an image from another disk.
So the example in the mail below would be:
  HDF4_SDS:ASTER_L1B:\"C:\image\":10
instead of
HDF4_SDS:ASTER_L1B:"C:\image":10

the whole command was:

D:\Documenti\work\programmazione\python\gaia/bindir/gdal_translate.exe 
-srcwin 0 0 404 310  -outsize 100% 100% -b 5 -ot Byte -scale 
HDF4_SDS:ASTER_L1B:\"C:\treviso\001\":8  newfile.tif

Cheers!
Francesco Pirotti

CIRGEO
Centro Inderdipartimentale di Cartografia
Fotogrammetria, Telerilevamento e S.I.T.
Università di Padova
Viale dell'Università 16 - Legnaro - PD
www.cirgeo.unipd.it
tel.  +39.328.2126861
tel.  +39.049.827.2522/2688
fax. +39.049.8272686







----------------------------------------------------------------------------------------------

At 04.53 17/12/2004, Frank Warmerdam wrote:
>On Tue, 14 Dec 2004 19:59:59 +0100, francesco
><francesco.pirotti at unipd.it> wrote:
> > Hello,
> >
> > is there a way to select a subdataset of an image which is in another
> > disk?  My partition has gdal stuff in D:\ and the image is in C:\
> > I cannot use gdal_translate using a subdataset such as:
> > HDF4_SDS:ASTER_L1B:"C:\image":10
> >
> > It is ok if my image is in another folder in the same disk, then I can use
> > the ../ format to go backwords in the directory.  But no way to go in the
> > other disk.  Is there a trick?
>
>Francesco,
>
>This is a bug in the HDF driver.  I have created a bug report on the issue at:
>
>   http://bugzilla.remotesensing.org/show_bug.cgi?id=716
>
>The problem is presumably because we parse some aspects of the string
>based on colons.  Hopefully with some work the driver can be altered to
>handle this gracefully especially since the drive specifier is in a
>quoted portion
>of the name.
>
>PS. Andrey reports he is hoping to do some substantial work on the HDF
>driver in January, so with luck this and a variety of other HDF related issues
>can be resolved then.
>
>Best regards,
>--
>---------------------------------------+--------------------------------------
>I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
>light and sound - activate the windows | http://pobox.com/~warmerdam
>and watch the world go round - Rush    | Geospatial Programmer for Rent






More information about the Gdal-dev mailing list