本文整理了Java中org.gdal.gdal.gdal.OpenShared()
方法的一些代码示例,展示了gdal.OpenShared()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。gdal.OpenShared()
方法的具体详情如下:
包路径:org.gdal.gdal.gdal
类名称:gdal
方法名:OpenShared
暂无
代码示例来源:origin: io.jeo/jeo-gdal
@Override
protected GDALDataset open(File file, Map<?, Object> opts) throws IOException {
Dataset ds = gdal.OpenShared(file.getAbsolutePath());
if (ds == null) {
String lastErrMsg = gdal.GetLastErrorMsg();
String msg = "Unable to open file: " + file;
if (lastErrMsg != null) {
msg += ", " + lastErrMsg;
}
throw new IOException(msg);
}
return new GDALDataset(file, ds, this);
}
代码示例来源:origin: deegree/deegree3
Map<String, TileDataSet> buildTileDataSetMap()
throws IOException, UnknownCRSException {
Map<String, TileDataSet> map = new HashMap<String, TileDataSet>();
for ( GdalTileStoreJaxb.TileDataSet tds : cfg.getTileDataSet() ) {
String id = tds.getIdentifier();
if ( id == null ) {
id = new File( tds.getFile() ).getName();
}
File file = location.resolveToFile( tds.getFile() );
if ( !file.exists() ) {
LOG.warn( "File {} does not exist, skipping.", file );
continue;
}
Dataset gdalDataset = gdal.OpenShared( file.toString() );
try {
// TODO
Envelope env = GdalUtils.getEnvelopeAndCrs( gdalDataset, "EPSG:28992" ).getEnvelope();
if ( env == null ) {
throw new ResourceInitException( "No envelope information could be read via GDAL." );
}
LOG.debug( "Envelope from GDAL was {}.", env );
map.put( id, builder.buildTileDataSet( tds, location, env ) );
} finally {
gdalDataset.delete();
}
}
return map;
}
代码示例来源:origin: deegree/deegree3
throw new ResourceInitException( "File " + file + " does not exist." );
Dataset gdalDataset = gdal.OpenShared( file.toString() );
try {
SpatialMetadata envelopeAndCrs = getEnvelopeAndCrs( gdalDataset, cfg.getStorageCRS() );
内容来源于网络,如有侵权,请联系作者删除!