Revision 37962 trunk/libraries/libRaster/src/org/gvsig/raster/dataset/io/GdalDriver.java
GdalDriver.java | ||
---|---|---|
222 | 222 |
* @see org.gvsig.raster.dataset.RasterDataset#translateFileName(java.lang.String) |
223 | 223 |
*/ |
224 | 224 |
public String translateFileName(String fileName) { |
225 |
if(fileName.endsWith("hdr")) |
|
226 |
return fileName.substring(0, fileName.lastIndexOf(".")); |
|
225 |
if(fileName.endsWith("hdr")) { |
|
226 |
String asocFile = fileName.substring(0, fileName.lastIndexOf(".")); |
|
227 |
File test = new File(asocFile); |
|
228 |
if (!test.exists()) { |
|
229 |
// Probamos con .raw |
|
230 |
asocFile = asocFile + ".raw"; |
|
231 |
} |
|
232 |
return asocFile; |
|
233 |
} |
|
234 |
|
|
227 | 235 |
return fileName; |
228 | 236 |
} |
229 | 237 |
|
Also available in: Unified diff