org.deegree.geometry.GeometryFactory.createTriangle()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中org.deegree.geometry.GeometryFactory.createTriangle()方法的一些代码示例,展示了GeometryFactory.createTriangle()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GeometryFactory.createTriangle()方法的具体详情如下:
包路径:org.deegree.geometry.GeometryFactory
类名称:GeometryFactory
方法名:createTriangle

GeometryFactory.createTriangle介绍

[英]Creates a Triangle surface patch.
[中]创建三角形曲面面片。

代码示例

代码示例来源: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

xmlStream.require( END_ELEMENT, gmlNs, "Triangle" );
return geomFac.createTriangle( exteriorRing );

相关文章