Package org.geoserver.kml.regionate

Examples of org.geoserver.kml.regionate.RegionatingStrategy


        // now, if a definition query has been established for this layer,
        // be sure to respect it by combining it with the bounding box one.
        q = DataUtilities.mixQueries(q, layer.getQuery(), "KMLEncoder");

        // check the regionating strategy
        RegionatingStrategy regionatingStrategy = null;
        String stratname = (String) mapContent.getRequest().getFormatOptions().get("regionateBy");
        if (("auto").equals(stratname)) {
            Catalog catalog = wms.getGeoServer().getCatalog();
            Name name = layer.getFeatureSource().getName();
            stratname = catalog.getFeatureTypeByName(name).getMetadata()
                    .get("kml.regionateStrategy", String.class);
            if (stratname == null || "".equals(stratname)) {
                stratname = "best_guess";
                LOGGER.log(Level.FINE, "No default regionating strategy has been configured in "
                        + name + "; using automatic best-guess strategy.");
            }
        }

        Filter regionatingFilter = Filter.INCLUDE;
        if (stratname != null) {
            regionatingStrategy = findStrategyByName(stratname);

            // if a strategy was specified but we did not find it, let the user
            // know
            if (regionatingStrategy == null) {
                throw new ServiceException("Unknown regionating strategy " + stratname);
            } else {
                regionatingFilter = regionatingStrategy.getFilter(mapContent, layer);
            }
        }

        // try to load less features by leveraging regionating strategy and the SLD
        Filter ruleFilter = getStyleFilter(schema, layer.getStyle(), scaleDenominator);
View Full Code Here

TOP

Related Classes of org.geoserver.kml.regionate.RegionatingStrategy

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.