Revision 4182 org.gvsig.raster.gdal/trunk/org.gvsig.raster.gdal/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/raster/gdal/io/GdalProvider.java
GdalProvider.java | ||
---|---|---|
30 | 30 |
import java.net.URI; |
31 | 31 |
import java.net.URISyntaxException; |
32 | 32 |
|
33 |
import org.apache.commons.io.FilenameUtils; |
|
34 |
import org.slf4j.Logger; |
|
35 |
import org.slf4j.LoggerFactory; |
|
36 |
|
|
33 | 37 |
import org.gvsig.fmap.dal.DALFileLocator; |
34 | 38 |
import org.gvsig.fmap.dal.DALLocator; |
35 | 39 |
import org.gvsig.fmap.dal.DataStore; |
... | ... | |
64 | 68 |
import org.gvsig.tools.dynobject.DynObject; |
65 | 69 |
import org.gvsig.tools.extensionpoint.ExtensionPoint; |
66 | 70 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
67 |
|
|
68 |
import org.apache.commons.io.FilenameUtils; |
|
69 |
import org.slf4j.Logger; |
|
70 |
import org.slf4j.LoggerFactory; |
|
71 | 71 |
/** |
72 | 72 |
* This class represents the data access for gdal formats. |
73 | 73 |
* |
... | ... | |
109 | 109 |
public static final String FORMAT_JP2 = "JPEG2000"; |
110 | 110 |
public static final String FORMAT_GRD = "GRD"; |
111 | 111 |
public static final int BAND_HEIGHT = 64; |
112 |
protected GdalNative file = null;
|
|
112 |
protected GdalDataSource file = null;
|
|
113 | 113 |
private Extent viewRequest = null; |
114 | 114 |
protected static String[] formatList = null; |
115 | 115 |
|
... | ... | |
273 | 273 |
// GdalNative aux = new GdalNative(translateFileName(params.getURI())); |
274 | 274 |
// long ptro = aux.getPtro(); |
275 | 275 |
// aux.delete(); |
276 |
file = new GdalNative(translateFileName(params.getURI().getPath()));
|
|
276 |
file = new GdalDataSource(translateFileName(params.getURI().getPath()));
|
|
277 | 277 |
setColorInterpretation(file.colorInterpr); |
278 | 278 |
setColorTable(file.palette); |
279 | 279 |
noData = file.getNoDataValue(); |
... | ... | |
305 | 305 |
//Obtenemos el tipo de dato de gdal y lo convertimos el de RasterBuf |
306 | 306 |
int[] dt = new int[file.getDataType().length]; |
307 | 307 |
for (int i = 0; i < dt.length; i++) |
308 |
dt[i] = GdalNative.getRasterBufTypeFromGdalType(file.getDataType()[i]);
|
|
308 |
dt[i] = GdalDataSource.getRasterBufTypeFromGdalType(file.getDataType()[i]);
|
|
309 | 309 |
setDataType(dt); |
310 | 310 |
|
311 | 311 |
super.init(); |
... | ... | |
483 | 483 |
return false; |
484 | 484 |
} |
485 | 485 |
|
486 |
public GdalNative getNative(){
|
|
486 |
public GdalDataSource getNative(){
|
|
487 | 487 |
return file; |
488 | 488 |
} |
489 | 489 |
|
Also available in: Unified diff