Skip to content

Download_Routing_Product_From_Points_Or_LatLon fails when routing product is zipped (missing unzip step) #26

@fuadyassin

Description

@fuadyassin

Description

Download_Routing_Product_From_Points_Or_LatLon() downloads the correct NALRP drainage region,
but then fails with a DataSourceError because the routing product is still zipped.

The function immediately attempts to read:
catchment_without_merging_lakes_<version>.shp,
which does not exist until the downloaded zip files are manually extracted.

This makes the function fail unless the user manually unzips the routing product,
which appears to be an unintended missing step in the workflow.

Expected behavior

After downloading a routing product (by gauge or by lat/lon),
the function should either:

  • automatically unzip all downloaded zip files, or
  • be able to read routing layers directly from the zip archive.

Actual behavior

The function throws:
DataSourceError: catchment_without_merging_lakes_<version>.shp: No such file or directory

because the routing product is still zipped.

Steps to reproduce

Lat = [46.91333803740]
Lon = [-70.85562382300]

subid, product_path = Download_Routing_Product_From_Points_Or_LatLon(
    product_name="NALRP",
    Lat=Lat,
    Lon=Lon
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions