liveBook · Manning

Coordinate

As explained in Digital Twins in Action

A 2D coordinate is an ordered pair of values specifying a position in a two-dimensional coordinate space.

A 2D coordinate is an ordered pair (x, y) that locates a point in a specified reference system. On a floor plan, positions are measured relative to a chosen origin (0, 0). The numbers alone do not establish where the point lies on a real-world map. section 2.5.2

Coordinates make spatial data usable. Sensor positions recorded on a floor plan can be compared with other local positions to find nearby assets, or transformed into global coordinates to place readings on a geolocated model. section 4.1.4 section 7.3.2

To place a local 2D point on a projected map:

  • Identify the local origin, the corresponding map position, and any rotation between site north and true north. section 2.5.2
  • Rotate the point, then translate it by the map coordinates of the origin. A 3 × 3 transformation matrix combines these operations. section 2.5.2
  • Choose a target reference system suited to the area and measurements. A further conversion may be needed when another system expects a different one. section 2.5.2

Find a nearby sensor

Given local positions (0.1, 3) and (0.839, 0.5), calculate their 2D Euclidean distance. The rear garden tap is about 2.6 metres from the first position, so a search with a 5-metre radius includes it. This uses one local coordinate space; it does not require map coordinates. section 4.1.4

Listing 2.8 Using PyProj to simplify transforming UTM coordinates to WGS84
from pyproj import Transformer

transformer = Transformer.from_crs(
  "EPSG:32736",
  "EPSG:4326",
  always_xy=True)

easting, northing = 471519, 7977628
lon, lat = transformer.transform(easting, northing)
print(lon, lat)

The PyProj listing converts a UTM easting and northing in EPSG:32736 to WGS84 longitude and latitude in EPSG:4326. section 2.5.2

A position is not an asset identity. Global coordinates can anchor sensor readings in a 3D scene, but associating those readings with a particular model element may still require matching identifiers or reconciling inconsistent metadata. Where height matters, a 2D position may also need a z-axis. section 7.3.2 section 4.1.4

How Digital Twins in Action covers it

How deep it goes
Works through local origins, matrix-based rotation and translation, library conversion, and 2D distance; notes when height may be needed.
Examples
Uses a rotated floor plan mapped to UTM coordinates, a PyProj conversion, and a home-sensor proximity search.
What it assumes
Defines the local origin before using matrix multiplication and Python examples; assumes enough programming background to follow the listings.
What you can do after
Build it from scratch with a rotation-and-translation matrix, or apply PyProj to convert UTM coordinates to WGS84.
How it connects
Connects coordinates to reference systems, coordinate transformations, spatial data, proximity search, and 3D visualization.

Also explained in

Compare how 5 books explain coordinate →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Digital Twins in Action. The section links point to the parts of the book it draws on.