Esempio n. 1
0
 /**
  * Returns a boolean value that shows if whether relationships between the boundaries, interiors
  * and exteriors of two geometries match the pattern specified in intersection-matrix-pattern.
  *
  * @param node1 xml element containing gml object(s)
  * @param node2 xml element containing gml object(s)
  * @param intersectionMatrix intersection matrix for two geometries
  * @return boolean value
  * @throws QueryException query exception
  */
 @Deterministic
 public Bln relate(final ANode node1, final ANode node2, final Str intersectionMatrix)
     throws QueryException {
   final Geometry geo1 = checkGeo(node1);
   final Geometry geo2 = checkGeo(node2);
   return Bln.get(geo1.relate(geo2, intersectionMatrix.toJava()));
 }
Esempio n. 2
0
  /**
   * Return a boolean value that shows weather the line is a ring or not. A line is a ring if it is
   * closed and simple.
   *
   * @param node xml element containing gml object(s)
   * @return boolean value
   * @throws QueryException query exception
   */
  @Deterministic
  public Bln isRing(final ANode node) throws QueryException {
    final Geometry geo = geo(node, Q_GML_LINEARRING, Q_GML_LINESTRING);
    if (geo == null && checkGeo(node) != null)
      throw GeoErrors.geoType(node.qname().local(), "Line");

    return Bln.get(((LineString) geo).isRing());
  }
Esempio n. 3
0
  /**
   * Checks if the line is closed loop. That is, if the start Point is same with end Point.
   *
   * @param node xml element containing gml object(s)
   * @return boolean value
   * @throws QueryException query exception
   */
  @Deterministic
  public Bln isClosed(final ANode node) throws QueryException {
    final Geometry geo = geo(node, Q_GML_LINEARRING, Q_GML_LINESTRING, Q_GML_MULTILINESTRING);
    if (geo == null && checkGeo(node) != null)
      throw GeoErrors.geoType(node.qname().local(), "Line");

    return Bln.get(
        geo instanceof LineString
            ? ((LineString) geo).isClosed()
            : ((MultiLineString) geo).isClosed());
  }
Esempio n. 4
0
 /**
  * Returns a boolean value that shows if this geometry overlaps the specified geometry.
  *
  * @param node1 xml element containing gml object(s)
  * @param node2 xml element containing gml object(s)
  * @return boolean value
  * @throws QueryException query exception
  */
 @Deterministic
 public Bln overlaps(final ANode node1, final ANode node2) throws QueryException {
   final Geometry geo1 = checkGeo(node1);
   final Geometry geo2 = checkGeo(node2);
   return Bln.get(geo1.overlaps(geo2));
 }
Esempio n. 5
0
 /**
  * Returns a boolean value which shows if the specified geometry is simple or not, which has no
  * anomalous geometric points, such as self intersection or self tangency.
  *
  * @param node xml element containing gml object(s)
  * @return boolean value
  * @throws QueryException query exception
  */
 @Deterministic
 public Bln isSimple(final ANode node) throws QueryException {
   return Bln.get(checkGeo(node).isSimple());
 }
Esempio n. 6
0
 /**
  * Returns a boolean value which shows if the specified geometry is empty or not.
  *
  * @param node xml element containing gml object(s)
  * @return boolean value
  * @throws QueryException query exception
  */
 @Deterministic
 public Bln isEmpty(final ANode node) throws QueryException {
   return Bln.get(node != null && checkGeo(node) != null);
 }