Examples of featureId()


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

        String fid = features.next().getID();
        features.close();
       
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        String typeName = store.getSchema().getTypeName();
        Id id = ff.id(Collections.singleton(ff.featureId(fid)));
       
        assertEquals(-1, store.getCount(new Query(typeName, id)));
        assertEquals(1, count(ds, typeName, id, t));
       
        store.removeFeatures(id);
View Full Code Here

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

        SimpleFeatureStore road = (SimpleFeatureStore) dataStore.getFeatureSource(tname("road"));

        FilterFactory factory = CommonFactoryFinder.getFilterFactory(null);

        //td.rd1Filter = factory.createFidFilter(td.roadFeatures[0].getID());
        Filter rd1Filter = factory.id(Collections.singleton(factory.featureId(
                        td.roadFeatures[0].getID())));

        AttributeDescriptor name = td.roadType.getDescriptor(aname("name"));
        road.modifyFeatures(new AttributeDescriptor[] { name, }, new Object[] { "changed", },
            rd1Filter);
View Full Code Here

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

        query.getFunction().add(function1);
        query.getPropertyName().add("property2");
        query.getXlinkPropertyName().add(xlinkPropertyName2);
        query.getFunction().add(function2);

        query.setFilter(ff.id(Collections.singleton(ff.featureId("fid"))));
        query.getSortBy().add(ff.sort("sortProperty", SortOrder.DESCENDING));

        return query;
    }
}
View Full Code Here

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

        count(store, 2);
        FeatureId identifier = fid.iterator().next();
        String next = identifier.getID();
        FilterFactory filterFactory = CommonFactoryFinder.getFilterFactory(null);
        Filter f = filterFactory.id(Collections.singleton(filterFactory.featureId(next)));
        store.removeFeatures(f);
       
        count(store, 1);
//        assertEquals("Number of known feature as obtained from getCount",3, store.getCount(Query.ALL));
    }
View Full Code Here

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

    protected Filter createFilter() {
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        Set<FeatureId> featureIds = new HashSet<FeatureId>();
        for(Iterator<FeatureId> it = index.iterator(); it.hasNext();){
           FeatureId fid = it.next();
           featureIds.add(ff.featureId( fid.getID() ));
        }
        Id fids = ff.id(featureIds);
           
        return fids;
    }
View Full Code Here

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

                Set featureIds = new HashSet();

                FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints());
                for (Iterator f = fids.iterator(); f.hasNext();) {
                    featureIds.add(ff.featureId((String) f.next()));
                }

                Id modified = ff.id(featureIds);

                FeatureCollection<SimpleFeatureType, SimpleFeature> changed = store.getFeatures(modified);
View Full Code Here

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

   
    FilterFactory2 filterFactory = CommonFactoryFinder.getFilterFactory2( GeoTools.getDefaultHints() );
   
    // The filter factory requires the FID to be in a Set.
    Set<Identifier> featureIdSet = new HashSet<Identifier>( 1 );
    featureIdSet.add( filterFactory.featureId( featureId ) );
   
    Filter filter = filterFactory.id( featureIdSet );
   
    try
    {
View Full Code Here

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

        .getDefaultHints());

    Set<FeatureId> fids = new HashSet<FeatureId>();
    for (int i = 0, count = featureIds.length; i < count; i++) {
      String id = featureIds[i];
      FeatureId fid = ff.featureId(featureTypeName + "." + id);
      fids.add(fid);
    }
    Filter filter = ff.id(fids);

    return filter;
View Full Code Here

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

                                                           .toString(),
                        FeatureIdType.attrs[0].getName());
            }
            FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
            Set<FeatureId> fids = new HashSet<FeatureId>();
            fids.add( ff.featureId(fid) );
           
            return ff.id( fids );
            //FidFilter r = FilterFactoryFinder.createFilterFactory().createFidFilter(fid);
            //return r;
        }
View Full Code Here

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

        final String typeName = featureType.getTypeName();
        final BoundingBox bounds = addedFeature.getBounds();
        ReferencedEnvelope referencedEnvelope = ReferencedEnvelope.reference(bounds);
        String fid = addedFeature.getID();
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Filter filter = ff.id(Collections.singleton(ff.featureId(fid)));
        doFireFeaturesAdded(typeName, referencedEnvelope, filter);
    }

    private void fireChanged(final SimpleFeature changedFeature) {
        final String typeName = featureType.getTypeName();
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.