[gdal-dev] Re: [GRASS-windows] gdalinfo about the dir
Frank Warmerdam
warmerdam at pobox.com
Wed Apr 1 10:57:29 EDT 2009
apachemaven wrote:
> I have commite the problem: when run the commond gdalinfo d:\data\aa.hdf
> I get the subdatasets,then I want to get the info of the subdataset for
> example
> gdalinfo HDF4_EOS:EOS_SWATH:"D:\data\aa.hdf":mod35:Scan_Start_Time
> because the ":" in the path,I get the error message,I know if I am
> working the cmd window I can go into the data path
...
> cmd = "cmd /c gdalinfo " + GrassMain.ccat + ggm.getImageName(map);
Hi,
I believe the problem is that you do not escape the double quotes
when passing them via the commandline. It is important that the
double quotes make it into GDALOpen() so that the D: will be treated
as part of the one path token when things are parsed.
So, if you were to specify things on the commandline I think you would
need to do it as:
gdalinfo HDF4_EOS:EOS_SWATH:\"D:\data\aa.hdf\":mod35:Scan_Start_Time
The exact escaping mechanisms and requirements may vary depending on
the command shell used. What is important is that after all shell
processing the double quotes still remain around the path portion
inside the call to GDALOpen.
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