Christian Weaves ha scritto: > Hello all, > > I've previously used other java api's to develop GIS systems, however > this is a problem I have never got to the bottom of. > > I have a shapefile with 7 polygons.... If I open up the .dbf file in a > spreadsheet then there is data for 6 polygons which means one of the > polygons has no data. How do I know what data relates to which polygon? >>From what I can gather this link between the polygons and the data is > held in the shx file but I can't read it.
No, the shx file is just an index for the geometries. Each element states the offset of the n-th geometry from the beginning of the shp file. The shp and dbf association is positional: first geometry goes with the first record in the dbf, second with second, and so on. If you're missing one record after editing it probably means one row was removed, or maybe a newline is missing at the end of file Hope this helps Cheers Andrea ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel