ENV103 Chap.5 Vector and Raster Data Models
Vector and Raster Data Models
Spatial data link a location, often a time, and an attribute. This chapter separates the two ways GIS stores them: vector points, lines and polygons with attribute tables, and raster grids defined by extent and resolution. It compares the shapefile with the GeoPackage and newer formats, and shows how cell size controls both detail and file size.
Worked cell counts for a LiDAR elevation raster make the link between resolution, detail and file size concrete before the raster work of Lab 4.
What this chapter covers
- 01
Data versus information
- 02
Location, attribute and time
- 03
Points, lines and polygons
- 04
Raster extent and resolution
- 05
Shapefile problems and the GeoPackage
- 06
GeoJSON, Feather and Parquet
- 07
Temporary layers and saving outputs
Worked example · free
Summarise a small elevation raster
- +1Extent is 30 m by 30 m; resolution is 10 m; cells = (30 ÷ 10) × (30 ÷ 10) = 9.
- +1Minimum = 8 m and maximum = 19 m, read straight from the cell values.
- +1Mean = (12 + 15 + 19 + 10 + 14 + 18 + 8 + 11 + 16) ÷ 9 = 123 ÷ 9 ≈ 13.7 m.
- +1At 5 m resolution the same extent needs (30 ÷ 5) × (30 ÷ 5) = 36 cells, four times as many.
Key terms
- Vector data
- Vector data store discrete features as points, lines and polygons linked to attribute tables.
- Raster data
- Raster data store a grid of cells, each holding one value that summarises the area it covers.
- Resolution
- Resolution is the ground size of a single raster cell.
- Extent
- Extent is the total area a dataset covers.
- GeoPackage
- A GeoPackage is a single-file, SQLite-based format that can store both vector and raster data.
- Attribute table
- An attribute table holds the descriptive fields for each vector feature, one row per feature.
- Shapefile
- A shapefile is a traditional vector format whose geometry and attributes are split across several linked files.
Vector and Raster Data Models FAQ
When should I use raster rather than vector data?
Use raster for phenomena that vary continuously across space, such as elevation, temperature or slope. Use vector for discrete features with clear edges, such as bus stops, roads or suburb boundaries. Satellite images are rasters by nature, while most administrative data arrive as vectors.
Why did the labs move away from shapefiles?
A shapefile is split across several component files, so losing one breaks the layer, and the format is slow for very large datasets. A GeoPackage keeps everything in one file and can hold vector and raster data, which makes it safer to share and store.
What happens to a layer QGIS has just created?
Outputs of processing tools start as temporary layers held only in the project. They are deleted when the project closes, even if you saved the project, so right-click and choose Make Permanent or export the layer before moving on.
What is the difference between data and information?
Data are raw facts, figures or measurements from observations, sensors or surveys, such as a column of air-quality readings. They become information once they have been processed, cleaned and structured, for example by mapping or analysing them. The Week 4 lecture adds four checks before relying on any dataset: its source, type, context and quality.
Assessment move
Anchor this chapter in the lecture's single-record example: a temperature, at a stated latitude, longitude and height, at a stated time. Rewrite it with an Auckland example of your own and label the location, the attribute and the time; if you can do that, you understand what makes data spatial. Then make a two-column comparison of vector and raster.
Under each, list how features are stored, what a cell or feature can hold, two examples from the course and one weakness. Practise the resolution arithmetic until it is quick: cells across, cells down, multiply, and notice what happens when the cell size doubles.
For file formats, learn one advantage and one drawback each for the shapefile, GeoPackage, GeoJSON, Feather and Parquet, because quiz questions favour short comparisons. In QGIS, practise loading one vector and one raster layer, opening the attribute table of the vector and the layer properties of the raster, and noting the extent and cell size each reports.
Finally, build the habit of making temporary layers permanent straight away; losing an hour of processing to a closed project is a lesson most students only need once.