本文整理了Java中org.gdal.gdal.gdal.GetLastErrorMsg()
方法的一些代码示例,展示了gdal.GetLastErrorMsg()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。gdal.GetLastErrorMsg()
方法的具体详情如下:
包路径:org.gdal.gdal.gdal
类名称:gdal
方法名:GetLastErrorMsg
暂无
代码示例来源:origin: org.geotools/gt-ogr-jni
@Override
public String GetLastErrorMsg() {
return gdal.GetLastErrorMsg();
}
代码示例来源:origin: com.revolsys.open/com.revolsys.open.gdal
public GdalException() {
super(gdal.GetLastErrorMsg().trim());
gdal.ErrorReset();
}
代码示例来源: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: opengeospatial/geoapi
/**
* Opens a dataset for the given file in read-only mode.
*
* @param file the file to open.
* @throws IOException if the given file can not be opened.
*/
public DataSet(final Path file) throws IOException {
ds = gdal.Open(file.toString());
if (ds == null) {
String msg = gdal.GetLastErrorMsg();
if (msg == null) {
msg = "Can not open \"" + file + "\".";
}
throw new GDALException(msg);
}
}
代码示例来源:origin: io.jeo/jeo-gdal
@Override
protected boolean canOpen(File file, Map<?, Object> opts, Messages msgs) {
Driver drv = gdalDrv != null ? gdalDrv : gdal.IdentifyDriver(file.getAbsolutePath());
if (drv == null) {
String msg = "Unable to locate driver";
String lastErrMsg = gdal.GetLastErrorMsg();
if (lastErrMsg != null) {
msg += ": " + lastErrMsg;
}
Messages.of(msgs).report(msg);
return false;
}
return super.canOpen(file, opts, msgs);
}
代码示例来源:origin: it.geosolutions.imageio-ext/imageio-ext-gdalframework
gdal.GetLastErrorMsg()).toString());
LOGGER.info(new StringBuilder("Last error number: ").append(
gdal.GetLastErrorNo()).toString());
LOGGER.info(new StringBuilder("Last error type: ").append(
gdal.GetLastErrorType()).toString());
throw new RuntimeException(gdal.GetLastErrorMsg());
代码示例来源:origin: geosolutions-it/imageio-ext
gdal.GetLastErrorMsg()).toString());
LOGGER.info(new StringBuilder("Last error number: ").append(
gdal.GetLastErrorNo()).toString());
LOGGER.info(new StringBuilder("Last error type: ").append(
gdal.GetLastErrorType()).toString());
throw new RuntimeException(gdal.GetLastErrorMsg());
内容来源于网络,如有侵权,请联系作者删除!