Package com.vividsolutions.jts.geom

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


  public void testEquals10() throws Exception {
    WKTReader reader = new WKTReader(new GeometryFactory(new PrecisionModel(1), 0));
    Geometry l1 = reader.read("POLYGON((1732328800 519578384, 1732026179 519976285, 1731627364 519674014, 1731929984 519276112, 1732328800 519578384))");
    Geometry l2 = reader.read("POLYGON((1731627364 519674014, 1731929984 519276112, 1732328800 519578384, 1732026179 519976285, 1731627364 519674014))");
    l1.normalize();
    l2.normalize();
    assertTrue(l1.equalsExact(l2));
  }

  public void testFiveZeros() {
    LineString ls = new GeometryFactory().createLineString(new Coordinate[]{
View Full Code Here


     */
    protected Histogram angleHistogram(Geometry g, int binCount) {
        Geometry clone = (Geometry) g.clone();
        //#normalize makes linestrings and polygons use a standard orientation.
        //[Jon Aquino]
        clone.normalize();
        //In #toCoordinateArrays call, set orientPolygons=false because
        //#normalize takes care of orienting the rings. [Jon Aquino]
        List lineStrings = CoordinateArrays.toCoordinateArrays(clone, false);
        Histogram h = new Histogram(binCount);
        for (Iterator i = lineStrings.iterator(); i.hasNext();) {
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.