ecoscope.base ============= .. py:module:: ecoscope.base Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/ecoscope/base/_dataclasses/index /autoapi/ecoscope/base/ecodataframe/index /autoapi/ecoscope/base/straightrack/index /autoapi/ecoscope/base/utils/index Package Contents ---------------- .. py:class:: ProximityProfile .. py:attribute:: spatial_features :type: list[SpatialFeature] .. py:class:: RelocsCoordinateFilter Filter parameters for filtering get_fixes based on X/Y coordinate ranges or specific coordinate values .. py:attribute:: min_x :type: float :value: -180.0 .. py:attribute:: max_x :type: float :value: 180.0 .. py:attribute:: min_y :type: float :value: -90.0 .. py:attribute:: max_y :type: float :value: 90.0 .. py:attribute:: filter_point_coords :type: list[list[float]] | geopandas.GeoSeries | None :value: None .. py:method:: __post_init__() .. py:class:: RelocsDateRangeFilter Filter parameters for filtering based on a datetime range .. py:attribute:: start :type: datetime.datetime .. py:attribute:: end :type: datetime.datetime .. py:class:: RelocsDistFilter Filter based on the distance between consecutive fixes. Fixes are filtered to the range [min_dist_km, max_dist_km]. .. py:attribute:: min_dist_km :type: float :value: 0.0 .. py:attribute:: max_dist_km :type: float .. py:attribute:: temporal_order :type: str :value: 'ASC' .. py:data:: RelocsFilterType .. py:class:: RelocsSpeedFilter Filter parameters for filtering based on the speed needed to move from one fix to the next .. py:attribute:: max_speed_kmhr :type: float .. py:attribute:: temporal_order :type: str :value: 'ASC' .. py:class:: SpatialFeature A spatial geometry with an associated name and unique ID. Becomes a useful construct in several movdata calculations .. py:attribute:: name :type: str :value: '' .. py:attribute:: unique_id :type: Any .. py:attribute:: geometry :type: Any :value: None .. py:class:: TrajSegFilter Class filtering a set of trajectory segment segments .. py:attribute:: min_length_meters :type: float :value: 0.0 .. py:attribute:: max_length_meters :type: float .. py:attribute:: min_time_secs :type: float :value: 0.0 .. py:attribute:: max_time_secs :type: float .. py:attribute:: min_speed_kmhr :type: float :value: 0.0 .. py:attribute:: max_speed_kmhr :type: float .. py:class:: EcoDataFrame(gdf) `EcoDataFrame` wraps `geopandas.GeoDataFrame` to provide customizations and allow for simpler extension. .. py:attribute:: gdf .. py:method:: from_file(filename, **kwargs) :classmethod: .. py:method:: from_features(features, **kwargs) :classmethod: .. py:method:: reset_filter(inplace=False) .. py:method:: remove_filtered(inplace=False) .. py:class:: StraightTrackProperties(gdf) .. py:attribute:: gdf .. py:property:: start_fixes .. py:property:: end_fixes .. py:property:: inverse_transformation .. py:property:: heading .. py:property:: dist_meters .. py:property:: nsd .. py:property:: timespan_seconds .. py:property:: speed_kmhr .. py:data:: BoundingBox .. py:function:: color_tuple_to_css(color) .. py:function:: create_meshgrid(aoi, in_crs, out_crs = 'EPSG:3857', xlen = 1000, ylen = 1000, return_intersecting_only = True, align_to_existing = None) Create a grid covering `aoi`. :param aoi: The area of interest. :type aoi: shapely.geometry.base.BaseGeometry :param in_crs: 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. :type in_crs: value :param out_crs: 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. Defaults to EPSG:3857 :type out_crs: value :param xlen: The width of a grid cell in units of out_crs :type xlen: int, optional :param ylen: The height of a grid cell in units of out_crs :type ylen: int, optional :param return_intersecting_only: Whether to return only grid cells intersecting with the aoi. :type return_intersecting_only: bool, optional :param align_to_existing: If provided, attempts to align created grid to start of existing grid. Requires a CRS and valid geometry. :type align_to_existing: geopandas.GeoSeries or geopandas.GeoDataFrame, optional :returns: **gs** -- Grid of boxes. CRS is converted to `out_crs`. :rtype: geopandas.GeoSeries .. py:function:: groupby_intervals(df, col, intervals) :param df: Data to group :type df: pd.DataFrame :param col: Name of column to group on :type col: str :param intervals: Intervals to group on :type intervals: pd.IntervalIndex :rtype: pd.core.groupby.DataFrameGroupBy .. py:function:: hex_to_rgba(input)