My raster size is more than 6 Gb. It was created from SRTM tiles, so I wasn't even able to save it as TIFF, hence I used vrt format. Now I want to translate it to .map, so I use:

warpopt = gdal.WarpOptions(xRes=90,yRes=90)
dem_resampled = gdal.Warp('dem_resampled.tif'),dem_input,options=warpopt)
optt = gdal.TranslateOptions(format='PCRaster',bandList=[1],outputType=gdalconst.GDT_Float32,metadataOptions='VS_SCALAR')

I get an error ValueError: Received a NULL pointer. as file isn't generated. If I skip resampling, I get a .map file, but with zeros.

  1. Why is the TIFF not created?
  2. Maybe I can skip resampling and create a .map file directly from .vrt?

UPD: I am definitely sorry. Mounted folder was unmounted and GDAL has a strange behavior, it doed not throw an error if a path is unavailable, but it writes None as object. I delete this theme.

  • 1
    I would first skip Python for avoiding possible errors in self written code and test with GDAL binaries. gdal_translate -of PCRaster input.vrt output.map". Add --debug on` if you get errors and want to get more information. And tiff supports much larger than 4 GB file size if it is created as BigTIFF. But using vrt is usually a more clever alternative. However, I do not see vrt input in your lines of code.
    – user30184
    Jan 11, 2023 at 11:13
  • 1
    you should maybe delete your post if it was a mounting issue
    – radouxju
    Jan 12, 2023 at 14:09
  • 1
    You can make GDAL raise exceptions rather than fail silently by using gdal.UseExceptions().
    – Jose
    Jan 12, 2023 at 15:51

1 Answer 1


It was a mounted folder which was unmounted. So, such problems as Jose said, could be avoided by gdal.UseExceptions() code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.