Dear Jody Garnette,
    FidFilter works good, thank you, and following is the code I have used 
..


   FeatureCollection fColl = null;
    FilterFactory filterFactory = FilterFactoryFinder.createFilterFactory();
    FidFilter filter = null;
    filter = filterFactory.createFidFilter();
       FeatureType featureType = mapLayer.getFeatureSource().getSchema();
       filter.addFid(fid);
       fColl = mapLayer.getFeatureSource().getFeatures(filter);
        if(fColl.getCount() > 0){
       FeatureReader reader = fColl.reader();
       while(reader.hasNext()) {
        feature = (Feature) reader.next();
       }
       }
//       System.out.println("Fcollection=" + fColl.getCount());
       break;
     }
Best Regards
  Govardhan


----- Original Message ----- 
From: "Jody Garnett" <[EMAIL PROTECTED]>
To: "Govardhan" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Friday, January 12, 2007 3:22 AM
Subject: Re: How to find Feature from featureid


> You can use a FilterFactory to construct a "fid" filter (usually a set of 
> feature ids); this is a normal filter that you
> can use to query a featuresource just like a bounding box filter.
>
> Jody
>> Dear Jody garnette,
>>     I have a Feature ID with me and also I know the layer to which it 
>> belongs to, but I don't know how
>> to find this feature from this maplayer using query.
>>  Best Regards
>>   Govardhan
>
> __________ NOD32 1971 (20070110) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
> 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to