What is PostGIS?

PostGIS is an Open Geospatial Consortium (OGC) compliant software used as an extender for PostgreSQL, which is a form of object-relational database. While PostGIS is free and open source, it is used in both commercial (e.g., ArcGIS) and open source software (e.g., QGIS). PostGIS extends capabilities of PostgreSQL to increase its management capabilities by adding geospatial types and functions to enhance spatial data handled within a relational database structure. The language of PostGIS is similar to SQL and allows spatial analysis and typical queries to be performed on spatial data with relative ease. This makes it a relatively powerful backend for databases within larger software, helping projects to use SQL-like functionality to do more complex spatial analysis and query.[1]

Advantages for PostGIS is it is relatively easy to manage and use, compared to typical data storage on GIS software, as often the data are within one database structure.[2] In addition to making it easier for spatial-based queries, data can also be accessed much easier using third party software or other programs, including web server functionality. This is because it uses standard simple feature formatting that allows other types of spatial software to potentially use the same stored data.[3] Another benefit is that analysis across software using the same stored data is relatively easier as well. For users that are use to using SQL, the most common type of database query language, PostGIS is relatively easy to use, as it use the same approach to conduct its queries. Analytical and processing functions can also be carried out within PostGIS for raster and vector data, allowing easy generation of maps that have the desired analytical result. Typical Esri vector formats such as shapefiles and raster types such as GeoTiffs are often handled, although users have a range of formats in which they can store their data.

PostGIS logo.

While PostGIS has enabled various projects to benefit from its powerful backend, there is debate if using PostGIS is the best approach to different spatial problems. Recent NoSQL methods, that often utilize a more object-oriented style in structuring data or allow users to create their own storage structure, have been demonstrated to be potentially faster in data retrieval for more complex queries such as simultaneous multiple-user queries.[4] The relational model that PostGIS uses may not always retrieve complex queries as fast based on how data is stored and accessed, while more flexible approaches, where GIS users can construct their own format for data storage, may prove faster. Other have also found that PostGIS may not always scale as well to larger spatial database problems, while NoSQL may be easier to distribute or scale more easily across multiple computers. This could be particularly important for web servers that have large spatial data storage needs.[5]

To circumvent the potential limitations and preferences of users, open source software such as QGIS have now integrated plugins for both types of database approaches. Popular tools such as MongoDB, which is a NoSQL approach, is an example database type that is now also used also with PostGIS. To a large extent, the use of different NoSQL vs. PostGIS (or SQL) approaches is still largely a form of preference, as these two types of approaches have different forms of retrieval queries and the query formats are different. Users generally become more comfortable with one approach, where the limitations of the software may not be a major issue for the major of work done. For most users, there will often be negligible differences between the two approaches in terms of performance.

References 

[1] For more on PostGIS and software used, see: http://postgis.net/documentation/ and Mikiewicz, D., Mackiewicz, M. & Nycz, T. (2017) Mastering PostGIS: create, deliver, and consume spatial data using PostGIS. [Online]. Available from: http://proquest.safaribooksonline.com/?fpi=9781784391645 [Accessed: 26 September 2017].

[2] For more on data usage and ease for PostGIS, see:  Lijing Zhang & Jing Yi (2010) Management methods of spatial data based on PostGIS. In: [Online]. August 2010 IEEE. pp. 410–413. Available from: doi:10.1109/PACCS.2010.5626962 [Accessed: 26 September 2017].

[3] For more on PostGIS advantages, see:  Marquez, A. (2015) PostGIS essentials: Learn how to build powerful spatial database solutions with PostGIS quickly and efficiently. Community experience distilled. Birmingham, Packt Publishing.

[4] For more on the use of NoSQL and PostGIS, see:  Agarwal, S. & Rajan, K.S. (2016) Performance analysis of MongoDB versus PostGIS/PostGreSQL databases for line intersection and point containment spatial queries. Spatial Information Research. [Online] 24 (6), 671–677.

[5] For more on scalability of database approaches, see:  Pokorny, J. (2013) NoSQL databases: a step to database scalability in web environment. International Journal of Web Information Systems. [Online] 9 (1), 69–82. Available from: doi:10.1108/17440081311316398.



Advertising


Like this article and want more?

Enter your email to receive the weekly GIS Lounge newsletter:

Advertising