public static class SampleGridRenderer.WTWDAccumulativeMetric extends Object implements AccumulativeGridSampler.AccumulativeMetric<SampleGridRenderer.WTWD>
Constructor and Description |
---|
WTWDAccumulativeMetric(double cosLat,
double offRoadDistanceMeters,
double offRoadSpeed,
double gridSizeMeters) |
Modifier and Type | Method and Description |
---|---|
boolean |
closeSample(ZSampleGrid.ZSamplePoint<SampleGridRenderer.WTWD> point)
A Generated closing sample take 1) as off-road distance, the minimum of the off-road
distance of all enclosing samples, plus the grid size, and 2) as time the minimum
time of all enclosing samples plus the grid size * off-road walk speed as additional
time.
|
SampleGridRenderer.WTWD |
cumulateSample(org.locationtech.jts.geom.Coordinate C0,
org.locationtech.jts.geom.Coordinate Cs,
SampleGridRenderer.WTWD z,
SampleGridRenderer.WTWD zS,
double offRoadSpeed)
Callback function to handle a new added sample.
|
public WTWDAccumulativeMetric(double cosLat, double offRoadDistanceMeters, double offRoadSpeed, double gridSizeMeters)
public SampleGridRenderer.WTWD cumulateSample(org.locationtech.jts.geom.Coordinate C0, org.locationtech.jts.geom.Coordinate Cs, SampleGridRenderer.WTWD z, SampleGridRenderer.WTWD zS, double offRoadSpeed)
AccumulativeGridSampler.AccumulativeMetric
cumulateSample
in interface AccumulativeGridSampler.AccumulativeMetric<SampleGridRenderer.WTWD>
C0
- The initial position of the sample, as given in the addSample() call.Cs
- The position of the sample on the grid, never farther away than (dX,dY)z
- The z value of the initial sample, as given in the addSample() call.zS
- The previous z value of the sample. Can be null if this is the first time, it's
up to the caller to initialize the z value.offRoadSpeed
- The offroad speed to assume.public boolean closeSample(ZSampleGrid.ZSamplePoint<SampleGridRenderer.WTWD> point)
closeSample
in interface AccumulativeGridSampler.AccumulativeMetric<SampleGridRenderer.WTWD>
point
- The point to set Z.Copyright © 2019. All rights reserved.