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

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

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

Geometry.crosses介绍

[英]Tests whether this geometry crosses the specified geometry. TODO formal explanation (DE9IM)
[中]测试此几何图形是否与指定的几何图形相交。TODO正式解释(DE9IM)

代码示例

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

@Override
public boolean crosses( Geometry geometry ) {
  return getReferencedObject().crosses( geometry );
}

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

@Override
public <T> boolean evaluate( T obj, XPathEvaluator<T> xpathEvaluator )
            throws FilterEvaluationException {
  for ( TypedObjectNode paramValue : propName.evaluate( obj, xpathEvaluator ) ) {
    Geometry geom = checkGeometryOrNull( paramValue );
    if ( geom != null ) {
      Geometry transformedLiteral = getCompatibleGeometry( geom, geometry );
      return geom.crosses( transformedLiteral );
    }
  }
  return false;
}

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

@Override
public void process( ProcessletInputs in, ProcessletOutputs out, ProcessletExecutionInfo info )
            throws ProcessletException {
  ComplexInput gmlInput1 = (ComplexInput) in.getParameter( "GMLInput1" );
  ComplexInput gmlInput2 = (ComplexInput) in.getParameter( "GMLInput2" );
  Geometry geometry1 = readGeometry( gmlInput1 );
  Geometry geometry2 = readGeometry( gmlInput2 );
  boolean crosses = geometry1.crosses( geometry2 );
  LiteralOutput crossesOutput = (LiteralOutput) out.getParameter( "Crosses" );
  crossesOutput.setValue( String.valueOf( crosses ) );
}

相关文章