Real-Time and IoT Geospatial Data

Real-Time and IoT Geospatial Data

I once worked with a river authority whose flood warnings depended on a gentleman named Henri. Every morning at seven, Henri walked down to a gauge on the riverbank, read a number off a painted post, and phoned it in. When the river rose quickly, he read it more often, as long as he could reach the bank. One spring night the river rose faster than anyone expected, the road to the gauge flooded, and Henri could not get there. The authority learned about the flood from a farmer’s phone call, an hour late. A year later, the post carried a small radar sensor that sent a reading every five minutes, a cheap radio link and a map on the control room wall that turned red when the water crossed a threshold. Henri, who was a good sport, was promoted to maintaining the sensors. The warning time doubled.

That story is the whole idea behind this guide in miniature. The world is now covered with devices that measure things and know where they are: river gauges, air quality monitors, vehicles, ships, phones, soil probes, smart meters, cameras, satellites. Their data arrives continuously, with a location and a timestamp, and it is changing what GIS is. We are moving from maps of what was to maps of what is happening now. In this guide I’ll explain what real-time and IoT geospatial data are, where they come from, how they travel and are stored, how to process and map them, and how to avoid the traps that lie in wait: bad sensors, bad clocks, privacy problems and dashboards that look alive but show stale numbers.

This article is part of our trends series. For the model side of the story, see Digital Twins and 3D GIS.

Diagram: Real-time maps depend on a pipeline from sensors through a broker and processing to a live display.
Real-time maps depend on a pipeline from sensors through a broker and processing to a live display.

What Do We Mean by “Real-Time”?

“Real-time” is used loosely, and the difference between its meanings matters for cost and design.

  • Hard real-time: guaranteed response within strict, tiny limits, such as in aircraft control. Rare in GIS.
  • Real-time (streaming): data is processed and displayed within seconds of being generated. Typical for vehicle tracking and live alerts.
  • Near-real-time: a delay of minutes to hours, such as satellite fire detections or flood maps from radar. Still very valuable.
  • Batch: data is collected and processed periodically, daily or monthly.

The right question is never “can we make it real-time?” but “how fresh does this need to be to change a decision?” A fleet dispatcher may need positions every few seconds. A water utility may need pressure readings every minute. A planner studying climate trends may be perfectly happy with a daily summary. Every step toward faster costs more, in infrastructure, complexity and energy.


What Is IoT Geospatial Data?

The Internet of Things (IoT) is the network of physical devices that sense, communicate and sometimes act. When those devices carry or report a location, we have IoT geospatial data. It has distinctive properties.

  • It is a stream of events, each with a time, a position (fixed or moving) and one or more measurements.
  • It is often high-volume, with thousands or millions of devices reporting every few seconds.
  • It is time-series by nature: the history matters as much as the latest value.
  • It is imperfect: gaps, delays, duplicates, noise, drift and out-of-order arrival are normal.
  • It is distributed: devices are scattered, sometimes with poor connectivity and limited power.

Kinds of sources

  • Fixed sensors: river gauges, weather stations, air quality monitors, soil moisture probes, seismometers, noise sensors, structural monitors on bridges and buildings, smart meters.
  • Mobile trackers and vehicles: GNSS trackers and telematics on trucks, buses, taxis, bikes, scooters, machinery and containers. Public transport vehicles publish positions through standard feeds such as GTFS Realtime.
  • Ships and aircraft: vessel positions through the AIS system, aircraft through ADS-B broadcasts.
  • Wildlife and asset tagging: GPS collars and tags. Platforms such as Movebank manage animal tracking data.
  • Phones and wearables: location data, with strong privacy implications.
  • Cameras and computer vision: vehicles counted, parking spaces detected, crowds estimated, with locations attached.
  • Satellites: near-real-time fire detection, flood mapping, ship detection and more. See Satellite Imagery Sources: Free vs. Paid.
  • Drones: live video and sensor streams. See Working with Drones (UAV) and GIS.
  • Human reports and crowdsourcing: incident reports, citizen science and social media posts, which need verification.
  • Operational systems: SCADA in utilities, dispatch systems, building management systems.

