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
