Package org.geotools.geometry.jts

Examples of org.geotools.geometry.jts.GeometryClipper


                    // take into account the meta buffer to try and clip all geometries by the same
                    // 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


        displayArea = new Rectangle(displayArea);
        displayArea.width -= 1;
        displayArea.height -= 1;
       
        // prepare the geometry clipper
        clipper = new GeometryClipper(new Envelope(displayArea.getMinX(), displayArea.getMaxX(), displayArea.getMinY(), displayArea.getMaxY()));

        List<LabelCacheItem> items; // both grouped and non-grouped
        if (needsOrdering) {
            items = orderedLabels();
        } else {
View Full Code Here

                SimpleFeatureType schema, boolean preserveZ) {
            this.delegate = delegate;
           
            // can we use the fast clipper?
            if(clip.getEnvelope().equals(clip)) {
                this.clipper = new GeometryClipper(clip.getEnvelopeInternal());
            } else {
                this.clip = clip;
            }
               
            fb = new SimpleFeatureBuilder(schema);
View Full Code Here

        @Override
        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

        SimpleFeature next;

        public ClippingFeatureIterator(SimpleFeatureIterator delegate, ReferencedEnvelope clip,
                SimpleFeatureType schema) {
            this.delegate = delegate;
            this.clipper = new GeometryClipper(clip);
            fb = new SimpleFeatureBuilder(schema);
        }
View Full Code Here

            try {
              final Geometry wholeFootprintScreenGeom = JTS.transform(
                  footprint,
                  new AffineTransform2D(
                      worldToScreenTransform));
              final GeometryClipper tileClipper = new GeometryClipper(
                  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

Related Classes of org.geotools.geometry.jts.GeometryClipper

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.