Skip to content

Possible threading conflict / non-reentrancy #18

@mrd

Description

@mrd

gdal.Warp('/vsimem/reprojected.tif', dsm_raster_file, srcSRS=f"EPSG:{dsm_crs}", dstSRS=f"EPSG:{epsg}")

The reference to /vsimem/reprojected.tif appears to act like a temporary file on some sort of RAM disk provided by GDAL. One issue might crop up if a user of this library runs this function more than once from different threads in the same process: they would conflict over usage of this virtual file. According to the docs, it is possible for multiple threads to access the same virtual file through GDAL, and coordination is the responsibility of the programmer. So you may want to use generated file names (and ensure clean-up with a finally clause, which is another bug that is not yet resolved).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions