Package slash.navigation.base
Class BaseRoute<P extends BaseNavigationPosition,F extends BaseNavigationFormat<?>>
java.lang.Object
slash.navigation.base.BaseRoute<P,F>
- Direct Known Subclasses:
BcrRoute,CsvRoute,ExcelRoute,GarminFlightPlanRoute,GoPalRoute,GpxRoute,KlickTelRoute,KmlRoute,MagicMapsIktRoute,MSFSFlightPlanRoute,NokiaLandmarkExchangeRoute,OvlRoute,SimpleRoute,TcxRoute,TomTomRoute
public abstract class BaseRoute<P extends BaseNavigationPosition,F extends BaseNavigationFormat<?>>
extends Object
The base of all routes formats.
- Author:
- Christian Pesch
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseRoute(F format, RouteCharacteristics characteristics) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidprotected abstract BcrRouteasBcrFormat(BcrFormat format) protected abstract CsvRouteasCsvFormat(CsvFormat format) protected abstract ExcelRouteasExcelFormat(ExcelFormat format) protected abstract GoPalRouteasGoPalRouteFormat(GoPalRouteFormat<GoPalRoute> format) protected abstract GpxRouteasGpxFormat(GpxFormat format) protected abstract KmlRouteasKmlFormat(BaseKmlFormat format) protected abstract NmeaRouteasNmeaFormat(BaseNmeaFormat format) protected abstract NmnRouteasNmnFormat(NmnFormat format) protected abstract SimpleRoute<?, ?> asPhotoFormat(PhotoFormat format) protected abstract SimpleRoute<?, ?> asSimpleFormat(SimpleFormat<?> format) protected abstract TcxRouteasTcxFormat(TcxFormat format) protected abstract TomTomRouteasTomTomRouteFormat(TomTomRouteFormat format) voidbottom(int index, int bottomOffset) abstract PcreatePosition(Double longitude, Double latitude, Double elevation, Double speed, CompactCalendar time, String description) voidintgetClosestPosition(double longitude, double latitude, double threshold) intgetClosestPosition(CompactCalendar time, long threshold) int[]getContainedPositions(BoundingBox boundingBox) doubledoublegetDistance(int startIndex, int endIndex) doublegetDistanceDifference(int index) double[]getDistancesFromStart(int[] indices) double[]getDistancesFromStart(int startIndex, int endIndex) doublegetElevationAscend(int startIndex, int endIndex) doublegetElevationAscend(int startIndex, int endIndex, double threshold) doublegetElevationDescend(int startIndex, int endIndex) doublegetElevationDescend(int startIndex, int endIndex, double threshold) doublegetElevationDifference(int index) intint[]getInsignificantPositions(double threshold) abstract StringgetName()getPosition(int index) abstract intint[]getPositionsWithinDistanceToPredecessor(double distance) int[]getPositionsWithSpeedBelowOrEqualTo(double kmh) getSuccessor(P position) longgetTime()long[]getTimesFromStart(int[] indices) long[]getTimesFromStart(int startIndex, int endIndex) voidmove(int firstIndex, int secondIndex) voidremove(int index) remove(int fromIndex, int toIndex) voidRemoves duplicate adjacentpositionsfrom this route, leaving only distinct neighboursvoidrevert()voidrevert(int[] indices) voidsetCharacteristics(RouteCharacteristics characteristics) abstract voidvoidshiftTimesAfterPauses(int[] pauseIndicesSortedAscending) voidsort(Comparator<P> comparator) voidtop(int index, int topOffset) toString()
-
Constructor Details
-
Method Details
-
getFormat
-
getCharacteristics
-
getName
-
setName
-
getDescription
-
getPositions
-
getPositionCount
public abstract int getPositionCount() -
top
public void top(int index, int topOffset) -
move
public void move(int firstIndex, int secondIndex) -
bottom
public void bottom(int index, int bottomOffset) -
add
-
remove
-
remove
-
removeDuplicates
public void removeDuplicates()Removes duplicate adjacentpositionsfrom this route, leaving only distinct neighbours -
ensureIncreasingTime
public void ensureIncreasingTime() -
getPositionsWithinDistanceToPredecessor
public int[] getPositionsWithinDistanceToPredecessor(double distance) -
getPositionsWithSpeedBelowOrEqualTo
public int[] getPositionsWithSpeedBelowOrEqualTo(double kmh) -
shiftTimesAfterPauses
public void shiftTimesAfterPauses(int[] pauseIndicesSortedAscending) -
getInsignificantPositions
- Throws:
InterruptedException
-
getClosestPosition
public int getClosestPosition(double longitude, double latitude, double threshold) -
getClosestPosition
-
getPosition
-
getIndex
-
getSuccessor
-
getTime
public long getTime() -
getDistance
public double getDistance() -
getDistance
public double getDistance(int startIndex, int endIndex) -
getDistancesFromStart
public double[] getDistancesFromStart(int startIndex, int endIndex) -
getDistancesFromStart
public double[] getDistancesFromStart(int[] indices) -
getDistanceDifference
public double getDistanceDifference(int index) -
getTimesFromStart
public long[] getTimesFromStart(int startIndex, int endIndex) -
getTimesFromStart
public long[] getTimesFromStart(int[] indices) -
getElevationAscend
public double getElevationAscend(int startIndex, int endIndex) -
getElevationAscend
public double getElevationAscend(int startIndex, int endIndex, double threshold) -
getElevationDescend
public double getElevationDescend(int startIndex, int endIndex) -
getElevationDescend
public double getElevationDescend(int startIndex, int endIndex, double threshold) -
getElevationDifference
public double getElevationDifference(int index) -
sort
-
order
-
revert
public void revert() -
revert
public void revert(int[] indices) -
createPosition
-
asApeMapFormat
-
asColumbusGpsBinaryFormat
-
asColumbusGpsType1Format
-
asColumbusGpsType2Format
-
asColumbusFusionFormat
-
asCoPilot6Format
-
asCoPilot7Format
-
asCoPilot8Format
-
asCoPilot9Format
-
asCsvCommaFormat
-
asCsvSemicolonFormat
-
asFlightradar24Format
-
asFitFormat
-
asGeoJsonFormat
-
asGoogleTimelineFormat
-
asMicrosoftExcel97Format
-
asMicrosoftExcel2008Format
-
asGarminFlightPlanFormat
-
asGlopusFormat
-
asGoogleMapsUrlFormat
-
asGoPal3RouteFormat
-
asGoPal5RouteFormat
-
asGoPal7RouteFormat
-
asGoPalTrackFormat
-
asGoRiderGpsFormat
-
asGpsTunerFormat
-
asGpx10Format
-
asGpx11Format
-
asGroundTrackFormat
-
asHaicomLoggerFormat
-
asGeoHackUrlFormat
-
asIblue747Format
-
asIgo8RouteFormat
-
asPhotoFormat
-
asKienzleGpsFormat
-
asKlickTelRouteFormat
-
asKml20Format
-
asKml21Format
-
asKml22BetaFormat
-
asKml22Format
-
asKmz20Format
-
asKmz21Format
-
asKmz22BetaFormat
-
asKmz22Format
-
asKompassFormat
-
asKurvigerUrlFormat
-
asMagellanExploristFormat
-
asMagellanRouteFormat
-
asMagicMaps2GoFormat
-
asMagicMapsIktFormat
-
asMagicMapsPthFormat
-
asMotoPlanerUrlFormat
-
asMSFSFlightPlanFormat
-
asMTP0607Format
-
asMTP0809Format
-
asNmeaFormat
-
asNmn4Format
-
asNmn5Format
-
asNmn6Format
-
asNmn6FavoritesFormat
-
asNmn7Format
-
asNmnRouteFormat
-
asNmnUrlFormat
-
asNokiaLandmarkExchangeFormat
-
asOvlFormat
-
asQstarzQ1000Format
-
asRoute66Format
-
asRtzFormat
-
asSygicAsciiFormat
-
asSygicUnicodeFormat
-
asTcx1Format
-
asTcx2Format
-
asTomTom5RouteFormat
-
asTomTom8RouteFormat
-
asTomTom95RouteFormat
-
asTourFormat
-
asViaMichelinFormat
-
asWebPageFormat
-
asWintecWbt201Tk1Format
-
asWintecWbt201Tk2Format
-
asWintecWbt202TesFormat
-
toString
-