Package org.geotools.renderer.lite

Examples of org.geotools.renderer.lite.MetaBufferEstimator.visit()


    }
    // create the style
    Style style = styleFactoryService.createStyle(layer, copy);
    // estimate the buffer
    MetaBufferEstimator estimator = new MetaBufferEstimator();
    estimator.visit(style);
    int bufferInPixels = estimator.getBuffer();
    // expand area to include buffer
    Rectangle tileInpix = mapContext.getViewport().getScreenArea();
    ReferencedEnvelope metaArea = new ReferencedEnvelope(areaOfInterest);
    metaArea.expandBy(bufferInPixels / tileInpix.getWidth() * areaOfInterest.getWidth(),
 
View Full Code Here


        double w = width - 1;
        double h = height - 1;
        // must cram symbol in icon space, so rescale if too big !
        // metabuffer is a good way to judge the size...
        MetaBufferEstimator estimator = new MetaBufferEstimator();
        estimator.visit(symbolizer);
        double estimatedSize = estimator.getBuffer();
        Symbolizer rescaled = symbolizer;
        if (estimatedSize > w || estimatedSize > h) {
          // rescale necessary
          double scale = Math.min(w, h) / estimatedSize;
View Full Code Here

        FeatureTypeStyle[] styles = style.getFeatureTypeStyles();
        for (int t=0; t<styles.length; t++) {
            final FeatureTypeStyle lfts = styles[t];
            Rule[] rules = lfts.getRules();
            for (int j = 0; j < rules.length; j++) {
                rbe.visit(rules[j]);
            }
        }

        if(!rbe.isEstimateAccurate())
            RendererPlugin.log("Assuming rendering buffer = " + rbe.getBuffer()
View Full Code Here

        MetaBufferEstimator estimator = new MetaBufferEstimator();
        for (FeatureTypeStyle fts : style.featureTypeStyles()) {
            for (Rule rule : fts.rules()) {
                if (((rule.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)
                        && ((rule.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator)) {
                    estimator.visit(rule);
                }
            }
        }

        // we get any estimate, it's better than nothing...
View Full Code Here

        MetaBufferEstimator estimator = new MetaBufferEstimator();
        for (FeatureTypeStyle fts : style.featureTypeStyles()) {
            for (Rule rule : fts.rules()) {
                if (((rule.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)
                        && ((rule.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator)) {
                    estimator.visit(rule);
                }
            }
        }

        // we get any estimate, it's better than nothing...
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.