Package com.vividsolutions.jts.geom

Examples of com.vividsolutions.jts.geom.Geometry.normalize()


              expectedPart.normalize();
       
              boolean found = false;
              for (int j = 0; j < splitResult.size(); j++) {
            Geometry fragment = splitResult.get(j);
            fragment.normalize();
            if (expectedPart.equals(fragment)) {
                found = true;
                assertTrue(fragment.isValid());
                break;
            }
View Full Code Here


    int numGeoms = expectedParts.size();

    for (int expectedPartN = 0; expectedPartN < numGeoms; expectedPartN++) {
      boolean found = false;
      Geometry expectedPart = expectedParts.get(expectedPartN);
      expectedPart.normalize();

      for (int splittedPartN = 0; splittedPartN < resultParts.size(); splittedPartN++) {
        Geometry splittedPart = resultParts.get(splittedPartN);
        splittedPart.normalize();
        if (expectedPart.equals(splittedPart)) {
View Full Code Here

      Geometry expectedPart = expectedParts.get(expectedPartN);
      expectedPart.normalize();

      for (int splittedPartN = 0; splittedPartN < resultParts.size(); splittedPartN++) {
        Geometry splittedPart = resultParts.get(splittedPartN);
        splittedPart.normalize();
        if (expectedPart.equals(splittedPart)) {
          found = true;
          assertTrue( splittedPart.isValid());
          break;
        }
View Full Code Here

    int numGeoms = expectedParts.size();

    for (int expectedPartN = 0; expectedPartN < numGeoms; expectedPartN++) {
      boolean found = false;
      Geometry expectedPart = expectedParts.get(expectedPartN);
      expectedPart.normalize();

      for (int splittedPartN = 0; splittedPartN < output.size(); splittedPartN++) {
        Geometry splittedPart = output.get(splittedPartN);
        splittedPart.normalize();
        if (expectedPart.equals(splittedPart)) {
View Full Code Here

      Geometry expectedPart = expectedParts.get(expectedPartN);
      expectedPart.normalize();

      for (int splittedPartN = 0; splittedPartN < output.size(); splittedPartN++) {
        Geometry splittedPart = output.get(splittedPartN);
        splittedPart.normalize();
        if (expectedPart.equals(splittedPart)) {
          found = true;
          assertTrue( splittedPart.isValid());
          break;
        }
View Full Code Here

       
          assertEquals(expectedParts.size(), splitResult.size());
       
          for (int i = 0; i < expectedParts.size(); i++) {
              Geometry expectedPart = expectedParts.get(i);
              expectedPart.normalize();
       
              boolean found = false;
              for (int j = 0; j < splitResult.size(); j++) {
            Geometry fragment = splitResult.get(j);
            fragment.normalize();
View Full Code Here

        currFeature = iterator.next();
        Geometry featureGeom = (Geometry) currFeature.getDefaultGeometry();
        assert featureGeom != null : "the feature must have almost one geometry"; //$NON-NLS-1$

        featureGeom.normalize();
        if (resultGeom == null) {
          resultGeom = featureGeom;
        } else {
          resultGeom = MergeStrategy.mergeOp(resultGeom, featureGeom);
        }
View Full Code Here

    Geometry otherGeometry = otherGeometryResult.geometry;

    Geometry thisGeometryClone = (Geometry)geometry.clone();
    Geometry otherGeometryClone =(Geometry) otherGeometry.clone();
    thisGeometryClone.normalize();
    otherGeometryClone.normalize();
    return thisGeometryClone.equalsExact(otherGeometryClone, tolerance);
  }

  public String toLongString() {
    return geometry.toText();
View Full Code Here

            if (att1 instanceof Geometry && att2 instanceof Geometry) {
                Geometry g1 = ((Geometry) att1);
                Geometry g2 = ((Geometry) att2);
                g1.normalize();
                g2.normalize();

                if (!g1.equalsExact(g2)) {
                    throw new Exception("Different geometries (" + i + "):\n" + g1 + "\n" + g2);
                }
            } else {
View Full Code Here

            Object att2 = f2.getAttribute(i);
            if (att1 instanceof Geometry && att2 instanceof Geometry) {
                Geometry g1 = ((Geometry) att1);
                Geometry g2 = ((Geometry) att2);
                g1.normalize();
                g2.normalize();
                if (!g1.equalsExact(g2)) {
                    throw new Exception("Different geometries (" + i + "):\n"
                            + g1 + "\n" + g2);
                }
            } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.