Package org.geotools.geometry.iso.topograph2D.util

Examples of org.geotools.geometry.iso.topograph2D.util.UniqueCoordinateArrayFilter


      // Add control points of exterior ring
      positions = new ArrayList<DirectPositionImpl>();
      positions = ((RingImplUnsafe)((SurfaceBoundaryImpl)geom).getExterior()).asDirectPositions();
    }
   
    UniqueCoordinateArrayFilter filter = new UniqueCoordinateArrayFilter();

    // Filter all coordinates to eleminate redudant coordinates
    Iterator posIter = positions.iterator();
    while (posIter.hasNext()) {
      Object pos = posIter.next();
      if (pos instanceof DirectPositionImpl) {
        filter.filter(new Coordinate(((DirectPositionImpl)pos).getCoordinate()));
      } else if (pos instanceof PointImpl) {
        filter.filter(new Coordinate(((PointImpl)pos).getPosition().getCoordinate()));
      } else
        Assert.isTrue(false, "Invalid coordinate type");
    }
   
    return filter.getCoordinates();
  }
View Full Code Here

TOP

Related Classes of org.geotools.geometry.iso.topograph2D.util.UniqueCoordinateArrayFilter

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.