1

What does gdalserver do and how does it work?

I can't seem to find the documentation explaining how to use it.

1

1 Answer 1

5

Gdalserver creates a proxy for running some processes in isolated space. It is perhaps best documented in https://www.osgeo.cn/gdal/doxygen/gdal_api_proxy.html.

When dealing with some file formats, particularly the drivers relying on third-party (potentially closed-source) libraries, it is difficult to ensure that those third-party libraries will be robust to hostile/corrupted datasource.

The implemented solution is to have a (private) API_PROXY driver that will expose a GDALClientDataset object, which will forward all the GDAL API calls to another process ("server"), where the real driver will be effectively run. This way, if the server aborts due to a fatal error, the calling process will be unaffected and will report a clean error instead of aborting itself.

and later:

For now, the server launched is the gdalserver executable on Windows. On Unix, the default behaviour is to just fork() the current process. It is also possible to launch the gdalserver executable by forcing GDAL_API_PROXY_SERVER=YES. The full filename of the gdalserver executable can also be specified in the GDAL_API_PROXY_SERVER.

1
  • Thank you. I was hoping it was a way to process data on a remote machine.. It seems this isn't the case. I'm not sure why it has port options if it wasn't intended for this purpose Commented Aug 11, 2021 at 17:51

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.