Package it.geosolutions.geoserver.rest.encoder.feature

Examples of it.geosolutions.geoserver.rest.encoder.feature.GSFeatureTypeEncoder


        String layername = "states";
       
        if (storeEncoder instanceof GSOracleNGDatastoreEncoder)
            layername = layername.toUpperCase();

        GSFeatureTypeEncoder fte = new GSFeatureTypeEncoder();
        fte.setName(layername);
        fte.setNativeName(layername);
        fte.setTitle(layername+"_TITLE");
        fte.setNativeCRS("EPSG:4326");
        fte.setDescription("desc");
        fte.setEnabled(true);
        GSLayerEncoder layerEncoder = new GSLayerEncoder();
        layerEncoder.setEnabled(true);
        layerEncoder.setQueryable(true);
        layerEncoder.setDefaultStyle("polygon");
View Full Code Here


     * @deprecated Will be removed in the next release.
     */
    public boolean publishDBLayer(String workspace, String storename, String layername, String srs,
            String defaultStyle) {

        final GSFeatureTypeEncoder fte = new GSFeatureTypeEncoder();

        fte.setProjectionPolicy(ProjectionPolicy.REPROJECT_TO_DECLARED);
        fte.addKeyword("KEYWORD");
        fte.setTitle(layername);
        fte.setName(layername);
        fte.setSRS(srs); // srs=null?"EPSG:4326":srs);
        final GSLayerEncoder layerEncoder = new GSLayerEncoder();
        layerEncoder.setDefaultStyle(defaultStyle);
        return publishDBLayer(workspace, storename, fte, layerEncoder);
    }
View Full Code Here

            LOGGER.error("Unable to create data store for shapefile: " + shapefile);
            return false;
        }

        // config coverage props (srs)
        final GSFeatureTypeEncoder featureTypeEncoder = new GSFeatureTypeEncoder();
        featureTypeEncoder.setName(datasetName);
        featureTypeEncoder.setTitle(datasetName);
        // set destination srs
        if (!srsNull) {
            featureTypeEncoder.setSRS(srs);
        } else {
            // this under the assumption that when the destination srs is null the nativeCRS has an EPSG one so we force them to be the same
            featureTypeEncoder.setSRS(nativeCRS);
        }
        // set native srs
        if (!nativeSrsNull) {
            featureTypeEncoder.setNativeCRS(nativeCRS);
        }
        featureTypeEncoder.setProjectionPolicy(policy);

        if (!createResource(workspace, StoreType.DATASTORES, storeName, featureTypeEncoder)) {
            LOGGER.error("Unable to create a coverage store for coverage: " + shapefile);
            return false;
        }
View Full Code Here

TOP

Related Classes of it.geosolutions.geoserver.rest.encoder.feature.GSFeatureTypeEncoder

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.