-
Notifications
You must be signed in to change notification settings - Fork 38
General notes on data formats
The SST has been developed to work with all vector data formats available in QGIS. It can use as input any vector layer loaded in the layers panel, and supports writing to the native data formats of QGIS, namely shape files, spatialite personal geodatabases, PostGIS databases, and memory layers. Each of these data formats has features that might be more appropriate for different users, and the SST takes advantage of each format’s unique characteristics to optimise performance in various operations. Every user should become familiar with the pros and cons of each data format, and choose the most suitable for their project.
Shape file is the most common file based GIS format. It consists of a collection of files, storing the geometry, attribute data, metadata, coordinate system, spatial index, etc. A lot of existing data sets are distributed and shared in this format.
This is the easiest data format to use if you are just starting with GIS. But see further recommendations below.
- Pros: uses the standard file and folder approach for storage that every user is familiar with.
- Cons: easy to lose components of the “file” when moving things around; limited to 10 characters in attribute names; limited to 2GB in the dbf (attributes) file; leads to huge folders with many files; depends fully on the QGIS API for querying and analysis.
- For more info: https://en.wikipedia.org/wiki/Shapefile
Spatialite is a spatial extension to the SQLite personal database, i.e. a self-contained database in a single file on disk. The Spatialite drivers are installed with QGIS and it supports it natively. Has similar functionality to PostGIS, with embedded SQL, many spatial analysis functions and spatial indices. The toolkit makes use of these embedded functions whenever possible.
This format is highly recommended if your map is large (more than 10,000 lines). All functions will be much faster than with Shape files.
- Pros: all the data is stored in a single file, the easiest to store, backup and share; the embedded SQL and functions allow powerful data queries and analysis; the embedded functions are many times faster than QGIS equivalents; has no restrictions to table and attribute names.
- Cons: requires some familiarity with database principles to manage the stored information, although QGIS offers user-friendly data manager interfaces; the database can quickly grow to have many tables; the SQLite SQL standard has some limitations; only supports vector data.
- For more info: https://en.wikipedia.org/wiki/SpatiaLite
PostGIS is a spatial extension to PostgreSQL, the most robust and powerful open source relational database system. It is a server-based system, widely used in enterprise and web scenarios, allowing remote and concurrent access by multiple users. It can also be installed locally for personal use.
This format is highly recommended if your data is very large (more than 100,000 lines). All functions will be much faster than with Shape files. If you also have many different large data sets, it will be easier to manage the information.
- Pros: no data size limit; full SQL support; rich analysis functions; extremely fast operations; supports vector and raster data; has “schemes” that help keep the database organised; possible to have multiple users collaborating on same database.
- Cons: requires installation of server and/or client platform; for personal use it requires knowledge of database systems and management; data sharing easiest using shape files, when others don’t have access to the server.
- For more info: https://en.wikipedia.org/wiki/PostGIS
Memory layers are temporary vector data layers that are not saved on disk, nor saved with the project, and the data disappears once the QGIS session is closed. They can be used to dump analysis results or can be created by the user to store draft information. Their contents can be saved to any permanent vector data format by the user.
- Pros: no need to specify a data store or save path; keep information if something goes wrong.
- Cons: very volatile and data disappears when you close QGIS; must be saved as soon as possible into another data format; does not allow adding or removing attributes.
- For more info: http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html#memory-provider
Several other vector data formats can be loaded as QGIS layers, and used by the SST, for example MapInfo TAB and MIF, or AutoCAD DXF and DWG. However, none of these formats are editable, therefore they can only be visualised, or used as input for a new layer in one of the previously listed native data formats.