Monash University · FACULTY OF INFORMATION TECHNOLOGY

FIT5137 Chap.8 Spatial Data and PostGIS

- one subject, every graph, every model, every mark
8 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 8 of 10 · FIT5137

Spatial Data and PostGIS

Spatial Data and PostGIS introduces geometries, coordinate reference systems and database operations that give location analytical meaning. Points represent positions, lines represent connected paths and polygons represent bounded areas with interiors and boundaries. The correct type depends on the phenomenon and question, not on which symbol is easiest to display.

Coordinates remain uninterpretable without their actual reference system, and assigning a label is different from transforming values into another system. Before querying, the chapter validates identifiers, geometry types, nulls, validity, reference identifiers and spatial extent. It distinguishes geographic coordinates from projected coordinates and requires distance or area outputs to carry justified units.

Loading is treated as an evidence process: input rows, accepted geometries, rejected records and known locations are checked, while duplicate identifiers and coincident coordinates are investigated as separate quality questions.

In this chapter

What this chapter covers

  • 01

    Model phenomena as points, lines or polygons

  • 02

    Preserve stable business identifiers beside geometry

  • 03

    Verify actual coordinate reference systems

  • 04

    Distinguish assigning metadata from transforming coordinates

  • 05

    Validate geometry type, emptiness and validity

  • 06

    Check extent against the expected operating region

  • 07

    Choose measurement methods and explicit units

  • 08

    Retain rejected rows and transformation lineage

Worked example · free

Audit a service-stop import

Q [8 marks]. A file contains 84 stop rows. Two rows have out-of-range latitude, one lacks a stop identifier and three pairs share coordinates while keeping different valid identifiers. Calculate the accepted count if only invalid coordinates and the missing identifier are rejected. The mark allocation used here is original to this guide and is not a published university assessment scheme.
Geometry type constrains valid questions.Geometry type constrains valid questions. A point has position, a line has path, and a polygon has an interior and boundary.Pointone locationLineconnected pathPolygonbounded areaall coordinates require a declared reference system
Geometry type constrains valid questions. A point has position, a line has path, and a polygon has an interior and boundary.
  • 1Begin with 84 input rows and separate defect types before making a decision.
  • 1Reject the 2 rows with impossible latitude because their points cannot be located reliably.
  • 1Reject the 1 row without a stable stop identifier because it cannot be reconciled to operational activity.
  • 2Do not reject the 6 rows in 3 coincident-coordinate pairs solely for sharing location; different stops can legitimately use one place.
  • 1Accepted rows equal 84 minus 2 minus 1, which equals 81.
  • 2Reconcile 81 accepted plus 3 rejected to 84 input rows, then validate geometry type, reference system and extent for accepted points.
Accept 81 stops and reject 3 rows. Coincident coordinates remain because they have distinct valid identifiers and need contextual review rather than automatic deletion.
Sia tip — Identifier duplication and coordinate coincidence are different tests. Profile both before deciding whether two rows represent one feature.
Glossary

Key terms

Point geometry
A zero-dimensional spatial object representing one coordinate location.
Line geometry
A connected sequence of coordinates representing a path or linear feature.
Polygon geometry
A bounded spatial object with an interior, boundary and exterior.
Geographic coordinates
Angular positions on a geographic reference framework, commonly expressed as longitude and latitude.
Projected coordinates
Planar coordinates created by a projection selected for a region and measurement purpose.
Spatial extent
The bounding range occupied by a layer, used to detect displacement and implausible coordinates.
FAQ

Spatial Data and PostGIS FAQ

Why is a coordinate pair not enough?

The same numbers can indicate different locations under different reference systems and axis conventions. Geometry type and reference metadata provide meaning, while stable identifiers connect the feature to business records. Validate all three before analysis.

What is the difference between assigning and transforming?

Assigning a reference identifier declares the system in which coordinates already exist. Transforming computes new coordinate values in a target system. Relabelling untransformed values can make wrong locations appear authoritative and should not be used to fix a mismatch.

How should I choose a geometry type?

Choose the type needed by the analytical relationship. A station can be a point for proximity, a road a line for path and intersection, and a service zone a polygon for containment and area. A representative centre point cannot answer whether a location lies inside the original area.

What validates a spatial import?

Reconcile input, accepted and rejected rows; test stable identifiers, non-empty geometry, expected type, validity and actual reference system; inspect the bounding extent and compare several known locations. A successful load command proves syntax, not correct geography.

Study strategy

Assessment move

Use a metadata-first checklist. For every layer, record identifier, geometry type, actual reference system, coordinate unit, extent, validity and expected population. Sketch the phenomenon before choosing point, line or polygon. Practise distinguishing assignment from transformation and verify a transformed sample by known locations plus round-trip tolerance.

For measurements, write the unit beside the number and justify the method for the region. When a query returns nothing, inspect extent and reference compatibility before changing the threshold. Prepare three deliberately flawed imports: swapped axes, relabelled coordinates without transformation and a polygon layer loaded as representative points. Diagnose each from extent, known landmarks and the operation that fails.

Then create a duplicate-location case with distinct valid identifiers and a repeated-identifier case with changed coordinates. Explain why the first may be legitimate while the second needs history or error investigation. Keep rejected rows and source coordinates visible in every solution, because spatial repair without lineage is difficult to audit or reverse.

End by creating a small acceptance table with input count, accepted count, rejection reasons, geometry-type count, extent and three known landmarks. This table should let a reviewer judge loading fitness before seeing any downstream map. Add the rejected identifiers and reasons as an appendix so a suspicious feature can be traced without rerunning ingestion.

A+Everything unlocked
Unlocks this Bible + all 167 of your Monash University subjects - and 1,000+ Bibles across every Australian university.
Sia - your FIT5137 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works