BIT355 Geographical Information System

Geographical Information SystemUnit 215 min read

Vector vs. Raster Data: Representing the Real World in GIS

Unit 2 of Geographical Information System explores how real-world features are digitally mapped using vector (points, lines, polygons) and raster (grid cells) data models, their structures, applications, and trade-offs, with real-world examples from Nepal and global tech.

TAKEAWAYS:

  • Vector data uses points, lines, and polygons to represent discrete features (e.g., roads, buildings) with precise coordinates, while raster data uses grid cells for continuous data (e.g., elevation, satellite imagery).
  • Vector data excels in accuracy for discrete objects (e.g., property boundaries) but struggles with complex surfaces, while raster data handles continuous phenomena (e.g., temperature maps) but loses detail at scale.
  • File formats (e.g., .shp for vector, .tif for raster) and data structures (e.g., topology for vector, pyramids for raster) determine how GIS software processes and analyzes spatial data.
  • Real-world applications include urban planning (vector for roads), disaster management (raster for flood zones), and e-commerce logistics (vector for delivery routes).
  • Coordinate systems (e.g., UTM, lat/long) and projections must align with data type to avoid distortions (e.g., raster resampling vs. vector snapping).
  • Hybrid approaches (e.g., combining vector roads with raster elevation) are common in modern GIS for comprehensive analysis.

1. Introduction: Why Two Data Models?

Geographical Information Systems (GIS) digitize the real world to analyze spatial patterns. The choice between vector and raster depends on the nature of the data:

  • Discrete features (e.g., cities, rivers, land parcels) → Vector.
  • Continuous phenomena (e.g., terrain, temperature, vegetation) → Raster.

Why both?

  • No single model captures all spatial data perfectly.
  • Vector preserves exact locations and boundaries (critical for legal or engineering uses).
  • Raster efficiently stores and analyzes surface-based data (e.g., satellite imagery).

2. Vector Data: The "Drawing" Approach

Vector data represents the world as geometric shapes with coordinates. It uses three fundamental elements:

classDiagram
    class Point {
        +X, Y coordinates
        +Represents: wells, trees, landmarks
        +Example: (1000, 2000) = Bus Stop
    }
    class Line {
        +Series of connected points
        +Represents: roads, rivers, power lines
        +Example: Ring Road, Kathmandu
    }
    class Polygon {
        +Closed shape with interior
        +Represents: lakes, forests, administrative boundaries
        +Example: Chitwan National Park
    }
    Point --> Line : "Lines are made of points"
    Line --> Polygon : "Polygons are closed lines"
    class Attributes {
        +Name, Width, Material
        +Linked to geometries
    }
    Line --> Attributes : "Road attributes"
    Polygon --> Attributes : "District attributes"
Vector data elements with real-world examples from Nepal (e.g., Ring Road, Chitwan Park).

A. Vector Data Elements

classDiagram
    class Point {
        +X, Y coordinates
        +Represents: wells, trees, landmarks
    }
    class Line {
        +Series of connected points
        +Represents: roads, rivers, power lines
    }
    class Polygon {
        +Closed shape with interior
        +Represents: lakes, forests, administrative boundaries
    }
    Point --> Line : "Lines are made of points"
    Line --> Polygon : "Polygons are closed lines"

B. How Vector Data Works

  1. Coordinates: Stored as (X, Y) pairs in a coordinate system (e.g., UTM, lat/long).
    • Example: A road from (1000, 2000) to (1500, 2500) is a line with two points.
  2. Topology: Defines relationships between features (e.g., which polygons share a boundary).
    • Example: Two districts touching at a river (the river is a line separating two polygons).
  3. Attributes: Tabular data linked to geometries (e.g., a road’s name, width, or material).

Worked Example: Kathmandu Traffic Routes

  • Vector representation:
    • Points: Bus stops, traffic lights.
    • Lines: Ring Road, Swoyambhu Marg.
    • Polygons: Traffic zones, no-parking areas.
  • Application: Pathao’s ride-hailing app uses vector data to calculate the shortest path between two points, avoiding one-way streets (stored as line attributes).

C. Vector File Formats

Format Extension Description Example Use Case
Shapefile .shp Open standard, stores geometry + attributes Land-use planning in Nepal
GeoJSON .geojson JSON-based, web-friendly Daraz delivery route optimization
KML .kml Google Earth-compatible Ncell’s network coverage mapping

D. Advantages and Limitations

Advantages:

  • Precision: Exact coordinates (e.g., property boundaries for land registration).
  • Scalability: Zooming in/out retains detail (e.g., a river’s meanders).
  • Topological relationships: Easily query "Which districts border India?"

Limitations:

  • Complexity: Large datasets (e.g., a city’s road network) require significant storage.
  • Surface modeling: Poor for terrain (e.g., a mountain’s slope is hard to represent as polygons).
  • Overlap issues: Adjacent polygons may not perfectly align (e.g., two districts’ borders).

