Package org.geotools.geometry.jts

Examples of org.geotools.geometry.jts.GeometryClipper.clip()


                    // amount
                    double clipBuffer = Math.max(size / 2, metaBuffer) + 10;
                    Envelope env = new Envelope(screenSize.getMinX(), screenSize.getMaxX(), screenSize.getMinY(), screenSize.getMaxY());
                    env.expandBy(clipBuffer);
                    final GeometryClipper clipper = new GeometryClipper(env);
                    Geometry g = clipper.clip(shape.getGeometry(), false);
                    if(g == null) {
                        continue;
                    }
                    if(g != shape.getGeometry()) {
                        shape = new LiteShape2(g, null, null, false);
View Full Code Here


        public ROI intersect(ROI roi) {
            final Geometry geom = getGeometry(roi);
            // is it a rectangle?
            if (geom != null && geom.equalsExact(geom.getEnvelope())) {
                GeometryClipper clipper = new GeometryClipper(geom.getEnvelopeInternal());
                Geometry intersect = clipper.clip(getAsGeometry(), true);
                return new ROIGeometry(intersect);
   
            } else {
                return super.intersect(roi);
            }
View Full Code Here

                  new com.vividsolutions.jts.geom.Envelope(
                      0,
                      tileSize,
                      0,
                      tileSize));
              footprintWithinTileScreenGeom = tileClipper.clip(
                  wholeFootprintScreenGeom,
                  true);
              footprintWithinTileWorldGeom = JTS.transform(
                  footprintWithinTileScreenGeom,
                  gridToCRS);
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.