On Jun 20, 2011, at 10:58 AM, Susana Iraiis Delgado Rodriguez wrote: > Hello list!! > > I'm developing a script to create images with mapnik and python, but I have a > problem: > Some of my shapefiles are empty and mapnik doesn't want to work on them.
Can you explain the problem you are seeing in more detail? Is mapnik throwing an error? > Is there any way to verify when a shapefile is empty or doesn't have > information. Depends on what you mean by empty - 0 features perhaps? In that case, Mapnik should still be able to open the Shapefile and then you can, in python, do: ds = mapnik.Shapefile(file="your.shp") if len(ds.all_features()) == 0: print 'this shapefile is empty' > > Thanks!! > _______________________________________________ > Mapnik-users mailing list > [email protected] > https://lists.berlios.de/mailman/listinfo/mapnik-users _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

