Storing geospatial data
There are many ways to store geospatial data. Depending on your intended use, a filesystem format or a relational database maybe the most appropriate. We will cover an introduction to both.
File formats
There are hundreds of file formats for storing geospatial data. The most common for vector data is ESRI shapefiles. A shapefile actually consists of multiple different files with the .shp
extension for the main file. Most geospatially-aware software and Python packages know to look for the other needed files when given the location of the .shp
file.
GeoJSON is another storage format that is human readable. It uses a defined JSON format to store vector data definitions as text. It is easily readable but can get large in size.
Another way to represent vector data, whether in a file or in code, is using the Well-known text (WKT) and Well-known binary (WKB) formats. WKT is human readable, while WKB is not. WKB offers significant compression in size, so is often a good choice...