Here are the commands that can be used to split a large geojsonl file into smaller chunks and convert them to shapefile using Linux and GDAL. Here is the video tutorial: https://youtu.be/Mu9QBvze7wY
split -l 100000 country.geojsonl country_ --additional-suffix=.geojsonl
for filename in ./*.geojsonl; do mkdir -p shapefiles; ogr2ogr -f "ESRI Shapefile" "./shapefiles/${filename/geojsonl/shp}" "$filename";done
There's a bit but important comment about ypur idea.
polygon's building-footprints are delivered spatially dispersed ...
your code produce building-footprints spatially dispersed along the geo-area reffered.
Here are the commands that can be used to split a large geojsonl file into smaller chunks and convert them to shapefile using Linux and GDAL. Here is the video tutorial: https://youtu.be/Mu9QBvze7wY