Package com.vividsolutions.jts.geom

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


  }

  public void testNormalizeLineString1() throws Exception {
    LineString l = (LineString) reader.read(
          "LINESTRING (20 20, 160 40, 160 100, 100 120, 60 60)");
    l.normalize();
    LineString expectedValue = (LineString) reader.read(
          "LINESTRING (20 20, 160 40, 160 100, 100 120, 60 60)");
    assertEqualsExact(expectedValue, l);
  }
View Full Code Here


  }

  public void testNormalizeLineString2() throws Exception {
    LineString l = (LineString) reader.read(
          "LINESTRING (20 20, 160 40, 160 100, 100 120, 60 60)");
    l.normalize();
    LineString expectedValue = (LineString) reader.read(
          "LINESTRING (20 20, 160 40, 160 100, 100 120, 60 60)");
    assertEqualsExact(expectedValue, l);
  }
View Full Code Here

  }

  public void testNormalizeLineString3() throws Exception {
    LineString l = (LineString) reader.read(
          "LINESTRING (200 240, 140 160, 80 160, 160 80, 80 80)");
    l.normalize();
    LineString expectedValue = (LineString) reader.read(
          "LINESTRING (80 80, 160 80, 80 160, 140 160, 200 240)");
    assertEqualsExact(expectedValue, l);
  }
View Full Code Here

  }

  public void testNormalizeLineString4() throws Exception {
    LineString l = (LineString) reader.read(
          "LINESTRING (200 240, 140 160, 80 160, 160 80, 80 80)");
    l.normalize();
    LineString expectedValue = (LineString) reader.read(
          "LINESTRING (80 80, 160 80, 80 160, 140 160, 200 240)");
    assertEqualsExact(expectedValue, l);
  }
View Full Code Here

  }

  public void testNormalizeLineString5() throws Exception {
    LineString l = (LineString) reader.read(
          "LINESTRING (200 340, 140 240, 140 160, 60 240, 140 240, 200 340)");
    l.normalize();
    LineString expectedValue = (LineString) reader.read(
          "LINESTRING (200 340, 140 240, 60 240, 140 160, 140 240, 200 340)");
    assertEqualsExact(expectedValue, l);
  }
View Full Code Here

    assertEqualsExact(expectedValue, l);
  }

  public void testNormalizeEmptyLineString() throws Exception {
    LineString l = (LineString) reader.read("LINESTRING EMPTY");
    l.normalize();
    LineString expectedValue = (LineString) reader.read("LINESTRING EMPTY");
    assertEqualsExact(expectedValue, l);
  }

  public void testNormalizeEmptyPolygon() throws Exception {
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.