ENCN205 — Lecture 05: Spatial Relationships

Interactive Demo: Spatial Query Explorer — New Brighton, Christchurch
~10 min activity
Loading 41,000 buildings and pre-computing distances…

Spatial Query Explorer

Apply buffer queries and spatial predicates to explore relationships between layers

Buildings near marae: —
Buildings match: —
Roads match: —

Marae Buffer Distance

No buffer
0200m500m1km2km
Marae locations are approximate (rounded for data sovereignty) — buffer counts are indicative only. Of the five marae shown, only Ngā Hau E Whā lies inside the New Brighton study area, so it drives nearly all the counts.

Spatial Predicate (features vs marae buffer)

Select a spatial predicate above to highlight matching features.

Map Layers

Spatial predicates describe how two geometries relate: intersects (any overlap), within (one inside another), contains (inverse of within), disjoint (no shared space). These are the building blocks of all GIS analysis.

Guided Questions

Q1

Set the marae buffer to 200m. How many buildings fall within this buffer? Now try 1km. How does the buffer operation transform a point geometry (marae) into an area you can query against?

Q2

Set the buffer to 500m and switch between Intersects and Within. Why do far more roads match Intersects than Within, while for buildings the two counts are almost identical? What does this tell you about feature size relative to the query geometry?

Q3

What is the difference between Euclidean distance and network distance? Give an example where using Euclidean distance would significantly underestimate actual travel distance in this area.

Q4

Select Contains — the count is always 0. Explain why, and give an example of two layers in this map where contains would return matches. What does this tell you about predicate direction?

Q5

The Coastline layer is a line, not an area. Why is "which buildings are within the coastline?" a question you cannot answer as posed, and what would you have to build first to make it valid? Which of the four predicates above still mean something against a line geometry, and which are meaningless?