windwhisper.plotting ==================== .. py:module:: windwhisper.plotting Attributes ---------- .. autoapisummary:: windwhisper.plotting.color_map Functions --------- .. autoapisummary:: windwhisper.plotting.generate_contours windwhisper.plotting.add_legend windwhisper.plotting.rotate_coordinates windwhisper.plotting.generate_map windwhisper.plotting.create_geojson Module Contents --------------- .. py:data:: color_map .. py:function:: generate_contours(data, levels, name='Noise Contours') Generate contour polygons and wrap them into a Folium layer. :param data: Raster to contour. :type data: xarray.DataArray :param levels: Contour levels in dB. :type levels: list[int] :param name: Name of the resulting Folium layer. :type name: str :returns: Folium feature group containing contour polylines. :rtype: folium.FeatureGroup .. py:function:: add_legend(map_object) Append a categorical legend to a Folium map. :param map_object: Folium map receiving the legend. :type map_object: folium.Map :returns: The modified map object. :rtype: folium.Map .. py:function:: rotate_coordinates(coords, angle, center) Rotate coordinates around a centroid. :param coords: Sequence of ``(latitude, longitude)`` pairs. :type coords: list[tuple[float, float]] :param angle: Rotation angle in degrees. :type angle: float :param center: Rotation centre expressed as ``(latitude, longitude)``. :type center: tuple[float, float] :returns: Rotated coordinates as ``(latitude, longitude)`` pairs. :rtype: list[tuple[float, float]] .. py:function:: generate_map(noise_dataset, filepath='noise_map.html') Export contour overlays for the provided noise dataset. :param noise_dataset: Dataset containing combined noise layers. :type noise_dataset: xarray.Dataset :param filepath: Destination filepath for the generated HTML map. :type filepath: str :returns: Generated Folium map instance. :rtype: folium.Map .. py:function:: create_geojson(data) Generate a GeoJSON feature collection of contour polylines. :param data: Raster to contour. :type data: xarray.DataArray :returns: GeoJSON feature collection describing the contour lines. :rtype: geojson.FeatureCollection