How the Data Travels: Protocols and Standards

Devices and systems need rules to talk to each other.

Transport and messaging

  • HTTP and REST APIs: simple request-response, widely used. Fine for modest update rates, and for pulling data on demand.
  • WebSockets and Server-Sent Events: keep a connection open so the server can push updates to a client, such as a live map in a browser.
  • MQTT: a lightweight publish and subscribe protocol designed for constrained devices and unreliable networks, and a workhorse of IoT. Devices publish messages to topics (such as city/sensors/air/42) on a broker, and any number of subscribers receive them.
  • AMQP, CoAP and others: alternatives for specific needs.
  • Apache Kafka and similar streaming platforms: a durable, scalable log of events, used to move very large volumes of data between systems and to replay history.

Network layers for devices

  • Cellular (4G and 5G), including low-power variants such as NB-IoT: good coverage, ongoing connectivity costs.
  • LoRaWAN and similar low-power wide-area networks: long range, tiny messages, years of battery life, ideal for sensors that report a few readings an hour.
  • Wi-Fi and Bluetooth: short range.
  • Satellite IoT: for remote locations without terrestrial coverage.

Geospatial and sensor standards

  • OGC SensorThings API: an open standard for exchanging IoT sensor data in a simple, JSON-based, RESTful way. Its data model has Things (the devices), Locations, Datastreams (a series of observations of one property), Sensors, ObservedProperties, FeaturesOfInterest and Observations. Typical requests look like this:
GET /v1.1/Things?$expand=Datastreams
GET /v1.1/Datastreams(1)/Observations?$orderby=phenomenonTime desc&$top=10
  • GeoJSON for locations and simple features, and GTFS Realtime (a compact binary format) for public transport feeds.
  • Older OGC standards, such as the Sensor Observation Service, still found in some systems. See Intro to Web GIS APIs and OGC Standards (WMS, WFS, WMTS) for the wider family of standards.
  • ISO 8601 timestamps in UTC, such as 2025-03-04T14:30:05Z, for unambiguous time.

Using open standards for sensors prevents lock-in and makes it possible to combine data from many sources.


A Typical Architecture

A real-time geospatial system follows a recognizable pipeline.

  1. Devices: sensors, trackers and vehicles generate readings.
  2. Gateways and connectivity: radios or cellular links collect and forward the data. Edge devices may filter or aggregate locally.
  3. Message broker or streaming platform: receives events reliably, and distributes them to consumers.
  4. Stream processing: applies rules and calculations on the fly: validation, filtering, enrichment, geofencing, aggregation, anomaly detection.
  5. Storage: a time-series database and a spatial database, holding both the latest state and the history. See PostGIS: A Practical Introduction.
  6. APIs and services: expose the data to applications, using standards.
  7. Visualization and action: live maps, dashboards, alerts and automated actions. See Story Maps and Interactive Dashboards.
  8. Monitoring and governance: device health, data quality, security and costs.

Hot, warm and cold paths

  • Hot path: the latest state, delivered in seconds, to maps and alerts.
  • Warm path: recent history, in minutes or hours, for dashboards and short-term analysis.
  • Cold path: the full archive, for long-term analysis and machine learning.

Designing the three separately avoids building an expensive real-time system for needs that only require a nightly batch.

Edge computing

Sending every raw reading from every device to the cloud can be wasteful. Edge computing processes data near its source: filtering noise, computing averages, detecting events and sending only what matters. It reduces bandwidth, cost and latency, and helps when connectivity is poor.


Storing Real-Time Data

Streaming geospatial data poses storage questions that ordinary GIS data does not.

Two shapes of data

  • Latest state: where is each vehicle now? What is each sensor’s current reading? A small table, updated constantly.
  • History: every reading, forever, or for a defined period. A large, append-only table.

