Home Β» Howto & Style Β» How to split a large geojsonl into smaller chunks and convert to shapefile with only one command

How to split a large geojsonl into smaller chunks and convert to shapefile with only one command

Written By Open Geospatial Solutions on Thursday, Jun 02, 2022 | 10:26 AM

 
Microsoft Global Building Footprints: https://github.com/microsoft/GlobalMLBuildingFootprints Commands: split -l 100000 country.geojsonl country_ --additional-suffix=.geojsonl ogr2ogr -f "ESRI Shapefile" country_aa.shp country_aa.geojsonl for filename in ./*.geojsonl; do mkdir -p shapefiles; ogr2ogr -f "ESRI Shapefile" "./shapefiles/${filename/geojsonl/shp}" "$filename";done leafmap homepage: https://leafmap.org geemap homepage: https://geemap.org GitHub: https://github.com/giswqs/geemap Twitter: https://twitter.com/giswqs YouTube channel: https://www.youtube.com/c/QiushengWu GEE Tutorials Playlist: https://gishub.org/youtube-gee Leafmap Tutorials Playlist: https://gishub.org/youtube-leafmap Geographic Software Design Playlist: https://gishub.org/gsd Spatial Data Management Playlist: https://gishub.org/sdm