Hi Jukka,
> What do you do with the attributes? Do you discard them all for the whole 
> layer or do you give them to features as long as they last and then fill null 
> attributes for the remaining orphan features?
Second option, I fill null attributes for remaining orphans. When the 
dbf exists, the main loop stopped after the last record. I just added a 
supplementary loop to step over remaining shapes.
> I guess that extra features are often the last shapes is .shp and then the 
> first alternative would feel fine, but it is also possible that the extra 
> features are in the beginning of the .shp or then somebody just deleted a row 
> from the middle of .dbf file with OpenOffice or something.
>
> If I remember right, shape file format does not use IDs for joins but it 
> behaves in a similar way than the ArcInfo generate format by just taking the 
> first shape from .shp and pairing it with the first row in .dbf and going on 
> with the second shape and second line in .dbf and so on. So if .shp and .dbf 
> get unsynchronised all the attributes after that point will go to wrong 
> features.
Yes, that is also my understanding of the format specification. So I 
suppose that additional shapes are the one at the end of the shapefile.
I don't think we can do much more.

Thanks for the feedback,

Michaël
>
> -Jukka Rahkonen-
>
>
> ________________________________________
> Michaël Michaud wrote:
>
>> Hi,
>> This is the second time I have to deal with a "corrupted" shapefile
>> with more shapes in the shp than records in the dbf.
>> I made a patch to read all geometries in this case (and log the error).
>> Please check that you still can read your preferred shapefile as before.
>> Michaël
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to