Revision 952 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 | ||
---|---|---|
44 | 44 |
import org.gvsig.fmap.dal.coverage.exception.ParsingException; |
45 | 45 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
46 | 46 |
import org.gvsig.fmap.dal.coverage.exception.RasterDriverException; |
47 |
import org.gvsig.fmap.dal.coverage.store.parameter.RasterFileStoreParameters; |
|
48 | 47 |
import org.gvsig.fmap.dal.coverage.store.props.Transparency; |
49 | 48 |
import org.gvsig.fmap.dal.spi.DataManagerProviderServices; |
50 | 49 |
import org.gvsig.fmap.dal.spi.DataStoreProviderServices; |
... | ... | |
233 | 232 |
public void init (AbstractRasterDataParameters params, |
234 | 233 |
DataStoreProviderServices storeServices) throws NotSupportedExtensionException { |
235 | 234 |
try { |
236 |
if(((RasterFileStoreParameters)params).getFile().exists()) { |
|
237 |
setParam(storeServices, params); |
|
238 |
validRmf(params.getURI()); |
|
239 |
file = new GdalNative(translateFileName(params.getURI())); |
|
240 |
setColorInterpretation(file.colorInterpr); |
|
241 |
setColorTable(file.palette); |
|
242 |
noData = file.getNoDataValue(); |
|
243 |
wktProjection = file.getProjectionRef(); |
|
244 |
//CrsWkt crs = new CrsWkt(wktProjection); |
|
245 |
//IProjection proj = CRSFactory.getCRS("EPSG:23030"); |
|
246 |
ownTransformation = file.getOwnTransformation(); |
|
247 |
externalTransformation = (AffineTransform)ownTransformation.clone(); |
|
248 |
load(); |
|
249 |
} else |
|
250 |
setParam(storeServices, params); |
|
235 |
setParam(storeServices, params); |
|
236 |
validRmf(params.getURI()); |
|
237 |
file = new GdalNative(translateFileName(params.getURI())); |
|
238 |
setColorInterpretation(file.colorInterpr); |
|
239 |
setColorTable(file.palette); |
|
240 |
noData = file.getNoDataValue(); |
|
241 |
wktProjection = file.getProjectionRef(); |
|
242 |
//CrsWkt crs = new CrsWkt(wktProjection); |
|
243 |
//IProjection proj = CRSFactory.getCRS("EPSG:23030"); |
|
244 |
ownTransformation = file.getOwnTransformation(); |
|
245 |
externalTransformation = (AffineTransform)ownTransformation.clone(); |
|
246 |
load(); |
|
247 |
|
|
251 | 248 |
if(file != null) |
252 | 249 |
bandCount = file.getRasterCount(); |
253 | 250 |
} catch (GdalException e) { |
Also available in: Unified diff