FeatureCollection¶
- class geodesic.stac.FeatureCollection(dataset=None, query=None, **obj)[source]¶
Bases:
geodesic.bases._APIObject
A collection of Features that is represented by a GeoJSON FeatureCollection in accordance with RFC7946 (https://datatracker.ietf.org/doc/html/rfc7946)
- Parameters
- features¶
(list) - this FeatureCollection’s Feature/Item objects
Descriptor:
_FeatureListDescr
- links¶
(dict) - links associated with this collection
Descriptor:
_ListDescr
- property type¶
the type is always FeatureCollection. This fills in for improperly constructed GeoJSON that doesn’t have the “type” field set.
- property gdf: GeoDataFrame¶
Return a geopandas.GeoDataFrame representation of this FeatureCollection
- Returns
a Geopandas GeoDataFrame of this object
- property df: DataFrame¶
Return a Pandas DataFrame representation of this FeatureCollection
- Returns
a Pandas DataFrame of this object
- property sedf: DataFrame¶
Return an ArcGIS API for Python representation of this feature collection as a spatially enabled Pandas DataFrame
- Returns
a Pandas DataFrame of this object with a arcgis.features.GeoAccessor attached.
- static from_geojson_file(path)[source]¶
loads a geojson file and returns a new FeatureCollection
- Parameters
load (path - path to the file to) –
- static from_shapefile(path)[source]¶
loads a shapefile and returns a new FeatureCollection
This method uses pyshp
- Parameters
load (path - path to the file root/prefix to) –
- static from_file_geodatabase(path, layer, **kwargs)[source]¶
loads a layer from a file geodatabase and returns a new FeatureCollection
- Parameters
geodatabase (path - path to the file) –
load (layer - the name of the layer to) –
fiona.open (**kwargs - additional keywords to pass to) –
- static from_gpx(path, layer, **kwargs)[source]¶
loads a GPX file and returns a new FeatureCollection
- Parameters
file (path - path to the GPX) –
waypoints (layer - which layer to read. One of) – on the file
routes – on the file
tracks – on the file
route_points – on the file
track_points (or) – on the file
depending – on the file
fiona.open (**kwargs - additional keywords to pass to) –
- static from_file(path, layer=None, **kwargs)[source]¶
loads geospatial data using fiona and returns a new FeatureCollection
For more details about what can be read with fiona, see the following docs: https://fiona.readthedocs.io/en/latest/
- Parameters
file (path - path to the) –
load (layer - the name of the layer to) –
fiona.open (**kwargs - additional keywords to pass to) –