flopy.utils.geospatial_utils module
- class GeoSpatialCollection(obj, shapetype=None)[source]
Bases:
object
The GeoSpatialCollection class allows a user to convert between Collection objects from common geospatial libraries.
- Parameters:
obj (collection object) –
obj can accept the following types
str : shapefile path PathLike : shapefile path shapefile.Reader object list of [shapefile.Shape, shapefile.Shape,] shapefile.Shapes object flopy.utils.geometry.Collection object list of [flopy.utils.geometry, …] objects geojson.GeometryCollection object geojson.FeatureCollection object shapely.GeometryCollection object list of [[vertices], …]
shapetype (list) – optional list of shapetypes that is required when vertices are supplied to the class as the obj parameter
- property flopy_geometry
Property that returns a flopy.util.geometry.Collection object
- Return type:
flopy.util.geometry.Collectionnos object
- property geojson
Property that returns a geojson.GeometryCollection object to the user
- Return type:
geojson.GeometryCollection
- property shape
Property that returns a shapefile.Shapes object
- Return type:
shapefile.Shapes object
- property shapely
Property that returns a shapely.geometry.collection.GeometryCollection object to the user
- Return type:
shapely.geometry.collection.GeometryCollection object
- class GeoSpatialUtil(obj, shapetype=None)[source]
Bases:
object
Geospatial utils are a unifying method to provide conversion between commonly used geospatial input types
- Parameters:
obj (geospatial object) –
- obj can accept any of the following objects:
shapefile.Shape object flopy.utils.geometry objects list of vertices geojson geometry objects shapely.geometry objects
shapetype (str) – shapetype is required when a list of vertices is supplied for obj
- property flopy_geometry
Returns a flopy geometry object to the user
- Return type:
flopy.utils.geometry.<Shape>
- property geojson
Returns a geojson object to the user
- Return type:
geojson.<shape>
- property shape
Returns a shapefile.Shape object to the user
- Return type:
shapefile.shape
- property shapely
Returns a shapely.geometry object to the user
- Return type:
shapely.geometry.<shape>