Examples of FeatureType


Examples of org.opengis.feature.type.FeatureType

   * @param mapContext
   * @return
   */
  private boolean hasOnlyCoverages(WMSMapContext mapContext) {
        for (MapLayer layer : mapContext.getLayers()) {
            FeatureType schema = layer.getFeatureSource().getSchema();
            boolean grid = schema.getName().getLocalPart().equals("GridCoverage")
                    && schema.getDescriptor("geom") != null && schema.getDescriptor("grid") != null;
            if(!grid)
                return false;
        }
        return true;
    }
View Full Code Here

Examples of org.opengis.feature.type.FeatureType

            }
            
            if ( error == null ) {
                try {
                    //load the native feature type, and generate attributes from that
                    FeatureType ft = ds.getSchema(featureType.getQualifiedNativeName());
                    featureType.setNativeCRS(ft.getCoordinateReferenceSystem());
                }
                catch( Exception e ) {
                    LOGGER.warning( "Ignoring feature type: '" + featureType.getNativeName()
                            + "', error occured loading schema: " + e.getMessage() );
                    LOGGER.log(Level.INFO, "", e );
View Full Code Here

Examples of org.opengis.feature.type.FeatureType

                    // taken from lite renderer
                    boolean matches;

                    try {
                        final FeatureType featureType = currLayer.getFeature().getFeatureType();
                        matches = FeatureTypes.isDecendedFrom(featureType, null, ftc_name)
                                || featureType.getName().getLocalPart().equalsIgnoreCase(ftc_name);
                    } catch (Exception e) {
                        matches = false; // bad news
                    }

                    if (!matches) {
View Full Code Here

Examples of org.opengis.feature.type.FeatureType

        // see if we can collect any attribute out of the provided layer
        Set attributes = new HashSet();
        if (mapLayerInfo.getType() == MapLayerInfo.TYPE_VECTOR
                || mapLayerInfo.getType() == MapLayerInfo.TYPE_REMOTE_VECTOR) {
            try {
                final FeatureType type;
                if (mapLayerInfo.getType() == MapLayerInfo.TYPE_VECTOR)
                    type = mapLayerInfo.getFeature().getFeatureType();
                else
                    type = mapLayerInfo.getRemoteFeatureSource().getSchema();
                for (PropertyDescriptor pd : type.getDescriptors()) {
                    if (pd instanceof AttributeDescriptor) {
                        attributes.add(pd.getName().getLocalPart());
                    }
                }
            } catch (IOException ioe) {
View Full Code Here

Examples of org.opengis.feature.type.FeatureType

            if ( !meta.enabled() ) {
                continue;
            }

           
            FeatureType featureType =  null;
            try {
                featureType = meta.getFeatureType();
            } catch(Exception e) {
                LOGGER.log(Level.WARNING, "Could not load underlying feature type for type "
                        + meta.getName(), e);
View Full Code Here

Examples of org.opengis.feature.type.FeatureType

                    // taken from lite renderer
                    boolean matches;

                    try {
                        final FeatureType currSchema = currLayer.getFeature().getFeatureType();
                        matches = currSchema.getName().getLocalPart().equalsIgnoreCase(ftc_name)
                                || FeatureTypes.isDecendedFrom(currSchema, null, ftc_name);
                    } catch (Exception e) {
                        matches = false; // bad news
                    }
View Full Code Here

Examples of org.opengis.feature.type.FeatureType

                Filter filter = (Filter) query.getFilter();

                //  make sure filters are sane
                if (filter != null) {
                    final FeatureType featureType = source.getSchema();
                    ExpressionVisitor visitor = new AbstractExpressionVisitor() {
                            public Object visit(PropertyName name, Object data) {
                                // case of multiple geometries being returned
                                if (name.evaluate(featureType) == null) {
                                    // we want to throw wfs exception, but cant
View Full Code Here

Examples of org.opengis.feature.type.FeatureType

                    //fixed, maybe even have the schema file persist, or at
                    //the very least be present right after creation.
                    if ((schemaFile != null) && schemaFile.exists() && schemaFile.canRead()) {
                        generatedType = writeFile(schemaFile);
                    } else {
                        FeatureType ft = ftInfo.getFeatureType();
                        String gType = generateFromSchema(ft);
                        if ((gType != null) && (gType != "")) {
                            generatedType = gType;
                        }
                    }
View Full Code Here

Examples of org.opengis.feature.type.FeatureType

                Filter filter = (Filter) query.getFilter();

                // make sure filters are sane
                if (filter != null) {
                    final FeatureType featureType = source.getSchema();
                    ExpressionVisitor visitor = new AbstractExpressionVisitor() {
                            public Object visit(PropertyName name, Object data) {
                                // case of multiple geometries being returned
                                if (name.evaluate(featureType) == null) {
                                    // we want to throw wfs exception, but cant
View Full Code Here

Examples of org.opengis.feature.type.FeatureType

    protected void setUp() throws Exception {
        super.setUp();

        FeatureSource fs = createNiceMock(FeatureSource.class);
        replay(fs);
        FeatureType schema = createNiceMock(FeatureType.class);
        replay(schema);
        da = createNiceMock(DataAccess.class);
        name = new NameImpl("blah");
        expect(da.getFeatureSource(name)).andReturn(fs);
        replay(da);
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.