ecoscope.base#
Submodules#
Package Contents#
- class ecoscope.base.ProximityProfile[source]#
- spatial_features: list[SpatialFeature]#
- class ecoscope.base.RelocsCoordinateFilter[source]#
Filter parameters for filtering get_fixes based on X/Y coordinate ranges or specific coordinate values
- min_x: float = -180.0#
- max_x: float = 180.0#
- min_y: float = -90.0#
- max_y: float = 90.0#
- filter_point_coords: list[list[float]] | geopandas.GeoSeries | None = None#
- class ecoscope.base.RelocsDateRangeFilter[source]#
Filter parameters for filtering based on a datetime range
- start: datetime.datetime#
- end: datetime.datetime#
- class ecoscope.base.RelocsDistFilter[source]#
Filter based on the distance between consecutive fixes. Fixes are filtered to the range [min_dist_km, max_dist_km].
- min_dist_km: float = 0.0#
- max_dist_km: float#
- temporal_order: str = 'ASC'#
- class ecoscope.base.RelocsSpeedFilter[source]#
Filter parameters for filtering based on the speed needed to move from one fix to the next
- max_speed_kmhr: float#
- temporal_order: str = 'ASC'#
- ecoscope.base.RelocsFilterType#
- class ecoscope.base.SpatialFeature[source]#
A spatial geometry with an associated name and unique ID. Becomes a useful construct in several movdata calculations
- name: str = ''#
- unique_id: Any#
- geometry: Any = None#
- class ecoscope.base.TrajSegFilter[source]#
Class filtering a set of trajectory segment segments
- min_length_meters: float = 0.0#
- max_length_meters: float#
- min_time_secs: float = 0.0#
- max_time_secs: float#
- min_speed_kmhr: float = 0.0#
- max_speed_kmhr: float#
- class ecoscope.base.StraightTrackProperties(gdf)[source]#
- Parameters:
gdf (geopandas.GeoDataFrame)
- gdf#
- property start_fixes#
- property end_fixes#
- property inverse_transformation#
- property heading#
- property dist_meters#
- property nsd#
- property timespan_seconds#
- property speed_kmhr#
- ecoscope.base.BoundingBox#
- ecoscope.base.create_meshgrid(aoi, in_crs, out_crs, xlen=1000, ylen=1000, return_intersecting_only=True, align_to_existing=None)[source]#
Create a grid covering aoi.
- Parameters:
aoi (shapely.geometry.base.BaseGeometry) – The area of interest. Should be in a UTM CRS.
in_crs (value) – Coordinate Reference System of input aoi. Can be anything accepted by pyproj.CRS.from_user_input(). Geometry is automatically converted to UTM CRS as an intermediate for computation.
out_crs (value) – Coordinate Reference System of output gs. Can be anything accepted by pyproj.CRS.from_user_input(). Geometry is automatically converted to UTM CRS as an intermediate for computation.
xlen (int, optional) – The width of a grid cell in meters.
ylen (int, optional) – The height of a grid cell in meters.
return_intersecting_only (bool, optional) – Whether to return only grid cells intersecting with the aoi.
align_to_existing (geopandas.GeoSeries or geopandas.GeoDataFrame, optional) – If provided, attempts to align created grid to start of existing grid. Requires a CRS and valid geometry.
- Returns:
gs – Grid of boxes. CRS is converted to out_crs.
- Return type:
geopandas.GeoSeries
- ecoscope.base.groupby_intervals(df, col, intervals)[source]#
- Parameters:
df (pd.DataFrame) – Data to group
col (str) – Name of column to group on
intervals (pd.IntervalIndex) – Intervals to group on
- Return type:
pd.core.groupby.DataFrameGroupBy
- ecoscope.base.color_tuple_to_css(color)[source]#
- Parameters:
color (Tuple[int, int, int, int])
- Return type:
str