Examples of FeatureIdImpl


Examples of org.geotools.filter.identity.FeatureIdImpl

   * @return filter
   */
  public Filter createFidFilter(String[] featureIDs) {
    HashSet<Identifier> ids = new HashSet<Identifier>();
    for (String id : featureIDs) {
      ids.add(new FeatureIdImpl(id));
    }
    return FF.id(ids);
  }
View Full Code Here

Examples of org.geotools.filter.identity.FeatureIdImpl

        params.put(ShapefileDataStoreFactory.CREATE_SPATIAL_INDEX.key, false);

        final ShpServiceImpl service = new ShpServiceImpl(url, params);
        geoResource = new ShpGeoResourceImpl(service, "");
        final Filter filter = CommonFactoryFinder.getFilterFactory2()
                .id(new FeatureIdImpl(FEATURE));
        feature = getFeature(geoResource, filter);
       
        final ShpDocPropertyParser parser = new ShpDocPropertyParser(url);
        parser.setFeatureDocumentInfos(feature, new ArrayList<DocumentInfo>());
        parser.writeProperties();
View Full Code Here

Examples of org.geotools.filter.identity.FeatureIdImpl

        final ShpServiceImpl service = new ShpServiceImpl(url, params);
        geoResource = new ShpGeoResourceImpl(service, "");
        source = new ShpHotlinkSource(geoResource);
        final Filter filter = CommonFactoryFinder.getFilterFactory2()
                .id(new FeatureIdImpl(FEATURE));
        feature = getFeature(geoResource, filter);

        final BasicHotlinkDescriptorParser parser = new BasicHotlinkDescriptorParser(geoResource);
        final List<HotlinkDescriptor> inInfos = new ArrayList<HotlinkDescriptor>();
        inInfos.add(descriptor1);
View Full Code Here

Examples of org.geotools.filter.identity.FeatureIdImpl

        SimpleFeatureType type = DataUtilities.createType("trees",
                "the_geom:Point,FID:String,NAME:String");

        FeatureStore<SimpleFeatureType, SimpleFeature> fs = createMock(FeatureStore.class);
        expect(fs.addFeatures(isA(FeatureCollection.class))).andReturn(
                Collections.singletonList((FeatureId)(new FeatureIdImpl("trees.105"))));
        replay(fs);

        DataStore ds = createMock(DataStore.class);
        expect(ds.getTypeNames()).andReturn(new String[] { "trees" }).anyTimes();
        expect(ds.getSchema("trees")).andReturn(type).anyTimes();
View Full Code Here

Examples of org.geotools.filter.identity.FeatureIdImpl

                    "Invalid fid filter provides, has no fids inside");
        }
        Filter external = null;
        Set<FeatureId> fids = new HashSet<FeatureId>();
        for (Iterator it = ids.iterator(); it.hasNext();) {
            FeatureId id = new FeatureIdImpl((String) it.next());
            FeatureId retyped = RetypingFeatureCollection.reTypeId(id, map.getFeatureType(), map.getOriginalFeatureType());
            fids.add(retyped);
        }
        return ff.id(fids);
    }
View Full Code Here

Examples of org.geotools.filter.identity.FeatureIdImpl

        if (destTypeName.equals(originalTypeName))
            return sourceId;

        final String prefix = originalTypeName + ".";
        if (sourceId.getID().startsWith(prefix)) {
            return new FeatureIdImpl(destTypeName + "." + sourceId.getID().substring(prefix.length()));
        } else
            return sourceId;
    }
View Full Code Here

Examples of org.geotools.filter.identity.FeatureIdImpl

        SimpleFeatureType type = DataUtilities.createType("trees",
                "the_geom:Point,FID:String,NAME:String");

        FeatureStore<SimpleFeatureType, SimpleFeature> fs = createMock(FeatureStore.class);
        expect(fs.addFeatures(isA(FeatureCollection.class))).andReturn(
                Collections.singletonList((FeatureId)(new FeatureIdImpl("trees.105"))));
        replay(fs);

        DataStore ds = createMock(DataStore.class);
        expect(ds.getTypeNames()).andReturn(new String[] { "trees" }).anyTimes();
        expect(ds.getSchema("trees")).andReturn(type).anyTimes();
View Full Code Here

Examples of org.geotools.filter.identity.FeatureIdImpl

    List<AttributeDescriptor> attributeDescriptors = new ArrayList<AttributeDescriptor>();
    attributeDescriptors.add( geometryDescriptor );
    SimpleFeatureType featureType = new SimpleFeatureTypeImpl( new NameImpl( "test" ), attributeDescriptors, geometryDescriptor, false, null, null, null );
    List<Object> attributeValues = new ArrayList<Object>();
    attributeValues.add( null );
    this.feature = new SimpleFeatureImpl( attributeValues, featureType, new FeatureIdImpl( "test" ) );
  }
View Full Code Here

Examples of org.geotools.filter.identity.FeatureIdImpl

  public void setUp() throws Exception
  {
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
   
    SimpleFeatureType featureType = new SimpleFeatureTypeImpl( new NameImpl( "test" ), null, null, false, null, null, null );
    Feature feature = new SimpleFeatureImpl( new ArrayList<Object>(), featureType, new FeatureIdImpl( "test" ) );
   
    this.limb = new Limb();
    this.limb.setEdges( new HashSet<Edge>() );
    this.limb.setFeature( feature );
    this.limb.setIntersection( this.geometryFactory.createPoint( new Coordinate( 0, 0 ) ) );
View Full Code Here

Examples of org.geotools.filter.identity.FeatureIdImpl

   
    SimpleFeatureType featureType = new SimpleFeatureTypeImpl( new NameImpl( "test" ),
                                                               Arrays.asList( attribute1, attribute2 ),
                                                               null, false, null, null, null );
   
    this.feature = new SimpleFeatureImpl( Arrays.asList( null, null ), featureType, new FeatureIdImpl( FEATURE_ID ) );
  }
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.