Hi Jon,
On Oct 24, 2008, at 11:32 AM, Jon Burgess wrote: > On Thu, 2008-10-23 at 17:04 -0700, Dane Springmeyer wrote: >> Just finished chatting with Frank Warmerdam on #gdal. >> >> I'll paste below the full conversion for the details. >> >> The summary is that just as Jon notes, the shapefile dbf has bogus/ >> null characters perhaps due to creation from geoserver/geotools. > > I found a description of the dbf file format which agrees that the > field > should have spaces:[1] > > F - Float: Number stored as a string, right justified, and padded with > blanks to the width of the field.. > ... the .DBF file contains blanks (0x20). > Cool. > >> This caused mapnik to fail in properly filter the attributes, while >> the shapelib derived shapefile reader in MapServer is able to handle >> this type of situation. >> >> The conversion/copying of the file using ogr2ogr also effectively >> fixed the shapefile because GDAL/OGR will correct any 'winding' >> issues >> with polygons. > > It did fix the file, but in this case, it was not the geometries that > caused the problem. > Right, I was confused if the two could somehow be related. Thanks for clearing that up for me. >> So, for now I feel confident continuing to use an 'OGR fixed' version >> of this shapefile to develop benchmarking tests of mapnik against >> mapserver and geoserver. > > It may be worth making Mapnik compatible with the bad files, there may > be many example of them in existence. > Yes, I'll be interested to test on other shapefiles output from geotools-based tools like uDIG or GeoServer. I would guess that corruption like this would be uncommon, but then this specific shapefile is being used so commonly itself there may be others like it or at least derived from it. >> I'll also file a mapnik ticket now to capture this issue so that >> future effort on the shapefile reason to attempt to handle this >> situation. >> >> done: https://trac.mapnik.org/ticket/132 > > I've attached a patch on that ticket which allows Mapnik to > successfully > read these bad shapefiles. > Nice job! I've already rebuilt and tested and I can confirm that this fixes the problem for me as well! > Jon > > > 1: http://www.dbase.com/knowledgebase/int/db7_file_fmt.htm > Thanks so much, Dane _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

