001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data.gpx; 003 004/** 005 * Image direction / position modification settings used by {@link GpxImageCorrelationSettings}. 006 * @since 18061 007 */ 008public class GpxImageDirectionPositionSettings { 009 010 private final boolean setImageDirection; 011 private final double imageDirectionAngleOffset; 012 private final double shiftImageX; 013 private final double shiftImageY; 014 private final double elevationShift; 015 016 /** 017 * Constructs a new {@code GpxImageDirectionPositionSettings}. 018 * @param setImageDirection determines if image direction must be set towards the next GPX waypoint 019 * @param imageDirectionAngleOffset direction angle offset in degrees 020 * @param shiftImageX image shift on X axis relative to the direction in meters 021 * @param shiftImageY image shift on Y axis relative to the direction in meters 022 * @param elevationShift image elevation shift in meters 023 */ 024 public GpxImageDirectionPositionSettings( 025 boolean setImageDirection, double imageDirectionAngleOffset, double shiftImageX, double shiftImageY, double elevationShift) { 026 this.setImageDirection = setImageDirection; 027 this.imageDirectionAngleOffset = imageDirectionAngleOffset; 028 this.shiftImageX = shiftImageX; 029 this.shiftImageY = shiftImageY; 030 this.elevationShift = elevationShift; 031 } 032 033 /** 034 * Determines if image direction must be set towards the next GPX waypoint 035 * @return {@code true} if image direction must be set towards the next GPX waypoint 036 */ 037 public boolean isSetImageDirection() { 038 return setImageDirection; 039 } 040 041 /** 042 * Returns direction angle offset in degrees 043 * @return direction angle offset in degrees 044 */ 045 public double getImageDirectionAngleOffset() { 046 return imageDirectionAngleOffset; 047 } 048 049 /** 050 * Returns image shift on X axis relative to the direction in meters 051 * @return image shift on X axis relative to the direction in meters 052 */ 053 public double getShiftImageX() { 054 return shiftImageX; 055 } 056 057 /** 058 * Returns image shift on Y axis relative to the direction in meters 059 * @return image shift on Y axis relative to the direction in meters 060 */ 061 public double getShiftImageY() { 062 return shiftImageY; 063 } 064 065 /** 066 * Returns image elevation shift in meters 067 * @return image elevation shift in meters 068 */ 069 public double getElevationShift() { 070 return elevationShift; 071 } 072 073 @Override 074 public String toString() { 075 return "[setImageDirection=" + setImageDirection 076 + ", imageDirectionAngleOffset=" + imageDirectionAngleOffset + ", shiftImageX=" + shiftImageX 077 + ", shiftImageY=" + shiftImageY + ", elevationShift=" + elevationShift + ']'; 078 } 079}