本文整理了Java中org.deegree.geometry.Geometry.getEnvelope()
方法的一些代码示例,展示了Geometry.getEnvelope()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.getEnvelope()
方法的具体详情如下:
包路径:org.deegree.geometry.Geometry
类名称:Geometry
方法名:getEnvelope
[英]Returns the minimal bounding box of the geometry.
[中]返回几何体的最小边界框。
代码示例来源:origin: deegree/deegree3
@Override
public Envelope getEnvelope() {
return getReferencedObject().getEnvelope();
}
代码示例来源:origin: deegree/deegree3
@Override
public Envelope getEnvelope() {
if ( env == null ) {
// TODO NullEnvelope for emtpy aggregates? or throw an exception?
env = get( 0 ).getEnvelope();
for ( Geometry geom : this ) {
env = env.merge( geom.getEnvelope() );
}
if ( env.getCoordinateSystem() == null ) {
env.setCoordinateSystem( crs );
}
}
return env;
}
代码示例来源:origin: deegree/deegree3
cachedEnvelope.second = g.getEnvelope();
return cachedEnvelope.second;
代码示例来源:origin: deegree/deegree3
@Override
public void setSubRaster( Envelope envelope, AbstractRaster source ) {
List<AbstractRaster> interSectingTiles = getTileContainer().getTiles( envelope );
if ( !interSectingTiles.isEmpty() ) {
for ( AbstractRaster r : interSectingTiles ) {
if ( r != null ) {
Geometry intersection = r.getEnvelope().getIntersection( envelope );
if ( intersection != null ) {
Envelope subsetEnv = intersection.getEnvelope();
r.setSubRaster( subsetEnv, source );
}
}
}
}
}
代码示例来源:origin: deegree/deegree3
private static BBOX extractBBox( SpatialOperator oper ) {
SubType type = oper.getSubType();
switch ( type ) {
case BBOX:
return (BBOX) oper;
case CONTAINS:
// Oracle does not like zero-extent bboxes
if ( !( ( (Contains) oper ).getGeometry() instanceof Point ) )
return new BBOX( ( (Contains) oper ).getParam1(), ( (Contains) oper ).getGeometry().getEnvelope() );
return null;
case CROSSES:
return new BBOX( ( (Crosses) oper ).getParam1(), ( (Crosses) oper ).getGeometry().getEnvelope() );
case DWITHIN:
// TOOD use enlarged bbox
return null;
case EQUALS:
return new BBOX( ( (Equals) oper ).getParam1(), ( (Equals) oper ).getGeometry().getEnvelope() );
case INTERSECTS:
return new BBOX( ( (Intersects) oper ).getParam1(), ( (Intersects) oper ).getGeometry().getEnvelope() );
case OVERLAPS:
return new BBOX( ( (Overlaps) oper ).getParam1(), ( (Overlaps) oper ).getGeometry().getEnvelope() );
case WITHIN:
return new BBOX( ( (Within) oper ).getParam1(), ( (Within) oper ).getGeometry().getEnvelope() );
default: {
return null;
}
}
}
代码示例来源:origin: deegree/deegree3
dataEnv = dataEnvGeom.getEnvelope();
代码示例来源:origin: deegree/deegree3
continue;
Envelope subsetEnv = intersec.getEnvelope();
if ( LOG.isDebugEnabled() ) {
LOG.debug( "Adding raster intersection:{}, rasterInfo:{}, rasterref: {} ",
代码示例来源:origin: deegree/deegree3
private void setSubsetWithAlphaHack( SimpleRaster target, AbstractRaster source ) {
if ( target != null && source != null ) {
// rb: todo the intersection of two envelopes should be an envelope, but the cast will be wrong.
Envelope tEnv = target.getEnvelope();
Envelope sEnv = source.getEnvelope();
if ( tEnv != null && sEnv != null ) {
Geometry geom = tEnv.getIntersection( sEnv );
if ( geom != null ) {
Envelope intersectEnv = geom.getEnvelope();
if ( intersectEnv != null ) {
RasterRect rect = target.getRasterReference().convertEnvelopeToRasterCRS( intersectEnv );
SimpleRaster src = source.getSubRaster( intersectEnv ).getAsSimpleRaster();
PixelInterleavedRasterData targetData = (PixelInterleavedRasterData) target.getRasterData();
setSubset( targetData, rect.x, rect.y, rect.width, rect.height, src.getRasterData() );
}
}
}
} else {
LOG.debug( "Ignoring rasters because of null reference." );
}
}
代码示例来源:origin: deegree/deegree3
Envelope gEnv = g.getEnvelope();
代码示例来源:origin: deegree/deegree3
continue;
Envelope subsetEnv = intersection.getEnvelope();
resultTC.addTile( r.getSubRaster( subsetEnv, bands ) );
代码示例来源:origin: deegree/deegree3
Envelope bbox = geom.getEnvelope();
if ( bbox.getCoordinateSystem() != null ) {
内容来源于网络,如有侵权,请联系作者删除!