hoping for a bit of help with this question as I've been trying to figure out how to convert a 6.33GB .TIFF file to GeoJson format for a couple of weeks now.
I'm trying convert this data set - http://cidportal.jrc.ec.europa.eu/ftp/jrc-opendata/GHSL/GHS_POP_GLOBE_R2022A/GHS_POP_E2020_GLOBE_R2022A_54009_100/V1-0/ (a data set of the world's population) to GeoJSON format so it can be uploaded to a Mapbox tileset using Mapbox Tiling Service.
I am using the following command in GDAL:
gdal_polygonize.py ghs.tif -f "GeoJSON" myPolygonizedImage.geojson
Output:
Creating output myPolygonizedImage.geojson of format GeoJSON.
0...10...20...30...40...50...60...70..zsh: killed gdal_polygonize.py ghs.tif -f "GeoJSON" myPolygonizedImage.geojson
It runs for ~3-5 hours and creates an output file of about 110GB before it crashes shortly after 70%. I've tried running it multiple times and it always crashes at the same point. My first thought was memory and it certainly uses a lot but it always seems to keep ~2GB of memory free.
I'm not married to gdal to convert it but that seems to be the best option for a file of this size. Any advice would be greatly appreciated! Thanks!