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 name 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
-
flopy_geometry
¶ Property that returns a flopy.util.geometry.Collection object
Returns: Return type: flopy.util.geometry.Collectionnos object
-
geojson
¶ Property that returns a geojson.GeometryCollection object to the user
Returns: Return type: geojson.GeometryCollection
-
points
¶ Property returns a multidimensional list of vertices
Returns: Return type: list of vertices
-
shape
¶ Property that returns a shapefile.Shapes object
Returns: Return type: shapefile.Shapes object
-
shapely
¶ Property that returns a shapely.geometry.collection.GeometryCollection object to the user
Returns: Return type: shapely.geometry.collection.GeometryCollection object
-
shapetype
¶ Returns a list of shapetypes to the user
Returns: Return type: list of str
- obj (collection 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
-
flopy_geometry
¶ Returns a flopy geometry object to the user
Returns: Return type: flopy.utils.geometry.<Shape>
-
geojson
¶ Returns a geojson object to the user
Returns: Return type: geojson.<shape>
-
points
¶ Returns a list of vertices to the user
Returns: Return type: list
-
shape
¶ Returns a shapefile.Shape object to the user
Returns: Return type: shapefile.shape
-
shapely
¶ Returns a shapely.geometry object to the user
Returns: Return type: shapely.geometry.<shape>
-
shapetype
¶ Shapetype string for a geometry
Returns: Return type: str
- obj (geospatial object) –