IBM Support

What are the semantics of the M coordinate (measure)?

Technote (FAQ)


Question

What are the semantics of the M coordinate (measure)?

Answer

An M coordinate, which is also known as "measure", is an additional value that can be stored for each point of a geometry. Measures allow you to store additional information directly in the geometry. Measures are always numeric and are stored as double precision numbers. They can be positive, negative, or zero. Unlike coordinates, measures are not used in DB2® Spatial Extender to define locations, they are used to convey information required by an application.
Spatial Extender provides the functions ST_FindMeasure() and ST_MeasureBetween() to operate on these values. Any further use of the M coordinates will vary, depending on the application.ST_FindMeasure() finds the part of the given geometry that matches exactly the given M coordinate. ST_MeasureBetween() receives two measure values as input and returns the part of the given geometry that has M coordinate values between the two given measures. Note that for polygons, only the boundary of the polygon is used. Both functions use linear interpolation on line segments to produce the most accurate result.

Here are some possible applications of the M coordinates:

  • When you are collecting information of the movement of a point over time, you can use the M coordinate to store the time information. Each point has its X, Y, and Z coordinates, which identify the physical location of the point on earth. The M coordinate can identify the time when an object, represented by the point, was at a particular physical location. Here are two examples:
    • If you have points identifying the locations where a particular disease has shown up in the population, you can use the M coordinate to identify the date that the outbreak occurred in each location. In this case, the ST_FindMeasure() function is used to find the measure.
    • If you are mapping a bus route, each bus stop is identified as a point, using X, Y, and Z coordinates. You can use an M coordinate to identify the time when the bus should arrive relative to the start of the route. In this case also, the ST_FindMeasure() function is used to find the measure.
  • When you are collecting additional information about a point other than its location or area.
    • If you are mapping the emergency call boxes on a freeway, you can use a linestring to model the freeway and store the information about the call box number in the M coordinates. If you want to get data about how many accidents occurred between call box 15 and call box 32, use the ST_MeasureBetween() function. If you want to collect information about a single point on the freeway, for example, the location of an accident on Highway 85 near call box 32, use the ST_FindMeasure() function.
M coordinates are stored in the same way as X, Y, and Z coordinates. Offset and scale factors (falsem and munits) must be specified for the spatial reference system. Spatial Extender stores the M coordinate values by subtracting the offset from the given DOUBLE value, and multiplying it with the scale factor to compute the resulting INTEGER value.

Document information

More support for: DB2 Spatial Extender for Linux, UNIX and Windows
Spatial Functions

Software version: 9.1, 9.5, 9.7, 10.1

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Reference #: 1054384

Modified date: 04 May 2013


Translate this page: