The Importance of Where: Using Spatial Data with Your Database Applications

Spatial data is often synonymous with maps. Data regarding specific real world locations was only being used in map-type applications. However in the modern day and age, spatial data is now much more pervasive among web and mobile apps. Web applications use spatial data to provide contextualized results to their users, allowing for more accurate and personalized suggestions to be made. Some common examples include finding the nearest gas station, autoselecting your nearest store, and providing news and events that are local to you. 

Mobile apps use spatial data to dynamically provide updates based on your location that can streamline user flow and reduce the number of touches. Mobile ordering apps can dynamically track you to ensure your order is started and finished at the optimal time. Gaming and social media apps use spatial data to provide location-specific features for game items or nearby events (Pokemon GO is a great example). The development of new use cases and growing adoption has driven innovation and conversely exposed some areas of improvement.

A Sample Spatial Database. Xuan Zhu. GIS and Urban Mining 

Spatial Image Trends 

While many spatial data trends big and small have emerged in 2020, three stand out: the emergence of data analysis tools, smaller sensors, and the movement to cloud. 

Big Data Tools

For the longest time, spatial data sets were small enough that using simple SQL commands was enough to analyze the data. However, the emergence of data science and machine learning has made the cost of acquiring and managing a big data set not only justifiable but profitable. But those big data sets could no longer be efficiently monitored and analyzed. Extensions for Hadoop, Spark and other big data stacks have been developed, and stand-alone software offerings from Google and AWS have been released to address this need. 

Sensor Evolution 

Smaller sensors that collect spatial info have also been important to collecting that data in more places. What began with the smartphone revolution, where phones were compact enough and powerful enough to collect this type of data, finally flourished in the IoT space, where sensors like Tile and devices like your Amazon Echo are now powerful enough to send the same data. This trend will only continue and lead to more data being collected in more places for lower costs. 

Cloud Migration 

The cloud revolutionized spatial data usage in the same way it revolutionized every other area of computing. It democratized use so that everyone from solo developers, to SMBs, to big Fortune 500 companies could efficiently use the data and provide value for consumers. 

CockroachDB Spatial Data

Challenges in Spatial Data

However much innovation the rapid growth of spatial data has provided, it has also exposed some major flaws. New use cases for spatial data have rapidly evolved, but the underlying infrastructure has remained largely untouched, hindering scale and limiting support for large datasets. Existing extensions like PostGIS and databases like Oracle Spatial are either exceedingly slow or not optimized for using modern software tools like Elasticsearch. The fact that most of these solutions are retrofits on existing platforms leads to arbitrary and sometimes crippling limitations surrounding file size, parsing limitations, and outdated runtimes. 

Companies like CockroachDB are creating new solutions for handling spatial data. In CockroachDB’s latest 20.02 release, support for spatial data was enabled. Coupled with their cloud native approach focused on Kubernetes and other high-availability features, anyone can use spatial data in a scalable, efficient, and responsive manner.


Spatial data is on the rise and growing in maturity. With time these problems will be solved. A lot of the existing tooling that we take for granted, like open source visualization software, or a seamless flow from collection to storage of data, simply hasn’t matured in comparison with other sectors.  Those things will come in time. By enabling developers to use this type of data, we are simply incentivizing them to use it and develop the auxiliary applications we need. The time for spatial data is now and we are just waiting on the horizon. 

To learn more, check out a demo of CockroachDB’s scalable data operations. 



Ashvin Nihalani

San Francisco, CA
Education: B. Eng, EECS, University of California

Originally from Texas. Graduated from Berkeley with an B.Eng in EECS. Interested in basically anything, well anything interesting. More recently focused on Machine Learning, Blockchain, and Embedded Systems.

Software Daily

Software Daily

Subscribe to Software Daily, a curated newsletter featuring the best and newest from the software engineering community.