3. Raster Data: The "Pixel Grid" Approach

Raster data divides the world into a grid of cells (pixels), where each cell has a value representing a real-world measurement.

A. Raster Data Structure

graph TD
    A["Raster Grid"] --> B["Cell (Pixel)"]
    B --> C["Value: Elevation, Land Cover, Temperature"]
    B --> D["Resolution: Cell Size (e.g., 1m × 1m)"]
    B --> E["Projection: Coordinate System"]

B. How Raster Data Works

  1. Cell Values: Each cell stores a single value (e.g., elevation in meters, NDVI for vegetation health).
    • Example: A cell in Pokhara might have a value of 1200 (elevation) or 0.6 (NDVI index).
  2. Resolution: Smaller cells = higher detail but larger file size.
    • Example: A 1m-resolution raster of Kathmandu shows individual buildings; a 30m-resolution shows city blocks.
  3. No Topology: Cells are independent; relationships are inferred (e.g., neighboring cells with similar values).

Worked Example: Flood Risk Mapping in Nepal

  • Raster data: A 10m-resolution DEM (Digital Elevation Model) shows terrain elevation.
  • Application: NTC uses this to predict flood-prone areas during monsoons. Cells below 500m elevation (e.g., parts of Chitwan) are flagged as high-risk.

C. Raster File Formats

Format Extension Description Example Use Case
GeoTIFF .tif Tagged TIFF with georeferencing Satellite imagery (e.g., NASA Landsat)
ERDAS IMG .img Proprietary, high-performance Disaster response (e.g., earthquake damage assessment)
NetCDF .nc Scientific data (e.g., climate models) NEPSE’s environmental impact studies

D. Advantages and Limitations

Advantages:

  • Surface modeling: Ideal for continuous data (e.g., temperature gradients, pollution levels).
  • Remote sensing: Directly compatible with satellite/aerial imagery.
  • Simplicity: Easy to overlay multiple layers (e.g., combining elevation + rainfall data).

Limitations:

  • Resolution trade-offs: High detail = large files (e.g., a 1m-resolution Nepal map is ~100GB).
  • Discrete features: Poor for sharp boundaries (e.g., a river’s edge may appear jagged).
  • Data loss: Resampling (changing resolution) can distort values (e.g., averaging elevation data).

4. Vector vs. Raster: When to Use Which?

Use this table to decide based on the data type and analysis goal:

023.7547.571.2595Property Boundaries95Satellite Imagery5Flood Zones80Delivery Routes90Temperature Maps10
Percentage of use cases where vector (95% for property boundaries) vs. raster (80% for flood zones) is preferred in Nepal’s GIS applications (e.g., NTC, Daraz).
Criteria Vector Data Raster Data
Data Type Discrete features (points, lines, polygons) Continuous surfaces (e.g., terrain, imagery)
Best For Maps with clear boundaries (e.g., roads, land parcels) Surface analysis (e.g., slope, vegetation)
Precision High (exact coordinates) Depends on resolution (e.g., 1m vs. 30m)
Storage Efficiency Low for simple features, high for complex topologies High for low-resolution, low for high-resolution
Analysis Examples Buffer analysis (e.g., 500m around a school) Terrain analysis (e.g., watershed modeling)
Software Tools QGIS (Shapefiles), ArcGIS (Feature Classes) ENVI (satellite imagery), GRASS GIS (raster analysis)
Real-World Example eSewa: Vector polygons for property tax assessment NTC: Raster DEM for tower placement planning

5. Hybrid Approaches: Combining Vector and Raster

Many real-world GIS projects use both data models for comprehensive analysis:

  • Example 1: Urban Planning in Pokhara

    • Vector: Roads, buildings, zoning laws (polygons).
    • Raster: Noise pollution levels (raster grid), elevation (DEM).
    • Analysis: Overlay raster noise data on vector building polygons to identify high-noise residential areas.
  • Example 2: Daraz Logistics

    • Vector: Delivery routes (lines), warehouses (points).
    • Raster: Traffic density (from satellite imagery).
    • Analysis: Optimize routes by avoiding high-traffic raster cells.

6. Data Acquisition and Real-World Sources

Both vector and raster data come from diverse sources:

A. Vector Data Sources

  • Surveys: GPS-collected points (e.g., land survey for NEPSE projects).
  • Digitization: Scanning paper maps (e.g., Nepal’s old topographic sheets).
  • Open Data:
  • LiDAR: Laser scans for 3D vector models (e.g., building heights).

B. Raster Data Sources

  • Satellite Imagery: Landsat (30m resolution), Sentinel-2 (10m).
  • Aerial Photography: Drones for high-resolution mapping (e.g., Kathmandu’s traffic congestion).
  • Radar: SAR data for cloud-penetrating imagery (e.g., flood monitoring).
  • Scanners: Converting paper maps to raster (e.g., historical maps of Nepal).

