Why Your Web Maps Need Proximity Analysis and Spatial Queries

Why Your Web Maps Need Proximity Analysis and Spatial Queries

As we discussed in previous articles on search and queries, your users don’t need a map; what they need is the answer to a question and in some cases a map is the easiest way to discover and see patterns in that answer.

Often the questions are simple. Questions like:

"Where can I view the land records for 41 Main Street?" (search)

"Which zip codes had more than 100 sales in 2016?" (query)

But often in the world of GIS, the questions are far more complex and involve the relationship between more than one dataset.

Questions such as:

  • Which properties in Bakersfield are within 500 meters of the 2017 flood area? (Buffer)
  • Which zip codes are contained within the metro sales territory?

The questions often can’t be answered with a simple search or attribute query as the answer can only be found by comparing the location of features in one layer (e.g. properties) compared to a feature(s) in another layer (e.g. flood area).

In GIS we call this a spatial query.

Spatial Queries Don’t Need to Be Complicated

Analyzing the spatial relationship of features contained in two different layers is inherently complicated, and it’s our job as web map designers to remove or at the very least mitigate that complexity.

 

This level of complexity is too much for most map users

This level of complexity is too much for most map users

 

As with the query tool the best approach to this problem is to make the spatial query tool laser focused. That means designing it to be a scalpel that’s very good at solving a very specific problem, rather than a Swiss Army Knife that is trying to cater for a whole range of problems.

Have lots of problems? In that case the route to simplicity is to make lots of maps, with each map focused on tackling just one of the problems.

 

How to make spatial queries simple

 

How to Make Spatial Queries Simple

The first step to simplicity, as we’ve already covered, is to make the tool laser focused. The second secret is to use what in the programming world we call a DSL.

DSL stands for "Domain Specific Language", the idea is to make the query (or code when programming) read like natural human speech. This allows users to understand the query without requiring any knowledge of the syntax, and in turn easily make their own queries by making coherent sentences.

Let me give you an example. A common syntax for performing database queries is called SQL, it has some characteristics of a domain specific language which makes it somewhat readable to people unfamiliar with SQL, but is abstract enough to make it highly unlikely someone could write it without prior experience.

Here’s an example of an SQL query. Can you guess what it does?

SELECT properties WHERE value > 1000000 AND status == ’sold’

If you thought it meant, "Get all the properties with a value greater than one million and the status is sold", then you would be correct.

This is a simple query, but as you can imagine the syntax when performing a query such as "Show me all of the properties with a value of more than one million and are located within one mile of a high school" the SQL syntax starts to become extremely complex.

Therefore, we need an easier way to write syntax (DSL) that’s so simple that anyone can build a query without any up front training.

How Mango Does It

At Mango we spent a lot of time thinking about this problem and finally came up with a design that passed tests we performed on real life users.

Here’s what it looks like:

 

How Mango does it: simple spatial query

 

As you can see the query interface is a domain specific language and the query can be read like a sentence. In this case the sentence says:

"Find firehouses that are closer than 1 mile from the selected building"

Then the user is presented some tools in order to select the building of interest. They can choose from:

  • All properties
  • All properties within a box they draw
  • All properties within a circle they draw
  • All properties within a shape they draw
  • All properties they select using point and click

This solution is simple yet elegant. The only language the user needs to understand is English, and better yet using the Mango interface translation tool, these words can be translated into any language!

The results are equally as simple, with each result highlighted on the map and the user given the options to view the results as a table, download them as a spreadsheet or view a report containing aggregate data.

 

How Mango does it: simple spatial query results

 

The tool isn’t as comprehensive as a desktop GIS spatial query tool, but that’s not the objective. The objective is to create a tool that anyone can figure out how to use, whilst still delivering value and insight.

Try it for yourself using the map below:

 

 

Configuring Your Proximity Analysis Tool Using Mango

Setting up your proximity analysis tool in Mango is very simple. All you need is a Mango account and a web browser, then everything can be setup with just a few click.

As with all Mango features what you won’t needs is:

  • Any programming skills
  • A server
  • Expensive software licenses

 

Want to check out the Mango proximity analysis tool and try building your own map?

Why not sign-up for a free 30-day trial and take it for a free test drive. You’ll be amazed at how simple it is.

Share this!
Chris Brown is the founder and CEO of Mango (simple online web GIS for everyone).

Proximity Search Done Right.