diff --git a/emohawk/readers/shapefile.py b/emohawk/readers/shapefile.py index 4d0b92a7..40ae0be0 100644 --- a/emohawk/readers/shapefile.py +++ b/emohawk/readers/shapefile.py @@ -6,9 +6,6 @@ # granted to it by virtue of its status as an intergovernmental organisation # nor does it submit to any jurisdiction. - -import geopandas as gpd - from . import Reader @@ -17,6 +14,9 @@ class ShapefileReader(Reader): Class for reading and polymorphing ESRI Shapefiles. """ + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + def to_pandas(self, **kwargs): """ Return a pandas `dataframe` representation of the data. @@ -25,6 +25,8 @@ def to_pandas(self, **kwargs): ------- pandas.core.frame.DataFrame """ + import geopandas as gpd + return gpd.read_file(self.source, **kwargs) def to_json(self, file_name):