cartopy.io.shapereader.BasicReader#

class cartopy.io.shapereader.BasicReader(filename, bbox=None, **kwargs)[source]#

Provide an interface for accessing the contents of a shapefile with the Python Shapefile Library (PyShp). See the PyShp Readme for more information.

The primary methods used on a BasicReader instance are records() and geometries().

geometries()[source]#

Return an iterator of shapely geometries from the shapefile.

This interface is useful for accessing the geometries of the shapefile where knowledge of the associated metadata is not necessary. In the case where further metadata is needed use the records() interface instead, extracting the geometry from the record with the geometry() method.

records()[source]#

Return an iterator of Record instances.