Tools

  • Time-series databases and extensions, such as TimescaleDB for PostgreSQL, which handle high volumes of timestamped data efficiently, and work with PostGIS for the spatial side.
  • MobilityDB, a PostgreSQL extension for managing trajectories of moving objects.
  • Specialized time-series databases and cloud services.
  • Columnar and file-based archives for cold data. See Cloud-Native Geospatial (COG, STAC, Zarr).

Useful query patterns

The latest known position of every vehicle in the last five minutes:

SELECT DISTINCT ON (vehicle_id) vehicle_id, time, geom
FROM positions
WHERE time > now() - interval '5 minutes'
ORDER BY vehicle_id, time DESC;

Which vehicles are currently inside a protected zone (a geofence):

SELECT p.vehicle_id, p.time
FROM (
  SELECT DISTINCT ON (vehicle_id) vehicle_id, time, geom
  FROM positions
  WHERE time > now() - interval '5 minutes'
  ORDER BY vehicle_id, time DESC
) p
JOIN zones z ON ST_Within(p.geom, z.geom)
WHERE z.zone_type = 'restricted';

Remember spatial indexes on the geometry column, and time-based indexes or partitioning on the time column. See Spatial SQL Cheat Sheet.


Processing Streams

Geofencing

A geofence is a virtual boundary. The system checks each incoming position against polygons and raises an event when an object enters, leaves or dwells in a zone. It is the single most common real-time geospatial operation: alerts when a truck leaves its route, a ship enters a protected area, a child leaves a school zone or a sensor reading crosses a threshold inside a flood zone.

Enrichment and spatial joins

Each event can be enriched with context: which district it is in, which road it is on, which sensor group it belongs to. This is a spatial join, applied continuously. See Buffer, Clip, Intersect, Union: Overlay Tools Explained.

Windows and aggregation

Raw events are rarely the answer. You usually want aggregations over time windows: the average air quality in the last hour, the number of vehicles per road segment every five minutes, the maximum water level in the last 24 hours. Windows may be tumbling (fixed, non-overlapping) or sliding (overlapping).

Map matching and trajectories

GNSS positions are noisy. Map matching snaps a sequence of points to the most probable path on the road network, so that vehicle tracks follow roads and speeds and travel times can be computed. Several routing engines provide this function. Trajectories can then be analyzed for speed, stops, dwell time, routes and anomalies. See Network Analysis and Route Optimization.

Anomaly and event detection

Rules (a reading above a threshold) or statistical and machine learning methods detect unusual patterns: a sudden pressure drop, a vehicle that stops in the wrong place, a cluster of sensors reporting at once. Streaming versions of clustering and hot spot methods can find emerging concentrations. See Spatial Clustering: DBSCAN, K-Means, and Cluster Analysis, Hotspot Analysis with Getis-Ord Gi* Explained and AI and Machine Learning in GIS.

A minimal example in Python

This sketch subscribes to MQTT messages carrying vehicle positions, and reports when a vehicle enters a polygon. It uses the paho-mqtt library (version 2 style) and Shapely. Treat it as an illustration, and adapt it to the broker, topics and message format you actually have.

import json
import paho.mqtt.client as mqtt
from shapely.geometry import Point, shape

# A polygon (the geofence) from a GeoJSON file with one feature
with open("zone.geojson") as f:
    zone = shape(json.load(f)["features"][0]["geometry"])

inside = {}   # remembers the last known state of each vehicle

def on_connect(client, userdata, flags, reason_code, properties):
    client.subscribe("city/vehicles/+/position")

def on_message(client, userdata, msg):
    data = json.loads(msg.payload)                      # e.g. {"id": "bus12", "lat": 48.85, "lon": 2.35, "time": "..."}
    now_inside = zone.contains(Point(data["lon"], data["lat"]))
    was_inside = inside.get(data["id"], False)
    if now_inside and not was_inside:
        print(f"ALERT: {data['id']} entered the zone at {data['time']}")
    inside[data["id"]] = now_inside

