Spatial analysis: specify the join and the coordinate frame
A map overlay is a question about geometry, predicates and the meaning of a match. Two plausible predicates can produce different row counts without either computation being broken. This route pairs spatial reasoning with explicit coordinate units and a policy for boundary ownership before interpreting a joined table.
Course topic: GIS, Cartography and Spatial Analysis
Study route and exercise: University Reading List editorial project. How we curate · Sources checked:
On this page
Scope and responsibility
For learners with basic tables, Python reading, coordinates and descriptive statistics. Longley can supply GIScience foundations; the free Python book explicitly is not a first Python or GIS course; O’Sullivan/Unwin assumes more statistical preparation. The original geometries are exact fictional local Cartesian objects, not real locations, Earth projections or a spatial population study.
Choose your starting point
I know basic GIS and coding
Use the free Geographic Data Science with Python for spatial representation, weights and analysis. Work through one named concept with a small invented geometry before using a large dataset.
I need the representation and georeferencing foundations
Use Longley and colleagues to ask what the objects, coordinates and uncertainty mean before a software operation.
I need to justify analytical assumptions
Use O’Sullivan and Unwin after introductory GIS and statistics. Distinguish a spatial pattern, its model and an inference rather than treating a map as a test.
Compare the three books
Geographic Data Science with Python
Sergio J. Rey; Dani Arribas-Bel; Levi J. Wolf · Edition: 1 · 2023
Free computational-analysis spine
- Choose it when
- You can read Python/data tables and want spatial thinking alongside reproducible analysis.
- Use another route when
- You still need your first Python course, a GIS starter or a complete treatment of every spatial model.
- Selected reading
- Read the named Spatial Data, Spatial Weights and Choropleth Mapping topics before autocorrelation. The evolving web contents and 2023 print chapter numbers differ.
- Limits and trade-offs
- The authors’ complete web reading route complements the 2023 print edition ISBN 9781032445953. It is not a promise that old notebook dependencies run unchanged or that every dataset has the same reuse terms.
Try before choosing
Draw two neighboring polygons and a point on their shared edge; predict whether a join is one-to-one.
Check your work: State the predicate and count matches per point. A visual location alone does not decide boundary ownership.
Geographic Information Science and Systems
Paul A. Longley; Michael F. Goodchild; David J. Maguire; David W. Rhind · Edition: 4 · 2015
GIScience foundations spine
- Choose it when
- You need a systematic explanation of representation, referencing, uncertainty and analysis.
- Use another route when
- You expect a 2015 book to provide a current click-by-click manual for every GIS product.
- Selected reading
- Fourth edition 2015, ISBN 9781118676950: chapters 3 representation,4 georeferencing,5 uncertainty and 13 spatial analysis.
- Limits and trade-offs
- Its broad science-and-system view is a better first conceptual map than a narrowly statistical text. Print and e-book identifiers differ; a public contents list is not the free complete text.
Try before choosing
Create a coordinate contract listing units, origin, axes and the operation required to align two layers.
Check your work: A label describes coordinates; it does not numerically transform them. Every layer must satisfy the same contract before a join.
Geographic Information Analysis
David O'Sullivan; David J. Unwin · Edition: 2 · 2010
Statistical-analysis companion
- Choose it when
- You know introductory GIS and statistics and want to inspect spatial assumptions and pitfalls.
- Use another route when
- You need a software tutorial or want a pattern map alone to establish a causal process.
- Selected reading
- Second edition 2010, ISBN 9780470288573: chapter 2 pitfalls,3 mapping,7 area objects/autocorrelation and 11 overlay.
- Limits and trade-offs
- The analytical focus complements both other books. Some front matter is freely accessible, while that does not establish free access to the whole commercial book.
Try before choosing
Describe how duplicated boundary matches would change an area summary and what substantive ownership rule you would need.
Check your work: Preserve the geometry question and the reporting question separately. Dropping duplicates arbitrarily is not an ownership policy.
Check your preparation
What is a spatial join?
A table of pairs satisfying a geometric relation. Its rows are matches, not necessarily unique points or unique polygons; many-to-many results can be valid.
What does within mean here?
For the point-versus-rectangle pairs below, boundary points are not within, while covered_by includes them. This statement is deliberately about these geometry types, not a universal “no boundary contact” rule for within.
What must coordinate metadata establish?
Units, origin, axes and a legitimate relationship between frames. Relabeling an existing coordinate reference does not perform a numerical conversion; an unknown frame cannot be repaired by guessing an EPSG identifier.
A six-step study plan
Steps completed: 0 / 6
These are your own study marks, not an assessment. They are not sent to this site.
-
Define objects and questions
Selected reading: Longley representation and the free Spatial Data topic.
What to do: Write whether each row represents a point, polygon or point/polygon match.
Check your work: The requested count specifies which identity it counts.
-
Declare the coordinate contract
Selected reading: Longley georeferencing and the original packet.
What to do: List local units, bounds, axes and exactness before computing relations.
Check your work: All objects share a frame; this exercise assumes no rounding or tolerance.
-
Evaluate two predicates
Selected reading: Official point/polygon predicate documentation and the main example.
What to do: Create one row for each point/polygon pair and label within and covered_by.
Check your work: Inspect shared and outer boundaries explicitly rather than inferring from a plot.
-
Choose an ownership rule
Selected reading: Overlay discussion in O’Sullivan/Unwin.
What to do: Write a disjoint, complete allocation rule if every point must belong to exactly one area.
Check your work: Every in-domain point has one owner; the rule is a reporting choice, not a synonym for a generic predicate.
-
Change the coordinate frame
Selected reading: The original follow-up and coordinate metadata discussion.
What to do: Apply the supplied inverse scale-and-offset transform and rerun the pair table.
Check your work: Both unit scale and origin offset must be handled; relabeling leaves values unchanged.
-
Report and challenge
Selected reading: Selected uncertainty and analysis readings.
What to do: Report match rows, unique identities, boundary policy and coordinate assumptions.
Check your work: No population, clustering or causal inference follows from four invented locations.
Worked exercise
Original boundary join: five matches are not five points
In an exact fictional local kilometre plane, closed rectangles W=[0,1]×[0,1] and E=[1,2]×[0,1] share an edge. Points are A(0.5,0.5), B(1,0.5), C(1.5,0.5), D(2,0.5). Compare point-within-polygon and point-covered_by-polygon joins. Then allocate each point uniquely using W: 0≤x<1 and E: 1≤x≤2, with 0≤y≤1 for both.
Assumptions
Rectangles are valid closed polygons without holes. Coordinates and comparisons are exact, with no snapping or tolerance. For these point/polygon pairs, within excludes a boundary-only point and covered_by includes it. The final half-open rule is a separate stipulated ownership policy, not the definition of either generic predicate.
- Within matches only A→W and C→E: W 1, E 1, two match rows and two distinct matched points. B lies on the shared edge and D on E’s outer edge, so both are unmatched by this predicate.
- Covered_by gives A→W, B→W, B→E, C→E, D→E: W 2, E 3, five match rows but four distinct point IDs. B’s two matches are explained by the shared boundary.
- The stipulated ownership rule assigns A→W and B, C, D→E: W 1, E 3, four rows and four distinct points. It includes the outer domain and assigns the shared edge only to E.
- The predicate question and the allocation question differ. Arbitrarily deleting one of B’s matches would hide the policy choice rather than justify it.
Answer and interpretation
Within: 2 rows/2 unique points; covered_by: 5 rows/4 unique points; explicit ownership: 4 rows/4 unique points, W 1/E 3. Each count answers a different stated question.
Test the result
List the pair table rather than just totals, and verify each of A–D has exactly one owner under the final rule. Do not generalize point-boundary behavior to every line/polygon within relation.
Change an assumption
Changed frame: labels do not move coordinates
Keep polygons in the original kilometre frame but store the same points in another fictional local frame: x_m=1000 x_km+500000 and y_m=1000 y_km+1000000. The stored points are A(500500,1000500), B(501000,1000500), C(501500,1000500), D(502000,1000500). Compare relabeling, dividing by 1000 alone, and the correct inverse conversion.
- Relabeling metadata leaves all numerical values unchanged, far outside polygon bounds 0…2 and 0…1. It cannot restore a match.
- Dividing by 1000 alone gives A(500.5,1000.5) and corresponding large values for the others. Units have been rescaled but the offsets remain, so the joins are still wrong.
- The specified inverse is x_km=(x_m−500000)/1000 and y_km=(y_m−1000000)/1000. It restores A(0.5,0.5), B(1,0.5), C(1.5,0.5), D(2,0.5), so all three original pair/ownership results return.
Answer and interpretation
Only subtracting the supplied offsets and then scaling restores the original local coordinates. Correctly aligned results remain within 2, covered_by 5 and ownership 4 rows.
Test the result
Round-trip each restored point through the forward formulas. This fully given affine conversion is not an Earth-CRS reprojection; an actual CRS conversion needs its actual definitions, not an invented label.
Common mistakes
Join rows counted as objects
A boundary point can contribute two valid match rows; distinct identities and match counts must be reported separately.
Predicate substituted for ownership
A geometric relation does not choose which administrative area should own a shared-edge point.
Relabeling treated as conversion
Assigning coordinate metadata changes its interpretation, not the stored numbers. Scale-only repair can also leave an origin error.
Before moving on
- I can reproduce the point/polygon pair table and unique-identity counts.
- I can state a complete disjoint boundary allocation rule.
- I can invert and round-trip the local frame, while distinguishing it from an actual Earth CRS transformation.
Sources and edition checks
Sources checked:
- Authors: free Geographic Data Science with Python
The authors’ free text connects spatial representation and computation but explicitly assumes prior Python/GIS preparation.
- Routledge: first printed edition and content scope
The 2023 print edition and evolving web numbering are distinct; readings use named topics.
- Wiley: GIScience fourth-edition print and contents
The fourth-edition contents anchor representation, referencing, uncertainty and analysis.
- Wiley Online Library: Geographic Information Analysis second edition
The second edition supplies an analytical overlay/pitfalls companion, not free complete-book access.
- Shapely: within predicate and point-boundary examples
The official definition and examples show why point-boundary behavior must not be generalized to every geometry pair.
- Shapely: covered_by predicate
The inclusive relation explains the original shared-edge duplicate match.
- GeoPandas: set_crs assigns metadata without transforming geometry
Official coordinate-metadata documentation distinguishes assigning a reference from transforming geometry. The local affine example is original.
These are proposed study activities, not official course assignments or a claim that every book has been read cover to cover.