That is true.  However I've found that in practive IDs are not help  
for extremely long periods of time.  So the rebuild is intended as a  
way to reduce fragmentation of the index.  I admit its not the best  
strategy, a tree or some such might be a better way but the index is  
complicated enough as it is.

Oh If it remember right the flag is set to regenerate the next time  
the datastore is created not during the current run.  So the index  
will only be deleted when the JVM is shutdown.  If you are writing  
FIDS to a file and re-reading them between runs you may want to  
rethink this.

Jesse

Le 4-Feb-08 à 9:41 AM, Enam a écrit :

>
> A question on this. I believe that after a certain number of  
> deletes, the fid
> index is deleted and rebuilt from scratch. If such is the case, does  
> it
> imply that feature id is actually not constant because the next time  
> fid
> index is created all the "gaps" in fid (caused by deletes) will be  
> filled ?
>
> Jesse Eichar wrote:
>>
>> The Feature ID for a Shapefile is often just the typename.rownumber
>> but if there is a fidIndex it is used to maintain the consistency of
>> the fids across many edits.  So after many edits the fid will no
>> longer be typename.rownumber.
>>
>> For example suppose we have
>>
>> feature.1
>> feature.2
>> feature.3
>>
>> deleteing feature.2 should leave:
>>
>> feature.1
>> feature.3
>>
>> That is one of the two purposes of the FidReader/Writer.  The other
>> purpose is so that features can be looked up in near constant time.
>>
>> Jesse
>>
>> Le 25-Jan-08 à 9:07 AM, Jody Garnett a écrit :
>>
>>> Manuele Ventoruzzo wrote:
>>>> Hi All,
>>>>
>>>> I have to do a search by attribute into a large shapefile. So I
>>>> need a
>>>> feature like attribute index, but I know that at the moment  
>>>> Geotools
>>>> doesn't support attribute indexes for shapefiles.
>>> But we do welcome the idea; these are straight DBF indexes as far  
>>> as I
>>> know so you should be able to find and example and send us a patch.
>>> As a general warning the shapefile code has been cleaned up on 2.5.x
>>> (the first time this has been done for a while). So if you are
>>> serious about
>>> shapefile use that is the place to be.
>>>> So I'm trying to find a way to use a FidFilter.
>>>> First of all, what is build a Fid index for shapefiles like?
>>>> I have read the source code and it appears that Fid is always the
>>>> position of the record in the attributes (.dbf) file.
>>>>
>>>> Is this correct?
>>>>
>>> It is; the "FeatureId" is made up of the file name (because the WFS
>>> specification asks feature ids to start with a letter) followed by a
>>> "."
>>> and the row number.
>>>> If not, is there a way to tell Geotools which attribute should be
>>>> used as Feature ID?
>>>>
>>> The file used to access rows quickly is part of the shapefile
>>> definition; and it is defined in terms of row numbers. Row numbers  
>>> are
>>> used in the shp file as well
>>> to indicate which attribtues a geometry is bound to.
>>>> Otherwise, can I assume that Fid is always the position of the  
>>>> record
>>>> into dbf file and use another file to map attributes into
>>>> corresponding Fid.
>>>>
>>> Correct; and if you do that your other file is an attribute index
>>> and we
>>> would *love* to try out your implementation!
>>>> Thank you for the attention.
>>>> Manuele
>>>>
>>>>
>>>> -------------------------------------------------------------------------
>>>> This SF.net email is sponsored by: Microsoft
>>>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>>> _______________________________________________
>>>> Geotools-gt2-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>>>
>>>
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Microsoft
>>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>> _______________________________________________
>>> Geotools-gt2-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Geotools-gt2-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
>>
>
> -- 
> View this message in context: 
> http://www.nabble.com/Fid-index-on-shapefile-tp15087751p15270528.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to