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

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

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

GeometryFactory.createArcString介绍

[英]Creates an ArcString curve segment.
[中]创建弧串曲线段。

代码示例

代码示例来源:origin: deegree/deegree3

/**
 * Returns the object representation of an <code>&lt;gml:ArcString&gt;</code> element. Consumes all corresponding
 * events from the associated <code>XMLStream</code>.
 * <ul>
 * <li>Precondition: cursor must point at the <code>START_ELEMENT</code> event (&lt;gml:ArcString&gt;)</li>
 * <li>Postcondition: cursor points at the corresponding <code>END_ELEMENT</code> event (&lt;/gml:ArcString&gt;)</li>
 * </ul>
 * 
 * @param defaultCRS
 *            default CRS for the geometry, this is propagated if no deeper <code>srsName</code> attribute is
 *            specified
 * @return corresponding {@link ArcString} object
 * @throws XMLParsingException
 *             if a syntactical (or semantic) error is detected in the element
 * @throws XMLStreamException
 * @throws UnknownCRSException
 */
private ArcString parseArcString( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS )
            throws XMLParsingException, XMLStreamException, UnknownCRSException {
  validateInterpolationAttribute( xmlStream, "circularArc3Points" );
  xmlStream.nextTag();
  Points points = parseControlPoints( xmlStream, defaultCRS );
  if ( points.size() < 3 || points.size() % 2 != 1 ) {
    String msg = "Error in 'gml:ArcString' element. Invalid number of points (=" + points.size() + ").";
    throw new XMLParsingException( xmlStream, msg );
  }
  xmlStream.require( XMLStreamConstants.END_ELEMENT, gmlNs, "ArcString" );
  return geomFac.createArcString( points );
}

代码示例来源:origin: deegree/deegree3

pos = as.getControlPoints();
  pos = transform( pos, trans );
  transformedSegment = geomFactory.createArcString( pos );
  break;
case ARC_STRING_BY_BULGE:

相关文章