7. Common Pitfalls and How to Avoid Them

Pitfall Cause Solution
Misaligned layers Different projections/resolutions Reproject all data to the same CRS (e.g., UTM Zone 45N).
Overlapping polygons Poor topology in vector data Use GIS tools to "snapping" edges.
Blocky raster appearance Low resolution Increase resolution or use interpolation.
Attribute errors Incorrect data entry Validate with field checks (e.g., verify road names with local authorities).
Large file sizes High-resolution raster or complex vector Use compression (e.g., GeoTIFF) or simplify geometries.

## In the real world

  1. eSewa and Property Taxes (Vector)

    • How it uses vector data: eSewa’s property tax system relies on vector polygons to define land parcels. Each property is a polygon with attributes like area, owner, and tax rate.
    • Real-world impact: When you pay property tax online, eSewa cross-references your land’s polygon with municipal records to calculate the tax. Errors in vector boundaries (e.g., overlapping parcels) can lead to disputes or incorrect billing.
  2. Pathao’s Ride-Hailing (Vector + Raster Hybrid)

    • Vector: Roads (lines) and pickup/drop locations (points) are stored as vector data. Pathao’s algorithm uses network analysis to find the shortest path, avoiding one-way streets (stored as line attributes).
    • Raster: Traffic density maps (raster grids) are overlaid to adjust ETA calculations. For example, during peak hours, raster cells in Thapathali or Lakhami show high congestion, prompting Pathao to reroute drivers.
  3. NTC’s Telecommunication Planning (Raster)

    • How it uses raster data: NTC uses Digital Elevation Models (DEM)—raster grids showing terrain elevation—to place cell towers. Towers must be visible to maximize coverage, so NTC overlays DEM data with population density (another raster layer) to prioritize tower locations in hilly areas (e.g., Dhading) where line-of-sight is critical.
    • Real-world impact: Poor raster data (e.g., outdated elevation models) can lead to "dead zones" where signals drop, as seen in remote villages like Humla.

## Exam Tip

This unit is heavily tested on:

  1. Definitions and Comparisons:

    • Be ready to distinguish vector vs. raster in terms of structure, use cases, and file formats. Examiners often ask: "Which data model would you use to map Nepal’s district boundaries? Why?" (Answer: Vector polygons for discrete boundaries.)
    • Know the advantages/disadvantages of each (e.g., "Raster is better for terrain analysis but loses detail when zoomed out").
  2. Worked Examples:

    • Trace how vector data represents a real scenario: For example, if asked about "mapping Kathmandu’s traffic routes," describe:
      • Roads as lines with attributes (e.g., speed limit, lane count).
      • Traffic lights as points with attributes (e.g., timing).
      • No-parking zones as polygons.
    • Raster examples: If given a DEM raster, explain how to derive slope or aspect (e.g., "Using a 30m-resolution DEM, calculate the slope between two adjacent cells").
  3. File Formats and Software:

    • Memorize 3 vector formats (e.g., Shapefile, GeoJSON, KML) and 3 raster formats (e.g., GeoTIFF, ERDAS IMG, NetCDF).
    • Know which tools use which: QGIS (both), ArcGIS (both), Google Earth (raster-heavy).
  4. Hybrid Applications:

    • Expect questions like: "How would you combine vector and raster data to analyze flood risk in Chitwan?"
      • Vector: River paths (lines), protected areas (polygons).
      • Raster: Elevation (DEM), rainfall data.
      • Analysis: Overlay raster flood zones on vector infrastructure to identify critical bridges at risk.
  5. Common Mistakes to Avoid:

    • Assuming all data is vector: Raster is essential for imagery or surfaces (e.g., "You cannot accurately model a mountain’s slope with vector data alone").
    • Ignoring projections: Always assume data must be in the same coordinate system (e.g., UTM Zone 45N for Nepal).
    • Overcomplicating: For short-answer questions, stick to one clear example (e.g., "Vector for roads, raster for elevation").

Final Pro Tip: Draw a simple comparison table in your exam booklet for vector vs. raster before answering. This shows the examiner you understand the core differences, even if you forget a detail. Use real-world analogies (e.g., "Vector is like a city map with roads and buildings; raster is like a heatmap of the city’s temperature").

In the real world

  • Pathao’s ride-hailing app uses vector data (polygons for traffic zones, lines for roads) to calculate real-time routes in Kathmandu, avoiding one-way streets (stored as line attributes).
  • NTC’s flood risk mapping relies on raster DEM data (e.g., 10m-resolution elevation grids) to predict monsoon flood zones in Chitwan, combining it with rainfall rasters.
  • Daraz’s logistics combines vector roads (for delivery routes) with raster elevation data (to adjust delivery times in hilly areas like Pokhara).

Based on the TU BIT syllabus for Geographical Information System (BIT355), unit 2.

Discussion

Loading…