Skip to content

OSM data downloads zip file in GeoFlo codebase #14

@soheir96

Description

@soheir96

Need tomake change to osm.download.py file --> change the filename to include the destination path. Perhaps also delete the zip file once unzipped.

    # Download the specified file if it exists
    if filename in zip_files:
        download_url = url + filename
        with requests.get(download_url, stream=True) as r:
            r.raise_for_status()
            #TODO change filename to include appropriate path
            with open(filename, 'wb') as f:
                for chunk in r.iter_content(chunk_size=8192):
                    f.write(chunk)
        print(f"Downloaded {filename}")
        return filename
    else:
        raise FileNotFoundError(f"{filename} not found.")

Below image shows the zip file downloaded to the wrong location

Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions