Curve order – Pitney Bowes MapXtreme User Manual

Page 385

Advertising
background image

Chapter 21: Linear Referencing

Curve Order

MapXtreme v7.1

392

Developer Guide

Dynamic Segmentation Operation (PerpendicularOffset)

Perpendicular offset is an operation that produces a new MultiCurve from an existing one. This is
different from the above methods that extract a sub-curve with the same underlying x,y coordinates.
This operation creates a parallel offset MultiCurve that is some distance measured perpendicularly
from the original MultiCurve. This new MultiCurve can then be further acted upon, such as querying
its attributes and analyzing the results.

PerpendicularOffset is used in the field of dynamic segmentation for a linear network whereby you
can subdivide a MultiCurve into segments based on M values. For example, a road construction
application would use the M values of a road network that describe the status of sections of a
highway under construction or repair. Each segment can be displayed on a map, offset from the
actual road, with a distinct color code or marking to indicate at a glance its status. For an example of
a dynamic segmentation application using Perpendicular, see

Linear Referencing Sample

Application

.

The following is the syntax of the PerpendicularOffset() method:

PerpendicularOffset(MultiCurve, double distance)

PerpendicularOffset(MultiCurve, double distance, DistanceUnit, int resolution)

A distance value that is positive will be interpreted as a perpendicular direction to the right of the line
when traversing in the order of the nodes (e.g., node i to node i+1). A negative distance would be to
the left. A distance of zero is not allowed.

The resolution is used to interpolate points along the arcs created for rounding corners. Values of 0
or larger are supported, up to an including 36. The default value is 1.

This operation preserves the measure values, if present, of the original MultiCurve. Elevation (Z)
values from the original MultiCurve are not preserved.

Curve Order

The MapInfo.LinearReferencing namespace includes the ICurveSorter interface to handle the sort
order of individual curves that make up a MultiCurve. Sort order is important when you are calling
any of the following linear referencing operations:

CalculateMissingMeasures

SetMeasures

SetMeasuresAsDistance

LocateAlong

LocateMeasure

LocateBetween

Without specifying a sort order, MapXtreme returns the longest curve first, while the remaining
curves are returned in an unknown order. When using CalculateMissingMeasures on an unordered
MultiCurve, for example, MapXtreme could calculate the wrong M values for a node based on its
position in the MultiCurve. Providing the correct sort order would eliminate that problem.

Advertising