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).


> 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.

> 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.

> 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.

  Jon


1: http://www.dbase.com/knowledgebase/int/db7_file_fmt.htm

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to