phidown.viz

Attributes

parser

Functions

_coverage_to_color(→ str)

Map coverage percentage (0-100) to a red-yellow-green color.

plot_kml_coordinates(kml_file[, output_html])

Extract coordinates from a KML file and plot them on a Folium map.

_parse_wkt_polygon(→ List[List[float]])

Parse POLYGON WKT into Folium coordinates: [[lat, lon], ...].

_normalize_footprint(→ Optional[Dict[str, Any]])

Normalize footprint values to GeoJSON dict.

_geojson_coordinate_pairs(→ List[Tuple[float, float]])

Flatten GeoJSON coordinates into (lon, lat) pairs.

plot_product_footprints(df[, aoi_wkt, top_n, ...])

Plot AOI and product footprints from a search DataFrame using Folium.

Module Contents

phidown.viz._coverage_to_color(value: float | None) → str[source]

Map coverage percentage (0-100) to a red-yellow-green color.

phidown.viz.plot_kml_coordinates(kml_file: str, output_html: str = 'map_overlay.html')[source]

Extract coordinates from a KML file and plot them on a Folium map.

Parameters:
  • kml_file – Path to the KML file.

  • output_html – Path to save the generated HTML map.

phidown.viz._parse_wkt_polygon(aoi_wkt: str) → List[List[float]][source]

Parse POLYGON WKT into Folium coordinates: [[lat, lon], …].

phidown.viz._normalize_footprint(value: Any) → Dict[str, Any] | None[source]

Normalize footprint values to GeoJSON dict.

Supports: - GeoJSON dict - JSON string of GeoJSON - Python-literal string of dict - WKT POLYGON string - geography’SRID=4326;POLYGON(…)’

phidown.viz._geojson_coordinate_pairs(geojson: Dict[str, Any]) → List[Tuple[float, float]][source]

Flatten GeoJSON coordinates into (lon, lat) pairs.

phidown.viz.plot_product_footprints(df, aoi_wkt: str | None = None, top_n: int = 100, footprint_col: str | None = None, name_col: str = 'Name', id_col: str = 'Id', coverage_col: str = 'coverage', zoom_start: int = 9, add_layer_control: bool = True, group_by: str | None = 'swath')[source]

Plot AOI and product footprints from a search DataFrame using Folium.

Parameters:
  • df – Search results DataFrame (SLC or burst).

  • aoi_wkt – AOI WKT polygon to overlay.

  • top_n – Number of products to render.

  • footprint_col – Explicit footprint column (auto-detected if None).

  • name_col – Product name column for tooltip.

  • id_col – Product ID column fallback for tooltip.

  • coverage_col – Coverage column used to sort products before plotting.

  • zoom_start – Initial map zoom level.

  • add_layer_control – Add Folium layer controls for toggling overlays.

  • group_by – Optional grouping layer for products (‘swath’, ‘burst’, ‘product’, or None).

Returns:

folium.Map

phidown.viz.parser[source]