Database

Databases are useful for hosting live data which may be mutable over time or even for data that may simply be too large to store on client devices. These may also be used to perform computation that may not be feasible with off the shelf GIS solutions. Some of the following database solutions come with robust spatial query support. One may be more advanced than another and there are various factors that you'd want to consider before selecting a database for your application.

PostgreSQL + PostGis

PostgreSQL is an open-source relational database management system that can provide vast geospatial functionalities via PostGis. "PostGIS is a spatial database extender for PostgreSQL object-relational database. It adds support for geographic objects allowing location queries to be run in SQL." - PostGIS

MongoDB

MongoDB offers schema-less or flexible schema storage that is designed to work seamlessly with JSON (and GeoJSON) data. MongoDB also natively support spatial indexing of features and provides some basic set of spatial queries that can be useful for your GIS application. Read more on Geospatial Queries in Mongodb here: https://docs.mongodb.com/manual/geospatial-queries

Redis

Redis is an in-memory key-value datastore. You can use Redis if your application demands expensive amounts of IO operations. Redis is magnitudes faster for calculations and caching. See the list of all available commands here: https://redis.io/commands

What to use?

Depending upon the kind of usage of your application, a NoSQL database can completely replace your PostgreSQL needs or can be used in tandem with PostgreSQL to reduce the querying load. Here are some additional references:

Additional References

  1. Multithreaded Spatial Join with Node.js and MongoDB_. _Multi-threaded Spatial Join algorithm for spatially indexed data in MongoDB, https://github.com/UrbanSystemsLab/spatial-join-mongodb
  2. Build an interactive map with Node.js, PostGIS and Redis - Patrick Triest. Building a Node.js API to serve geospatial data from PostgreSQL (with the PostGIS extension) and Redis., https://blog.patricktriest.com/game-of-thrones-map-node-postgres-redis/

results matching ""

    No results matching ""