本文整理汇总了Java中org.opengis.coverage.PointOutsideCoverageException类的典型用法代码示例。如果您正苦于以下问题:Java PointOutsideCoverageException类的具体用法?Java PointOutsideCoverageException怎么用?Java PointOutsideCoverageException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PointOutsideCoverageException类属于org.opengis.coverage包,在下文中一共展示了PointOutsideCoverageException类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getPointES
import org.opengis.coverage.PointOutsideCoverageException; //导入依赖的package包/类
private Double getPointES(GridCoverage2D raster, Point point) {
Double result = null;
try {
DirectPosition position = JTS.toDirectPosition(point.getCoordinate(), GeometryUtils.WGS_84_CRS);
double[] resultArray = raster.evaluate(position, (double[]) null);
if (resultArray[0] != RASTER_NO_DATA_VALUE) {
result = resultArray[0];
} else {
LOGGER.debug(String.format(ES_NOT_FOUND_NO_DATA_MESSAGE, point.getX(), point.getY()));
}
} catch (PointOutsideCoverageException e) {
// Ignore the exception - if the point is outside of the raster area, the result is null
LOGGER.debug(String.format(ES_NOT_FOUND_OUTSIDE_AREA_MESSAGE, point.getX(), point.getY()));
}
return result;
}
开发者ID:SEEG-Oxford,项目名称:ABRAID-MP,代码行数:17,代码来源:EnvironmentalSuitabilityHelper.java
示例2: getHeightAtCoordinate
import org.opengis.coverage.PointOutsideCoverageException; //导入依赖的package包/类
public Double getHeightAtCoordinate(Coordinate c) {
try {
float[] result = (float[]) coverage.evaluate(new DirectPosition2D(crs, c.x, c.y));
return Double.valueOf(result[0]);
} catch (PointOutsideCoverageException e) {
return Double.NaN;
}
}
开发者ID:GIScience,项目名称:osmgpxinclinecalculator,代码行数:12,代码来源:RasterDataSource.java
示例3: evaluate
import org.opengis.coverage.PointOutsideCoverageException; //导入依赖的package包/类
@Override
public Set<Record> evaluate(
final DirectPosition p,
final Collection<String> list )
throws PointOutsideCoverageException,
CannotEvaluateException {
return gridCoverage.evaluate(
p,
list);
}
开发者ID:locationtech,项目名称:geowave,代码行数:11,代码来源:FitToIndexGridCoverage.java
示例4: getElevationOnWgs84Point
import org.opengis.coverage.PointOutsideCoverageException; //导入依赖的package包/类
private Integer getElevationOnWgs84Point(GridCoverage2D searchGrid, double xCoordinate, double yCoordinate, boolean keepSearching) {
Integer elevation = null;
try {
final int[] metadataAtPoint = (int[]) searchGrid.evaluate(new DirectPosition2D(DefaultGeographicCRS.WGS84, xCoordinate, yCoordinate));
elevation = metadataAtPoint[0];
} catch (final PointOutsideCoverageException e) {
logger.debug("Cannot find elevation data for this point : " + xCoordinate + " , " + yCoordinate + " in grid " + searchGrid);
}
if (elevation == null && keepSearching) {
for (final GridCoverage2D elevationGrid : gridsWithElevationData) {
if (elevationGrid != null) {
elevation = getElevationOnWgs84Point(elevationGrid, xCoordinate, yCoordinate, false);
if (elevation != null) {
break;
}
}
}
if (elevation == null) {
throw new PointOutsideCoverageException("None of the GeoTifs contains data for coordinates " + xCoordinate + " , " + yCoordinate);
}
}
return elevation;
}
开发者ID:openforis,项目名称:collect-earth,代码行数:28,代码来源:PreprocessElevationData.java
示例5: fetchElevation
import org.opengis.coverage.PointOutsideCoverageException; //导入依赖的package包/类
@Override
public Double fetchElevation(Coordinate coord) throws DataUnavailableException {
try {
return super.fetchElevation(coord);
} catch( PointOutsideCoverageException e) {
// Can't interpolate at boundaries of tiles
// Use nearest neighbor, which will leave a hard edge at tile boundaries
return provider.fetchElevation(coord);
// TODO Do manual interpolation or whatever GeoTools suggests
}
}
开发者ID:sbliven,项目名称:earthcraft,代码行数:12,代码来源:InterpolatedCoverageElevationProvider.java
注:本文中的org.opengis.coverage.PointOutsideCoverageException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论