本文整理了Java中org.deegree.geometry.GeometryFactory.createPolygonPatch()
方法的一些代码示例,展示了GeometryFactory.createPolygonPatch()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GeometryFactory.createPolygonPatch()
方法的具体详情如下:
包路径:org.deegree.geometry.GeometryFactory
类名称:GeometryFactory
方法名:createPolygonPatch
[英]Creates a PolygonPatch surface patch.
[中]
代码示例来源:origin: deegree/deegree3
/**
* Returns a linearized version (i.e. a {@link PolygonPatch} that only uses {@link LinearRing}s as boundaries) of
* the given {@link PolygonPatch}.
*
* @param patch
* @param crit
* determines the interpolation quality / number of interpolation points
* @return {@link PolygonPatch} that only uses {@link LinearRing}s as boundaries
*/
public PolygonPatch linearize( PolygonPatch patch, LinearizationCriterion crit ) {
Ring exteriorRing = patch.getExteriorRing();
Ring linearizedExteriorRing = null;
if ( exteriorRing != null ) {
linearizedExteriorRing = (Ring) curveLinearizer.linearize( exteriorRing, crit );
}
List<Ring> interiorRings = patch.getInteriorRings();
List<Ring> linearizedInteriorRings = new ArrayList<Ring>( interiorRings.size() );
for ( Ring interiorRing : interiorRings ) {
linearizedInteriorRings.add( (Ring) curveLinearizer.linearize( interiorRing, crit ) );
}
return geomFac.createPolygonPatch( linearizedExteriorRing, linearizedInteriorRings );
}
}
代码示例来源:origin: deegree/deegree3
private PolygonPatch transform( PolygonPatch patch, Transformation trans )
throws TransformationException {
Ring exterior = patch.getExteriorRing();
LinearRing transformedExteriorRing = transform( exterior, trans );
PolygonPatch result = null;
PolygonPatchType type = patch.getPolygonPatchType();
switch ( type ) {
case POLYGON_PATCH:
List<Ring> interiorRings = ( patch ).getInteriorRings();
List<Ring> transformedInteriorRings = new ArrayList<Ring>( interiorRings == null ? 0 : interiorRings.size() );
if ( interiorRings != null && !interiorRings.isEmpty() ) {
for ( Ring interior : interiorRings ) {
if ( interior != null ) {
LinearRing lr = transform( interior, trans );
transformedInteriorRings.add( lr );
}
}
}
result = geomFactory.createPolygonPatch( transformedExteriorRing, transformedInteriorRings );
break;
case RECTANGLE:
result = geomFactory.createRectangle( transformedExteriorRing );
break;
case TRIANGLE:
result = geomFactory.createTriangle( transformedExteriorRing );
break;
}
return result;
}
代码示例来源:origin: deegree/deegree3
offx, offy ) ) );
movedPatches.add( fac.createPolygonPatch( movedExteriorRing, movedInteriorRings ) );
} else {
throw new UnsupportedOperationException( "Cannot move non-planar surface patches." );
代码示例来源:origin: deegree/deegree3
return geomFac.createPolygonPatch( exteriorRing, interiorRings );
代码示例来源:origin: deegree/deegree3
GeometryFactory geomFac = new GeometryFactory();
List<SurfacePatch> patches = new ArrayList<SurfacePatch>();
patches.add( geomFac.createPolygonPatch( p.getExteriorRing(), p.getInteriorRings() ) );
geom = geomFac.createSurface( geom.getId(), patches, geom.getCoordinateSystem() );
} else if ( hierarchy.getCurveSubstitutions().contains( particle.getName() ) && geom instanceof LineString ) {
内容来源于网络,如有侵权,请联系作者删除!