[GRASS-user] gdalinfo about the dir
apachemaven
apachemaven at yeah.net
Wed Apr 1 10:32:11 EDT 2009
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
---C:\Documents and Settings\Administrator> D:
---D:\> cd data\HDF
---D:\> gdalinfo aa.tif
then I can run the command successfully,
But now I have to call the command in a java programe by
-----------------------------------
FwtMain fm = new FwtMain(); //this is to initize a calss fwmain which to call the gdal command (I have install the gdal lin)
String[] env = fm.getEnv(); //get the envriorment confignation arry
cmd = "cmd /c gdalinfo " + GrassMain.ccat + ggm.getImageName(map);
Process p1 = Runtime.getRuntime().exec(cmd, env);
------------------------------------
At this suitation how can I call the command? I can only get the infomation of the parent hdf,but the subdataset can not....
More information about the grass-user
mailing list