I use the wonderful sf package to load to my .geojson files. I have one particularly large files (250MB) that is giving my problems due to the size limit set by GDAL when using the GEOJSON driver, as documented here. To read my file, I have to increase the OGR_GEOJSON_MAX_OBJ_SIZE "configuration option" from the default 200MB to at least 251MB.
Is there a way to set this option through an R package (such as sf)? st_read has an argument that lets you specify so-called "Open options" and it would be nice to be able to do this for "configuration options". I don't really understand what's going on under the hood when reading .geojsonfiles with st_readbut my understanding is that it uses GDAL which in turn uses the GEOJSON driver to read the file. So a possibility is to change the option directly in GDAL as documented here. This, however, leads me to another question: where can I find the GDAL installation and how to interact with it? I am assuming it was installed when I installed the sfpackage.
In short I need a way to set the option to read larger .geojson files in my script so that it is reproducible.
Any help is appreciated!