Revision 13897
trunk/libraries/libRaster/src/org/gvsig/raster/dataset/io/GdalNative.java | ||
---|---|---|
110 | 110 |
private void init(String fName) throws GdalException, IOException { |
111 | 111 |
fileName = fName; |
112 | 112 |
open(fName, GA_ReadOnly); |
113 |
ext = fName.toLowerCase().substring(fName.lastIndexOf('.') + 1);
|
|
114 |
if (ext.compareTo("tif") == 0) |
|
113 |
ext = RasterUtilities.getExtensionFromFileName(fName);
|
|
114 |
if (ext != null && ext.compareTo("tif") == 0)
|
|
115 | 115 |
WITH_OVERVIEWS = false; |
116 | 116 |
width = getRasterXSize(); |
117 | 117 |
height = getRasterYSize(); |
trunk/libraries/libRaster/src/org/gvsig/raster/dataset/RasterDataset.java | ||
---|---|---|
146 | 146 |
String idFormat = null; |
147 | 147 |
|
148 | 148 |
if(param instanceof String) |
149 |
idFormat = ((String)param).toLowerCase().substring(((String)param).lastIndexOf('.') + 1);
|
|
149 |
idFormat = RasterUtilities.getExtensionFromFileName(((String)param));
|
|
150 | 150 |
if(param instanceof IRegistrableRasterFormat) |
151 | 151 |
idFormat = ((IRegistrableRasterFormat)param).getFormatID(); |
152 | 152 |
|
... | ... | |
161 | 161 |
ExtensionPoint extensionPoint = (ExtensionPoint)extensionPoints.get("RasterReader"); |
162 | 162 |
if(extensionPoint == null) |
163 | 163 |
return null; |
164 |
clase = (Class)extensionPoint.get(idFormat); |
|
164 |
if(idFormat != null) |
|
165 |
clase = (Class)extensionPoint.get(idFormat); |
|
165 | 166 |
} |
166 | 167 |
|
167 | 168 |
if(clase == null) |
Also available in: Unified diff