I’m trying to improve my use of GDAL for creating and sending images to an OpenLayers map, but I have some memory issues. Here is the thing :
1. JS send a query to server with map parameters (bbox, etc)
2. Server creates GDAL commands (PHP exec(…)) with gdal_grid, then gdalwarp and gdaldem ending up to a PNG on the /img server
3. Server sends Json response with the url of the new image
4. OL Map refresh an ol.Layer.Image with this new URL parameters
This isn’t the best option for memory matters, even if temp TIFF and final PNG files aren’t so heavy. On ol3 forum, I was advised to use GDAL In Memory Rasters as output (instead of -of PNG).
But I can’t figure out what and how to send final image to the client. Without storing it on the server side, of course.
Do you have any ideas how to deal with this? Thanks for the tips !