-
-
Notifications
You must be signed in to change notification settings - Fork 264
Description
Some geospatial projects are distributed in shapefiles and additional attributes in separate .dbf files. The National Hydrographic dataset is one case in point (http://www.horizon-systems.com/NHDPlus/NHDPlusV2_home.php). It would be very handy if this data could be loaded with the same library especially since other dbf or geospatial libraries don't support loading from (several) io.BytesIO objects which my project requires because the data is stored in S3.
Reading the code, I came to following conclusions: I could either implement my own version of https://code.activestate.com/recipes/362715-dbf-reader-and-writer/ (on which pyshp relies), remove the check whether the shp part is present and generate NULL geometries instead, or make the loading methods for the different parts of a shapefile public and use only the one for the dbf part.
Also, the docstring of the Reader class states that it can be initialized without providing files in order to call .load() later. But that does not seem to be the case anymore since __init__ throws an error if self.shp and self.dbf are None.