client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)
client.on_connect = on_connect
client.on_message = on_message
client.connect("broker.example.org", 1883)
client.loop_forever()

The code remembers the previous state, so it alerts on the transition into the zone, and not on every message while inside. That detail separates a useful alert from a flood of noise. Library versions differ in their callback signatures, so check the documentation for your version.


Mapping Live Data

Live maps in the browser

A web map can receive updates through a WebSocket or by polling an API, and refresh its source. With MapLibre, updating a layer is a one-line operation:

// Replace the data of a GeoJSON source whenever new positions arrive
socket.onmessage = (event) => {
  const positions = JSON.parse(event.data);          // a GeoJSON FeatureCollection
  map.getSource('vehicles').setData(positions);
};

See How to Create a Web Map (Leaflet, Mapbox, OpenLayers) for the foundations.

Design principles for live maps

  • Show the age of the data, on the map. “Updated 14:32:10” builds trust. A frozen map that looks alive is dangerous.
  • Distinguish current from stale. Fade or flag sensors that have not reported recently. A silent sensor is not the same as a normal reading.
  • Use meaningful thresholds and colors, consistent with warnings and standards. See Color Theory for Maps.
  • Avoid overload. Too many moving symbols make a map unreadable. Cluster, filter and aggregate. See Choropleth, Heat, and Proportional Symbol Maps: When to Use Each.
  • Combine map, chart and numbers. A map shows where, a time series shows how it is changing.
  • Give context: basemap, boundaries, and what is normal.
  • Allow time travel: a time slider to replay the last hours or days.
  • Design for the situation: a control room wall, a field tablet and a public phone need different layouts. See Story Maps and Interactive Dashboards.

Platforms

Several tools support real-time geospatial work: GIS platforms with dedicated real-time and big data components (for example, Esri’s ArcGIS Velocity and GeoEvent Server), open-source stacks built on message brokers, time-series and spatial databases, dashboard tools for time series with map panels, and web libraries for custom applications. See Best Free and Open-Source GIS Tools and Getting Started with ArcGIS Online.


Use Cases

Transport and mobility

Live public transport positions and arrival predictions, traffic speeds and congestion, shared bike and scooter availability, parking occupancy, and incident management. Standard feeds make it possible to build passenger apps and operational dashboards. See GIS in Utilities, Transportation, and Logistics.

Fleet and logistics

Vehicle tracking, dynamic dispatch, geofenced alerts, delivery status and proof of delivery, estimated arrival times, and driver safety. Combined with routing, it enables dynamic re-planning when conditions change. See Network Analysis and Route Optimization.

Environmental monitoring

River levels and flood early warning, air quality networks, noise, soil moisture, weather, wildfire detection and ocean buoys. Dense low-cost sensor networks complement official stations, but need calibration. See GIS in Environmental Management and Climate Change.

Utilities and infrastructure

Smart meters, pressure and flow sensors, leak detection, power grid monitoring and structural health sensors on bridges and dams. Combined with network models, they locate faults and guide crews. See Digital Twins and 3D GIS.

Disaster response and public safety

Live incident maps, responder tracking, sensor-based alerts, satellite-derived flood and fire updates and situational awareness dashboards. See GIS in Disaster Management and Emergency Response.

Agriculture

Soil moisture and weather sensors, machinery telemetry and livestock tracking, connected to irrigation and field management. See GIS in Agriculture and Precision Farming.

Maritime and aviation

Vessel tracking, port operations, fishing activity monitoring, aircraft tracking and airspace awareness.

Wildlife and conservation

GPS collars and tags, anti-poaching patrols and acoustic sensors, with attention to protecting sensitive locations.

Smart cities and buildings

Occupancy, energy, waste collection, lighting and crowd management, combined into city operations centers.

Public health

