Package org.geotools.geometry.iso.topograph2D

Examples of org.geotools.geometry.iso.topograph2D.IntersectionMatrix


   * @throws UnsupportedDimensionException
   */
  public static boolean cRelate(Geometry g1, Geometry g2, String intersectionPatternMatrix) throws UnsupportedDimensionException {
    GeometryImpl geom1 = GeometryImpl.castToGeometryImpl(g1);
    GeometryImpl geom2 = GeometryImpl.castToGeometryImpl(g2);
    IntersectionMatrix tIM = RelateOp.relate((GeometryImpl) geom1, (GeometryImpl) geom2);
    return tIM.matches(intersectionPatternMatrix);
  }
View Full Code Here


   * @throws UnsupportedDimensionException
   */
  public boolean relate(Geometry aOther, String intersectionPatternMatrix)
      throws UnsupportedDimensionException {
    GeometryImpl geom = GeometryImpl.castToGeometryImpl(aOther);
    IntersectionMatrix tIM = RelateOp.relate(this, geom);
    return tIM.matches(intersectionPatternMatrix);
  }
View Full Code Here

   
    // Return false, if the envelopes doesn´t intersect
    if (!((EnvelopeImpl)this.getEnvelope()).intersects(geom.getEnvelope()))
      return false;

    IntersectionMatrix tIM = null;
    try {
      tIM = RelateOp.relate(this, geom);
    } catch (UnsupportedDimensionException e) {
      e.printStackTrace();
      return false;
    }
   
    boolean rValue = false;
    rValue = tIM.matches("T*F**F***");
   
//    if (this instanceof PrimitiveImpl) {
//      if (geom instanceof PrimitiveImpl) {
//        // Primitive / Primitive
//        rValue = tIM.matches("TFF******");
 
View Full Code Here

//    }

    String intersectionPatternMatrix = "FF*FF****";

    try {
      IntersectionMatrix tIM = RelateOp.relate(this, geom);
      boolean rValue = tIM.matches(intersectionPatternMatrix);
      return rValue;
     
    } catch (UnsupportedDimensionException e) {
      e.printStackTrace();
      return false;
View Full Code Here

    // Return false, if the envelopes doesn´t intersect
    if (!((EnvelopeImpl)this.getEnvelope()).intersects(geom.getEnvelope()))
      return false;
   
    IntersectionMatrix tIM = null;
    try {
      tIM = RelateOp.relate(this, geom);
    } catch (UnsupportedDimensionException e) {
      e.printStackTrace();
      return false;
    }
   
    boolean rValue = false;
   
    // No distinction between primitive and complex (explanation see thesis)
    rValue = tIM.matches("T*F**FFF*");
   
//    if (this instanceof PrimitiveImpl) {
//      if (geom instanceof PrimitiveImpl) {
//        // Primitive / Primitive
//        rValue = tIM.matches("T*F**FFF*");
 
View Full Code Here

    // Return false, if the envelopes doesn´t intersect
    if (!((EnvelopeImpl)this.getEnvelope()).intersects(geom.getEnvelope()))
      return false;

    IntersectionMatrix tIM = null;
    try {
      tIM = RelateOp.relate(this, geom);
    } catch (UnsupportedDimensionException e) {
      e.printStackTrace();
      return false;
    }
   
    boolean rValue = false;
    rValue = tIM.matches("F***T****")
        || tIM.matches("FT*******")
        || tIM.matches("F**T*****");
   
//    if (this instanceof PrimitiveImpl) {
//      if (geom instanceof PrimitiveImpl) {
//        // Primitive / Primitive
//        rValue = tIM.matches("FT*******")
 
View Full Code Here

    }
    // Return false, if the envelopes doesn´t intersect
    if (!((EnvelopeImpl)this.getEnvelope()).intersects(geom.getEnvelope()))
      return false;
   
    IntersectionMatrix tIM = null;
    try {
      tIM = RelateOp.relate(this, geom);
    } catch (UnsupportedDimensionException e) {
      e.printStackTrace();
      return false;
    }
   
    boolean rValue = false;
    if (d1 == 1)
      rValue = tIM.matches("1*T***T**");
    else
      rValue = tIM.matches("T*T***T**");

   
//    if (this instanceof PrimitiveImpl) {
//      if (geom instanceof PrimitiveImpl) {
//        // Primitive / Primitive
View Full Code Here

    // Return false, if the envelopes doesn´t intersect
    if (!((EnvelopeImpl)this.getEnvelope()).intersects(geom.getEnvelope()))
      return false;
   
    IntersectionMatrix tIM = null;
    try {
      tIM = RelateOp.relate(this, geom);
    } catch (UnsupportedDimensionException e) {
      e.printStackTrace();
      return false;
    }
   
    // No distinction between primitive and complex (explanation see thesis)
    boolean rValue = false;
   
    if (d1 == 1 && d2 == 1)
      rValue = tIM.matches("0********");
    else
      rValue = tIM.matches("T*T******");
   
    return rValue;
   
  }
View Full Code Here

   * Computes the Intersection Matrix for the two given geometry objects
   * @return Intersection Matrix
   */
  public IntersectionMatrix computeIM() {
   
    IntersectionMatrix tIM = new IntersectionMatrix();
   
    // since Geometries are finite and embedded in a 2-D space, the EE
    // element must always be 2
    tIM.set(Location.EXTERIOR, Location.EXTERIOR, 2);

    // if the Geometries don't overlap there is nothing to do
//    if (!arg[0].getGeometry().getEnvelopeInternal().intersects(
//        arg[1].getGeometry().getEnvelopeInternal())) {
    EnvelopeImpl env1 = (EnvelopeImpl) arg[0].getGeometry().getEnvelope();
View Full Code Here

  public static IntersectionMatrix relate(GeometryImpl a, GeometryImpl b)
      throws UnsupportedDimensionException {

    RelateOp relOp = new RelateOp(a, b);
    IntersectionMatrix im = relOp.getIntersectionMatrix();
    return im;
  }
View Full Code Here

TOP

Related Classes of org.geotools.geometry.iso.topograph2D.IntersectionMatrix

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.