A lot goes on in the backend of a Web GIS application. In the backend, most of the manipulation and querying of data takes place. Therefore, it is crucial that one chooses the backend wisely. Python programing language is mostly used for the backend of a web GIS application. The main reason is because Python is the most popular in the geospatial community therefore many powerful geospatial libraries such as GeoPandas, Shapely, PyProj and not forgetting GDAL, are made available in Python. Hence, building the backend of a web GIS application will enable one to use these libraries for their backend. This article will outline the different frameworks to use for the backend. Also make sure to read until the end for a bonus!
The most popular framework used for the backend of Geospatial web applications is Django. It is widely used because it is available in python hence there is much community support available. Django also allows one to integrate the aforementioned geospatial libraries (GeoPandas, Shapely, PyProj and GDAL. GeoDjango is a module in Django.
It lets one support different geospatial databases such as PostGIS and GeoServer, store geospatial data types, perform geospatial queries, create geospatial lookups, serialize GeoJSON objects, create geospatial forms and have a geospatial enabled admin panel. GeoDjango also comes integrated with GEOS and GDAL API. GeoDjango also comes with an add-on called the Django REST Framework. This framework lets one create APIs that enable sending of data as GeoJSON format that is widely used and can be fed into all mapping libraries.
This is an open source server for sharing geo-information and geodata. Geodata can be published from any major spatial source of data due to its interoperability using open standards. Geoserver runs on the Apache TomCat and is built in Java.
One can publish their geodata in form of web services such as WMS without the need to write code which is made possible by its user interface. It comes in handy since it can support both vector and raster data.
Node JS systems are easy to use and follow with features that are less complicated. It’s designed to build robust and highly scalable applications, capable of handling numerous requests. Its libraries are widely available and has a wide and active community.
Another popular framework for backend web GIS development is GeoNode. It is an opensource framework designed to build spatial data infrastructure nodes and geospatial content management systems.
GeoNode has a number of pros, one being that it has a powerful authorization/authentication mechanism. Secondly, it has a vast interoperability with the use of Open Geospatial Consortium standards and lastly it offers a wide range of user friendly capabilities.
Flask is a micro framework written in python for development of backend. It is considered a micro framework because it does not require external tools or libraries.
Advantages of using Flask include:
- It is highly scalable for when building simple applications
- It is highly compatible with the latest technologies
- Builds applications that are easily developed and maintained
- Relatively small codebase size hence easier to learn
We all know that geospatial data needs to be stored in a geospatial database such as PostGIS, MongoDB, MySQL Spatial and Oracle Spatial. From the list, PostGIS is the most preferred, which is an extension of PostgreSQL. It supports more Geospatial operations and functions as compared to its competitors.