Package com.vividsolutions.jts.geom

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


    LineString line = (LineString) SplitTestUtil
          .read("LINESTRING (260 280, 260 140, 130 140, 130 220, 90 220, 90 190, 180 190, 180 280, 240 280, 240 220, 150 220, 150 160, 240 160, 240 190, 180 190)");

    List<LinearRing> ringList = new ArrayList<LinearRing>();

    Geometry multiLines = line.union();

    Polygonizer polygonizer = new Polygonizer();
    polygonizer.add(multiLines);
    Collection<Polygon> polyCollection = polygonizer.getPolygons();
View Full Code Here


    List<LinearRing> ringList = new ArrayList<LinearRing>();
    // before create the ring, calculate the orientation of the input list.
    boolean isCCWinputList = CGAlgorithms.isCCW(inputList.toArray(new Coordinate[inputList.size()]));
    // create the rings.
    LineString inputLineString = gf.createLineString(inputList.toArray(new Coordinate[inputList.size()]));
    Geometry multiLines = inputLineString.union();
    Polygonizer polygonizer = new Polygonizer();
    polygonizer.add(multiLines);
    Collection<Polygon> polyCollection = polygonizer.getPolygons();

    // add the rings to the ringList.
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.