Ejemplo n.º 1
0
  /**
   * Returns the z-coordinate value for point.
   *
   * @param node xml element containing gml object(s)
   * @return z double value
   * @throws QueryException query exception
   */
  @Deterministic
  public Dbl z(final ANode node) throws QueryException {
    final Geometry geo = geo(node, Q_GML_POINT);
    if (geo == null && checkGeo(node) != null)
      throw GeoErrors.geoType(node.qname().local(), "Line");

    return Dbl.get(geo.getCoordinate().z);
  }
Ejemplo n.º 2
0
 /**
  * Returns the area of a Geometry. Areal Geometries have a non-zero area. Returns zero for Point
  * and Lines.
  *
  * @param node xml element containing gml object(s)
  * @return geometry area as a double vaue
  * @throws QueryException query exception
  */
 @Deterministic
 public Dbl area(final ANode node) throws QueryException {
   return Dbl.get(checkGeo(node).getArea());
 }
Ejemplo n.º 3
0
 /**
  * Returns the length of this Geometry. Linear geometries return their length. Areal geometries
  * return their parameter. Others return 0.0
  *
  * @param node xml element containing gml object(s)
  * @return length double value
  * @throws QueryException query exception
  */
 @Deterministic
 public Dbl length(final ANode node) throws QueryException {
   return Dbl.get(checkGeo(node).getLength());
 }
Ejemplo n.º 4
0
 /**
  * Returns the shortest distance in the units of the spatial reference system of geometry, between
  * the geometries. The distance is the distance between a point on each of the geometries.
  *
  * @param node1 xml element containing gml object(s)
  * @param node2 xml element containing gml object(s)
  * @return distance double value
  * @throws QueryException query exception
  */
 @Deterministic
 public Dbl distance(final ANode node1, final ANode node2) throws QueryException {
   final Geometry geo1 = checkGeo(node1);
   final Geometry geo2 = checkGeo(node2);
   return Dbl.get(geo1.distance(geo2));
 }