Class CalibrateMode
- java.lang.Object
-
- com.supermap.data.Enum
-
- com.supermap.data.CalibrateMode
-
public final class CalibrateMode extends Enum
Defines the calibration types for M values of the LineM objects.Calibrate routing needs at least 2 reference points. The two points nearest to the vertex will be used for the calibration.
-
-
Field Summary
Fields Modifier and Type Field and Description static CalibrateMode
BYDISTANCE
Calibrate by distance.static CalibrateMode
BYMEASURE
Calibrate by measure.
-
-
-
Field Detail
-
BYDISTANCE
public static final CalibrateMode BYDISTANCE
Calibrate by distance.Calibrate by distance uses the distance between two points along the route to calculate the M value. The distance here is the Euclidean distance. A monotonous calibration result will got from this method, that means the result M values will be ascending or decreasing. As shown below:
-
The coordinates of the nodes and reference points on the route is as the following:
- For node a1, calculate the distance (d1) between c1 and c2, then calculate the calibrate rate R1=d1/(200-100).Note that the distance mentioned here refers to the distance along the line.
- Then calculate the distance (d2) between a1 and c1, then d2/(100-Ma1)= R1, the M value after calibrate a1 is 100 - d2/R1;
- Calibrate a2 with c1 and c2, calculate the distance (d3) between c1 and a2, then calculate the calibrate rate R2 = d1/(200-100), then d3/(Ma2-100)=R1, the M value of a2 is: 100+d3/R1;
- Calibrate a3 with c2 and c3, calibrate a4 and a5 with c3 and c4. Note that the calibration rate is calculated with the closet two points;
- The M values are shown below.
-
-
BYMEASURE
public static final CalibrateMode BYMEASURE
Calibrate by measure.Use the measure value of the reference on the route to calibrate the M value. This method can keep the changing rule of the measure values (such and ascending or decreasing unequally). This method is very suited for the minor calibrating of measure values when the ratio of the length of the route been calibrated to the measure value are different.
-
The table below shows the route nodes, the coordinate of the reference points and the reference point M value on the route.
- Calibrate a1 with c1 and c2. Calculate the calibrate rate of the M value, R1=(37.5-10)/(200-100);
- (10-0)/(100-Ma1)= R1, the M value is 100 - (10-0)/R1;
- Calibrate a2 with c1 and c2. Calculate the calibrate rate R2 =(37.5-10)/(200-100), (20-10)/(Ma2-100)= R2, the M value after calculated is 100+(20-10)/R2;
- Calibrate a2 with c1 and c2, calibrate a3 with c2 and c3, calibrate a4 and a5 with c3 and c4. Note that the calibration rate is calculated with the closet two points;
- The M values are shown below.
-
-
-