Environmental exposure sensors and mobility patterns, in aggregated and anonymized form. See GIS in Public Health and Epidemiology.


A Worked Example: A River Flood Early Warning Map

Goal: give a municipal emergency office a live view of river levels and the areas at risk, with alerts when thresholds are crossed.

  1. Define the decision: the office needs to decide when to warn residents and close roads. The key question is how much time they have.
  2. Choose the sensors and the locations: radar water level sensors at six points along the river, plus a rain gauge in the upper catchment. Place them where the river changes character, and where flooding begins.
  3. Pick the network: a low-power radio link to a gateway for the remote sites, and cellular for the gateway. Add battery and solar power, and plan for outages.
  4. Define the data model: each sensor is a Thing with a Datastream of level observations. Use an open API standard to expose it.
  5. Ingest and validate: send readings every five minutes through a broker. Reject impossible values, flag missing readings and keep timestamps in UTC.
  6. Define thresholds: work with hydrologists to set warning levels for each gauge, linked to flood maps that show which areas are affected at each level. See Digital Elevation Models (DEM) and Terrain Analysis.
  7. Process the stream: compute the rate of rise over the last 30 minutes, and raise an alert when a threshold is crossed, or the rise is unusually fast.
  8. Link to the map: when a gauge crosses a level, the dashboard highlights the corresponding flood zone, counts the buildings and population inside it and lists the roads that will close. See Buffer, Clip, Intersect, Union: Overlay Tools Explained.
  9. Build the dashboard: a live map with sensor symbols colored by status, a time series for each gauge, key indicators and a timestamp. Mark sensors that have not reported in 15 minutes.
  10. Test with history: replay the data from a past flood to check that the thresholds and the alerts would have worked.
  11. Maintain: monitor sensor health, calibrate, replace batteries, and review thresholds after each event.
  12. Close the loop: after a flood, compare predictions with outcomes and refine.

The technology is modest. The value lies in the chain from measurement to threshold to map to decision.


Data Quality: The Hidden Challenge

Real-time data is not automatically good data. In my experience, quality problems cause more failures than technology does.

  • Sensor errors and drift. Sensors go out of calibration, get covered in mud or fail silently. Compare with neighbors and with reference stations, and recalibrate on a schedule.
  • Missing data and gaps. Connectivity drops, batteries die. Decide how to display and handle gaps, and never fill them without saying so.
  • Duplicates and out-of-order messages. Networks deliver messages twice or late. Design processing to be tolerant, using timestamps and unique IDs.
  • Clock problems. Devices with wrong clocks produce events in the future or the distant past. Use UTC, check for drift and record both the event time and the arrival time.
  • GNSS noise. Positions jump, especially in urban canyons and tunnels. Filter, smooth and map-match. See Coordinate Reference Systems (CRS) Explained Simply for coordinate handling.
  • Units and formats. A sensor reporting in different units after a firmware update can pass unnoticed.
  • Sensor placement bias. Sensors are where they are easy to install, not necessarily where the problem is.
  • Low-cost sensor accuracy. Cheap devices are useful for patterns and dense coverage, but may be inaccurate in absolute terms.
  • Metadata. Who owns the sensor, what it measures, how accurate it is, when it was installed, calibrated and moved. See Metadata in GIS: Why It Matters and How to Create It.
  • Context. A number without its baseline is hard to interpret.

Build automated quality checks into the pipeline: range checks, rate-of-change checks, stuck-value detection and comparisons between neighboring sensors, and surface a data health dashboard alongside the main one.


Privacy, Security and Ethics

