Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File size #3

Open
zelaomauricio opened this issue May 19, 2022 · 5 comments
Open

File size #3

zelaomauricio opened this issue May 19, 2022 · 5 comments

Comments

@zelaomauricio
Copy link

I downloaded the file (Brazil) and tried to open the file in Qgis, I tried to split the file and it was not possible because of the size (19gb). Does anyone have a solution?

@andreiste
Copy link

andreiste commented May 19, 2022

You could use ogr2ogr, FME or ArcGIS Data Interoperability to transform the geojson file in another format that uses spatial indexes. I used ArcGIS Data Interoperability to export the data into a file geodatabase and it worked.

@rbrundritt
Copy link
Member

Similar to #2 the file is massive (19GB when compressed), no desktop app is going to easily load that. Loading this into a database and querying a subset or converting that data into an optimized format for visualization (i.e. map tiles) are the common approach in this situation. The file uses geojsonl format note the "l". This is an optimized geojson file format for large datasets. Each feature is on a single line and there is only one feature per line. As such, you can read the file as a stream, line by line, a common approach for reading large text files.

@gtdca98
Copy link

gtdca98 commented May 20, 2022

@giswqs
Copy link

giswqs commented Jun 2, 2022

@gtdca98 Thanks for sharing the split command. I modified it a little to split the file into equal size chunks and keep the file extension.

split -l 100000 country.geojsonl country_ --additional-suffix=.geojsonl

@andwoi
Copy link
Contributor

andwoi commented Jul 14, 2022

We've also added a python script to show how this can be accomplished: https://github.com/microsoft/GlobalMLBuildingFootprints/blob/main/scripts/read-large-files.py

with some additional logic, one can produce spatial partitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants