Hi, But the feature id is necessary to update a feature, isn't it?
I mean by holes that there may be feature id that are not contiguous, like 100...103...104...105..120. How can I handle this problem? Manfred -----Message d'origine----- De : Jody Garnett [mailto:[EMAIL PROTECTED] Envoyé : jeudi 13 décembre 2007 01:36 À : Manfred PAUL Objet : Re: [Geotools-gt2-users] min and max feature id from layer Ok cool; just as long as you know the feature id is meaningless. If you just want to partition your data why not use hashcode()? Note that usually people are worried about using a spatial index of some kind so they can partition their data in a way that benifits a spatial application... I was not quite sure what you intended by your structure that "may contain holes"; and you are correct that loading the features into memory will take a long time. You can set up your query so that only the fids are returned if that helps; pass new String[0] into the list of desired attributes. You will find that the MemoryDataStore makes use of a TreeSet based on Fid to store the features in memory in sorted order; you may find that useful? Cheers, Jody > > Hi, > > I just begun to use the geotools. So i want to put the geotool > features into my own feature set structure. > This structure is allocated by using the the difference of max and > min. This will allocate an structure that may contains > holes (which is the goal). > > By iterating over a feature collection i can get the fid (substring > the table name) -> but this means, that i have > to load the whole features. And this may take a long time. > > Manfred > > -----Original Message----- > From: Jody Garnett [mailto:[EMAIL PROTECTED] > Sent: Wed 12/12/2007 7:27 PM > To: Manfred PAUL > Cc: geotools-gt2-users@lists.sourceforge.net > Subject: Re: [Geotools-gt2-users] min and max feature id from layer > > Manfred PAUL wrote: > > > > Hi, > > > > > > > > I am trying to figure out how to get the minimum and maximum feature > > id from a layer(feature collection/source) without loading all > > > > features? > > > > > > > > Is there any way to get this information? > > > > > > > Not that I can think of; the feature id concept is supposed to be a bit > opaque (ie they may not even be ordered; since they are just Strings). > The only > purpose it has is to act as a handle for retrieving an existing Feature > (we have a whole range of problems thinking about what a feature id > means for > a feature on a transaction that is not committed yet). > > What are you trying to use this information for? > > Jody > ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users