Location streams are among the most sensitive data there is.

  • Location is personal data. A sequence of positions reveals where someone lives, works, worships and goes at night. Even “anonymous” trajectories can often be re-identified. Collect only what you need, aggregate where possible, limit retention, obtain consent where required and follow the law.
  • Purpose limitation. Use data for the purposes you stated. Mobility data collected for traffic management should not quietly become a surveillance tool.
  • Device security. Many IoT devices have been compromised through default passwords, unencrypted links and unpatched firmware. Use authentication, encryption, certificates, secure update mechanisms and network segmentation.
  • Infrastructure data is sensitive. Real-time status of power, water and transport networks is valuable to attackers. Restrict access, and monitor.
  • Reliability and safety. If decisions or controls depend on the data, plan for failure: redundancy, fallbacks and human oversight.
  • Equity. Sensor networks are often denser in wealthy areas. Decisions based on them can neglect places with no sensors.
  • Transparency. Tell people what is being measured, why, and who can see it.
  • Environmental cost. Devices, batteries and data centers have footprints. Deploy only what is needed.

Costs and Practical Constraints

  • Hardware and installation: devices are cheap, but installation, power, connectivity and maintenance are not.
  • Connectivity fees, for cellular and satellite links.
  • Maintenance: field visits to replace batteries and clean or calibrate sensors are often the largest ongoing cost.
  • Cloud and storage costs, which grow with volume and retention.
  • People and skills: data engineering, geospatial, security and domain expertise.
  • Vendor lock-in: proprietary platforms and devices can be hard to leave. Prefer open standards and protocols.
  • Start small, and measure the value before scaling.

Common Mistakes

  • Real-time for its own sake, when a daily update would serve.
  • A live dashboard with stale data, and no timestamp or health indication.
  • Ignoring sensor quality and calibration.
  • Not handling gaps, duplicates and out-of-order data.
  • Using local time and inconsistent timestamps.
  • Alerting on every message instead of on state changes.
  • Plotting raw GNSS points with no filtering or map matching.
  • Storing everything in one table, with no separation of latest state and history.
  • Missing spatial and time indexes, causing slow queries.
  • Neglecting security, especially device credentials and network exposure.
  • Collecting personal location data without a clear purpose and safeguards.
  • Locking into a proprietary stack without an exit plan.
  • No maintenance plan for sensors in the field.
  • Overloading the map with moving symbols.

Trends

  • Cheaper, smarter sensors and edge AI, with devices that detect events locally.
  • Satellite IoT and low-power networks extending coverage to remote places.
  • Open standards for sensor data, simplifying integration across organizations.
  • Streaming and cloud-native processing of geospatial data at scale. See Cloud-Native Geospatial (COG, STAC, Zarr).
  • Digital twins that consume live feeds for simulation and decisions. See Digital Twins and 3D GIS.
  • Near-real-time Earth observation, with more frequent satellite revisits and faster delivery.
  • Machine learning on streams: anomaly detection, forecasting and nowcasting. See AI and Machine Learning in GIS.
  • Privacy-enhancing technologies, such as aggregation, differential privacy and on-device processing, becoming essential.
  • Regulation of location data and IoT security, increasing in many regions.

Final Thoughts

Henri’s painted post told the river authority what the river had done. The radar sensor told them what it was doing. That difference, between knowing the past and watching the present, is why real-time data matters. But the sensor did not save anyone by itself. What saved people was the whole chain around it: a reliable link, a validated reading, a threshold chosen with hydrologists, a map that showed who was at risk and an office that knew what to do next.

If you want to start, pick one stream that interests you. Many cities and agencies publish live feeds: transport positions, air quality, river levels. Read it every minute for a day, store it in a database with a timestamp and a location, and draw it on a map that updates. When you notice a gap, a duplicate or a nonsense value in your own stream, you will have learned the most important lesson in this field: live data is never as clean as it looks.

Where to go next: see how streams feed living models in Digital Twins and 3D GIS, and how modern infrastructure stores and serves the resulting data in Cloud-Native Geospatial (COG, STAC, Zarr).

Rachid Khouri

Rachid Khouri

Rachid Khouri is a CAD, BIM and GIS professional, Autodesk Authorized Developer, trainer and technical author with more than 30 years of experience, working with AutoCAD since 1992. He founded GISauthority.com to share practical guidance on GIS and spatial technologies.