Examples of featureId()


Examples of org.opengis.filter.FilterFactory.featureId()

                .getBinding();

        Geometry adaptedGeom = GeometryUtil.adapt(newGeometry, expectedClass);

        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        FeatureId fid = ff.featureId(fidToUpdate);
        Set<FeatureId> ids = new HashSet<FeatureId>(1);
        ids.add(fid);
        Id filter = ff.id(ids);

        store.modifyFeatures(geomAttr, adaptedGeom, filter);
View Full Code Here

Examples of org.opengis.filter.FilterFactory.featureId()

            i++;
            SimpleFeature feature=iter.next();
            Coordinate c=map.getViewportModel().pixelToWorld(i*10,0);
            FilterFactory filterFactory = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
      Set<Identifier> ids = new HashSet<Identifier>();
      ids.add(filterFactory.featureId(feature.getID()));
      GeometryDescriptor defaultGeometry = feature.getFeatureType().getGeometryDescriptor();
      resource.modifyFeatures(defaultGeometry, fac.createPoint(c),
                    filterFactory.id(ids));
        }
        ((EditManager)map.getEditManager()).commitTransaction();
View Full Code Here

Examples of org.opengis.filter.FilterFactory.featureId()

       
        SimpleFeature feature = SimpleFeatureBuilder.build(resource.getSchema(),
            new Object[]{multiline, "multiline"}, "testGeom"); //$NON-NLS-1$
        Set<Identifier> ids = new HashSet<Identifier>();
        FilterFactory filterFactory = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
        ids.add(filterFactory.featureId(features.features().next().getID()));
    resource.modifyFeatures(feature.getFeatureType().getGeometryDescriptor(), multiline,
                filterFactory.id(ids));
   
       
        handler.handleEvent(new MapMouseEvent(null, 20, 15, none, none, button1), EventType.RELEASED);
View Full Code Here

Examples of org.opengis.filter.FilterFactory.featureId()

     */
    private Filter getSelectedFeatureFilter(Integer index) {

        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        String id = this.mergeBuilder.getFeature(index).getID();
        FeatureId fid = ff.featureId(id);
        Set<FeatureId> ids = new HashSet<FeatureId>(1);
        ids.add(fid);
        Id filter = ff.id(ids);

        return filter;
View Full Code Here

Examples of org.opengis.filter.FilterFactory.featureId()

       FilterFactory ff = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
      
       Set<Identifier> fid = new HashSet<Identifier>();
        // generate a fid filter out of the invalid features
        for( SimpleFeature feature : results ) {
            fid.add(ff.featureId(feature.getID()));
        }
        // select the invalid features on the current layer
        MapCommand selectionCommand = SelectionCommandFactory.getInstance().createSelectCommand(
                layer, ff.id(fid));
        layer.getMap().sendCommandASync(selectionCommand);
View Full Code Here

Examples of org.opengis.filter.FilterFactory.featureId()

        EditManager editManager = (EditManager) layer.getMap().getEditManager();

        FilterFactory factory = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
        Set<Identifier> ids = new HashSet<Identifier>();
        for( EditGeom geom : geoms ) {
          ids.add(factory.featureId(geom.getFeatureIDRef().get()));
        }
        Id fidFilter = factory.id(ids);
        Filter filter =factory.and(fidFilter, layer.createBBoxFilter(dirtyArea, new NullProgressMonitor()));
         
        try {
View Full Code Here

Examples of org.opengis.filter.FilterFactory.featureId()

    }

    private Filter fidFilter( SimpleFeature feature ) {
        FilterFactory factory = CommonFactoryFinder
        .getFilterFactory(GeoTools.getDefaultHints());
        Id id = factory.id(Collections.singleton(factory.featureId(feature.getID())));
        return id;
    }
    public String getName() {
        return "Set Current Selection";
    }
View Full Code Here

Examples of org.opengis.filter.FilterFactory.featureId()

        if (!editBlackboard.isEmpty()) {
            EditGeom newSelection = editBlackboard.getGeoms().get(0);

            FilterFactory factory = CommonFactoryFinder
                    .getFilterFactory(GeoTools.getDefaultHints());
            Id id = factory.id(Collections.singleton(factory.featureId(newSelection
                    .getFeatureIDRef().get())));

            FeatureSource<SimpleFeatureType, SimpleFeature> source = layer.getResource(FeatureSource.class, monitor);
            FeatureCollection<SimpleFeatureType, SimpleFeature>  features = source.getFeatures(id);
View Full Code Here

Examples of org.opengis.filter.FilterFactory.featureId()

            throw new HttpErrorCodeException(204);
        } else {
            FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
            Set<FeatureId> ids = new HashSet<FeatureId>();
            for (String fid : featuresInTile) {
                ids.add(ff.featureId(fid));
            }
            return ff.id(ids);
        }
    }
View Full Code Here

Examples of org.opengis.filter.FilterFactory.featureId()

        }

        DefaultQuery q = new DefaultQuery();
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);

        q.setFilter(ff.id(Collections.singleton(ff.featureId(feature))));

        FeatureCollection col = null;
        try {
            col = featureType.getFeatureSource(null, null).getFeatures(q);
        } catch (IOException e) {
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.