[gdal-dev] gdal_merge

Even Rouault even.rouault at spatialys.com
Mon Dec 5 04:33:44 PST 2022


You may need to specify the pixel size with the -ps argument to be the 
one with the less resolution.

Or try using gdalwarp instead (you may also need to use the -tr argument 
to specify the resolution). gdal_merge cannot deal with rasters larger 
than memory.

Le 05/12/2022 à 12:46, Clive Swan a écrit :
> Hi,
>
> The raster one is the world, the second is the UK.
> The UK fits within the first raster...
>
> We want to update UK data in raster one.
>
> Regards,
>
> Clive
>
> Get Outlook for Android <https://aka.ms/AAb9ysg>
> ------------------------------------------------------------------------
> *From:* Rahkonen Jukka <jukka.rahkonen at maanmittauslaitos.fi>
> *Sent:* Monday, December 5, 2022 11:34:53 AM
> *To:* Clive Swan <cliveswan at gmail.com>; gdal-dev at lists.osgeo.org 
> <gdal-dev at lists.osgeo.org>
> *Subject:* Re: [gdal-dev] gdal_merge
>
> Hi,
>
> Maybe your rasters are far apart. Gdal_merge creates a raster with so 
> large extent that all the source images fit within it. Even empty 
> pixels take space.
>
> -Jukka Rahkonen-
>
> *Lähettäjä:* gdal-dev <gdal-dev-bounces at lists.osgeo.org> *Puolesta 
> *Clive Swan
> *Lähetetty:* maanantai 5. joulukuuta 2022 12.24
> *Vastaanottaja:* gdal-dev at lists.osgeo.org
> *Aihe:* [gdal-dev] gdal_merge
>
> Hi Even,
>
> Thanks
> the –configuration sorted out that issue.
>
> CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE is a configuration option /
>
> environment variable, so you have to pass it with --config
>
> CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE YES
>
>
>
> Now I am getting a memory issue?? << The input files are 6.9 GB + 672 MB
> The output should be 7.xx GB
>
> 6.9 GB + 672MB
>
> numpy.core._exceptions._ArrayMemoryError: Unable to allocate 377. GiB 
> for an array with shape (225000, 450000) and data type float32
>
> Any suggestions appreciated
>
> Kind regards,
>
> Clive
>
>
>
> -- 
>
>  Regards,
>
> Clive Swan
>
> --
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20221205/e2d2da31/attachment-0001.htm>


More information about the gdal-dev mailing list