Changeset 19387 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2025-04-23T18:34:33+02:00 (13 months ago)
- Location:
- trunk/src/org/openstreetmap/josm/data
- Files:
-
- 1 added
- 7 edited
-
ImageData.java (modified) (1 diff)
-
gpx/GpxConstants.java (modified) (2 diffs)
-
gpx/GpxImageCorrelation.java (modified) (10 diffs)
-
gpx/GpxImageCorrelationSettings.java (modified) (4 diffs)
-
gpx/GpxImageDatumSettings.java (added)
-
gpx/GpxImageDirectionPositionSettings.java (modified) (4 diffs)
-
gpx/GpxImageEntry.java (modified) (11 diffs)
-
imagery/street_level/IImageEntry.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/ImageData.java
r19112 r19387 367 367 368 368 /** 369 * Update the GPS track direction of the image and trigger update. 370 * @param img the image to update 371 * @param trackDirection the new GPS track direction 372 * @since 19387 373 */ 374 public void updateImageGpsTrack(ImageEntry img, double trackDirection) { 375 img.setExifGpsTrack(trackDirection); 376 afterImageUpdated(img); 377 } 378 379 /** 380 * Update the image horizontal positioning error and trigger update. 381 * @param img the image to update 382 * @param hposerr the new horizontal positionning error 383 * @since 19387 384 */ 385 public void updateImageHPosErr(ImageEntry img, double hposerr) { 386 img.setExifHPosErr(hposerr); 387 afterImageUpdated(img); 388 } 389 390 /** 391 * Update the image GPS differential mode and trigger update. 392 * @param img the image to update 393 * @param gpsDiffMode the new GPS differential mode 394 * @since 19387 395 */ 396 public void updateImageGpsDiffMode(ImageEntry img, Integer gpsDiffMode) { 397 img.setGpsDiffMode(gpsDiffMode); 398 afterImageUpdated(img); 399 } 400 401 /** 402 * Update the image GPS 2d/3d mode value and trigger update. 403 * @param img the image to update 404 * @param gps2d3dMode the new 2d/3d GPS mode 405 * @since 19387 406 */ 407 public void updateImageGps2d3dMode(ImageEntry img, Integer gps2d3dMode) { 408 img.setGps2d3dMode(gps2d3dMode); 409 afterImageUpdated(img); 410 } 411 412 /** 413 * Update the image GPS DOP value and trigger update. 414 * @param img the image to update 415 * @param exifGpsDop the new GPS DOP value 416 * @since 19387 417 */ 418 public void updateImageExifGpsDop(ImageEntry img, Double exifGpsDop) { 419 img.setExifGpsDop(exifGpsDop); 420 afterImageUpdated(img); 421 } 422 423 /** 424 * Update the image GPS datum and trigger update. 425 * @param img the image to update 426 * @param exifGpsDatum the new datum string value 427 * @since 19387 428 */ 429 public void updateImageExifGpsDatum(ImageEntry img, String exifGpsDatum) { 430 img.setExifGpsDatum(exifGpsDatum); 431 afterImageUpdated(img); 432 } 433 434 /** 435 * Update the image GPS processing method and trigger update. 436 * @param img the image to update 437 * @param exifGpsProcMethod the new GPS processing method 438 * @since 19387 439 */ 440 public void updateImageExifGpsProcMethod(ImageEntry img, String exifGpsProcMethod) { 441 img.setExifGpsProcMethod(exifGpsProcMethod); 442 afterImageUpdated(img); 443 } 444 445 /** 369 446 * Manually trigger the {@link ImageDataUpdateListener#imageDataUpdated(ImageData)} 370 447 */ -
trunk/src/org/openstreetmap/josm/data/gpx/GpxConstants.java
r19316 r19387 146 146 String PT_TIME = "time"; 147 147 148 /** True Course/Bearing angle over ground. 149 * @since 19387 150 */ 151 String PT_COURSE = "course"; 152 148 153 /** Magnetic variation (in degrees) at the point. 0.0 <= value < 360.0 */ 149 154 String PT_MAGVAR = "magvar"; … … 189 194 */ 190 195 List<String> WPT_KEYS = Collections.unmodifiableList(Arrays.asList(PT_ELE, PT_TIME, PT_MAGVAR, PT_GEOIDHEIGHT, 191 GPX_NAME, GPX_CMT, GPX_DESC, GPX_SRC, META_LINKS, PT_SYM, PT_TYPE, 192 PT_ FIX, PT_SAT, PT_HDOP, PT_VDOP, PT_PDOP, PT_AGEOFDGPSDATA, PT_DGPSID, PT_STD_HDEV, PT_STD_VDEV));196 GPX_NAME, GPX_CMT, GPX_DESC, GPX_SRC, META_LINKS, PT_SYM, PT_TYPE, PT_FIX, PT_SAT, PT_COURSE, 197 PT_HDOP, PT_VDOP, PT_PDOP, PT_AGEOFDGPSDATA, PT_DGPSID, PT_STD_HDEV, PT_STD_VDEV)); 193 198 194 199 /** -
trunk/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelation.java
r18494 r19387 2 2 package org.openstreetmap.josm.data.gpx; 3 3 4 import java.util.Arrays; 4 5 import java.util.ArrayList; 5 6 import java.util.Collection; … … 73 74 74 75 final GpxImageDirectionPositionSettings dirpos = settings.getDirectionPositionSettings(); 76 final GpxImageDatumSettings datumSettings = settings.getDatumSettings(); 75 77 final long offset = settings.getOffset(); 76 78 … … 142 144 } 143 145 WayPoint nextWp = i < size - 1 ? wps.get(i + 1) : null; 144 ret += matchPoints(images, prevWp, prevWpTime, curWp, curWpTime, offset, interpolate, tagTime, nextWp, dirpos); 146 ret += matchPoints(images, prevWp, prevWpTime, curWp, curWpTime, offset, 147 interpolate, tagTime, nextWp, dirpos, datumSettings); 145 148 prevWp = curWp; 146 149 prevWpTime = curWpTime; … … 149 152 } 150 153 if (trkTag && prevWp != null) { 151 ret += matchPoints(images, prevWp, prevWpTime, prevWp, prevWpTime, offset, false, trkTagTime, null, dirpos); 154 ret += matchPoints(images, prevWp, prevWpTime, prevWp, prevWpTime, offset, 155 false, trkTagTime, null, dirpos, datumSettings); 152 156 } 153 157 Logging.debug("Correlated {0} total points", ret); … … 210 214 } 211 215 212 private static int matchPoints(List<? extends GpxImageEntry> images, WayPoint prevWp, long prevWpTime, WayPoint curWp, long curWpTime, 213 long offset, boolean interpolate, int tagTime, WayPoint nextWp, GpxImageDirectionPositionSettings dirpos) { 216 static Double getHPosErr(WayPoint wp) { 217 if (wp != null) { 218 if (wp.attr.get(GpxConstants.PT_STD_HDEV) instanceof Float) { 219 Float hposerr = (Float) wp.attr.get(GpxConstants.PT_STD_HDEV); 220 if (hposerr != null) { 221 return hposerr.doubleValue(); 222 } 223 } else if (wp.attr.get(GpxConstants.PT_STD_HDEV) instanceof Double) { 224 Double hposerr = (Double) wp.attr.get(GpxConstants.PT_STD_HDEV); 225 if (hposerr != null) { 226 return hposerr; 227 } 228 } 229 } 230 return null; 231 } 232 233 static Double getGpsDop(WayPoint wp) { 234 if (wp != null) { 235 if (wp.attr.get(GpxConstants.PT_PDOP) != null) { 236 if (wp.attr.get(GpxConstants.PT_PDOP) instanceof Float) { 237 Float pdopvalue = (Float) wp.attr.get(GpxConstants.PT_PDOP); 238 return pdopvalue.doubleValue(); 239 } else if (wp.attr.get(GpxConstants.PT_PDOP) instanceof Double) { 240 Double pdopvalue = (Double) wp.attr.get(GpxConstants.PT_PDOP); 241 return pdopvalue.doubleValue(); 242 } 243 } else if (wp.attr.get(GpxConstants.PT_HDOP) != null) { 244 if (wp.attr.get(GpxConstants.PT_HDOP) instanceof Float) { 245 Float hdopvalue = (Float) wp.attr.get(GpxConstants.PT_HDOP); 246 return hdopvalue.doubleValue(); 247 } else if (wp.attr.get(GpxConstants.PT_HDOP) instanceof Double) { 248 Double hdopvalue = (Double) wp.attr.get(GpxConstants.PT_HDOP); 249 return hdopvalue.doubleValue(); 250 } 251 } 252 } 253 return null; 254 } 255 256 static Double getGpsTrack(WayPoint wp) { 257 if (wp != null) { 258 String trackvalue = wp.getString(GpxConstants.PT_COURSE); 259 Logging.debug("track angle value: {0}", trackvalue); 260 if (!Utils.isEmpty(trackvalue)) { 261 try { 262 return Double.valueOf(trackvalue); 263 } catch (NumberFormatException e) { 264 Logging.warn(e); 265 } 266 } 267 } 268 return null; 269 } 270 271 static String getGpsProcMethod(String prevGpsFixMode, final String curGpsFixMode, 272 final List<String> positioningModes) { 273 String gpsProcMethod = null; 274 Integer lowestProcIndex = null; 275 int lowestGnssModeIdx = 3; // 2d or higher index in positioningModes list are Gnss methods 276 try { 277 lowestProcIndex = Math.min(positioningModes.indexOf(prevGpsFixMode), positioningModes.indexOf(curGpsFixMode)); 278 if (lowestProcIndex < 0) { 279 return null; 280 } 281 gpsProcMethod = "GNSS" + " " + positioningModes.get(lowestProcIndex).toUpperCase() + " " + "CORRELATION"; 282 if (lowestProcIndex < lowestGnssModeIdx) { 283 gpsProcMethod = positioningModes.get(lowestProcIndex).toUpperCase() + " " + "CORRELATION"; 284 } else { 285 gpsProcMethod = "GNSS" + " " + positioningModes.get(lowestProcIndex).toUpperCase() + " " + "CORRELATION"; 286 } 287 gpsProcMethod = gpsProcMethod.replace("FLOAT RTK", "RTK_FLOAT"); 288 gpsProcMethod = gpsProcMethod.replace(" RTK ", " RTK_FIX "); 289 } catch (ArrayIndexOutOfBoundsException ex) { 290 Logging.warn(ex); 291 } 292 return gpsProcMethod; 293 } 294 295 static Integer getGps2d3dMode(String prevGpsFixMode, final String curGpsFixMode, 296 final List<String> positioningModes) { 297 Integer lowestMode = null; 298 lowestMode = Math.min(positioningModes.indexOf(prevGpsFixMode), positioningModes.indexOf(curGpsFixMode)); 299 if (lowestMode > 3) { 300 return 3; 301 } 302 if (lowestMode > 2) { 303 return 2; 304 } 305 return null; 306 } 307 308 // CHECKSTYLE.OFF: ParameterNumber 309 private static int matchPoints(List<? extends GpxImageEntry> 310 images, 311 WayPoint prevWp, 312 long prevWpTime, 313 WayPoint curWp, 314 long curWpTime, 315 long offset, 316 boolean interpolate, 317 int tagTime, 318 WayPoint nextWp, 319 GpxImageDirectionPositionSettings dirpos, 320 GpxImageDatumSettings datumSettings) { 214 321 215 322 final boolean isLast = nextWp == null; … … 237 344 Double speed = null; 238 345 Double prevElevation = null; 346 Double prevHPosErr = null; 347 Double prevGpsDop = null; 348 Double prevGpsTrack = null; 349 String prevGpsFixMode = null; 350 //list of differential GPS mode 351 //TODO move these lists in Gpx.Constants? 352 final List<String> diffMode = Arrays.asList("dgps", "float rtk", "rtk"); 353 final List<String> positioningModes = Arrays.asList("none", "manual", "estimated", "2d", "3d", "dgps", "float rtk", "rtk"); 354 239 355 240 356 if (prevWp != null && interpolate) { … … 245 361 } 246 362 prevElevation = getElevation(prevWp); 363 prevHPosErr = getHPosErr(prevWp); 364 prevGpsDop = getGpsDop(prevWp); 365 prevGpsTrack = getGpsTrack(prevWp); 366 prevGpsFixMode = prevWp.getString(GpxConstants.PT_FIX); 247 367 } 248 368 249 369 final Double curElevation = getElevation(curWp); 370 final Double curHPosErr = getHPosErr(curWp); 371 final Double curGpsDop = getGpsDop(curWp); 372 final Double curGpsTrack = getGpsTrack(curWp); 373 final String curGpsFixMode = curWp.getString(GpxConstants.PT_FIX); 250 374 251 375 if (!interpolate || isLast) { … … 267 391 curTmp.setPos(curWp.getCoor()); 268 392 } 393 //TODO fix this, nextWp doesn't exist here 269 394 if (nextWp != null && dirpos.isSetImageDirection()) { 270 395 double direction = curWp.bearing(nextWp); … … 318 443 curTmp.setElevation(prevElevation + (curElevation - prevElevation) * timeDiff + dirpos.getElevationShift()); 319 444 } 445 446 // Add exif GpsHPositioningerror interpolated value 447 if (curHPosErr != null && prevHPosErr != null) { 448 Double interpolatedValue = prevHPosErr + (curHPosErr - prevHPosErr) * timeDiff; 449 curTmp.setExifHPosErr(Math.round(interpolatedValue*10000)/10000.0); 450 } 451 452 // Add exif GpsDifferentialMode 453 // Get previous and current waypoint differential. As no interpolation is possible, 454 // set differential mode to 0 if any waypoint isn't in differential mode. 455 if (prevGpsFixMode != null) { 456 if (diffMode.contains(prevGpsFixMode) && diffMode.contains(curGpsFixMode)) { 457 curTmp.setGpsDiffMode(1); 458 } else { 459 curTmp.setGpsDiffMode(0); 460 } 461 } 462 463 // Add exif GpsMeasureMode 464 if (prevGpsFixMode != null && curGpsFixMode != null) { 465 Integer gps2d3dMode = getGps2d3dMode(prevGpsFixMode, curGpsFixMode, positioningModes); 466 if (gps2d3dMode != null) { 467 curTmp.setGps2d3dMode(gps2d3dMode); 468 } 469 } 470 471 // Add exif GpsProcessingMethod. As no interpolation is possible, 472 // set processing method to the "lowest" previous and current processing method value. 473 if (prevGpsFixMode != null && curGpsFixMode != null) { 474 String gpsProcMethod = getGpsProcMethod(prevGpsFixMode, curGpsFixMode, positioningModes); 475 if (gpsProcMethod != null) { 476 curTmp.setExifGpsProcMethod(gpsProcMethod); 477 } 478 } 479 480 // Add Exif GpsDop with interpolated GPS DOP value 481 if (curGpsDop != null && prevGpsDop != null) { 482 Double interpolatedValue = prevGpsDop + (curGpsDop - prevGpsDop) * timeDiff; 483 curTmp.setExifGpsDop(Math.round(interpolatedValue*100)/100.0); 484 } 485 486 // Add Exif GpsTrack tag 487 if (dirpos.isSetGpxTrackDirection()) { 488 if (curGpsTrack != null && prevGpsTrack != null) { 489 curTmp.setExifGpsTrack(prevGpsTrack + (curGpsTrack - prevGpsTrack) * timeDiff); 490 } 491 } 492 493 // Add GpsDatum tag 494 if (datumSettings.isSetImageGpsDatum()) { 495 if (diffMode.contains(prevGpsFixMode) && diffMode.contains(curGpsFixMode)) { 496 curTmp.setExifGpsDatum(datumSettings.getImageGpsDatum()); 497 } else //without differential mode, datum is WGS-84 498 curTmp.setExifGpsDatum("WGS-84"); 499 } 500 320 501 curTmp.setGpsTime(curImg.getExifInstant().minusMillis(offset)); 321 502 curTmp.flagNewGpsData(); … … 331 512 return ret; 332 513 } 514 // CHECKSTYLE.ON: ParameterNumber 333 515 334 516 private static double computeDirection(double direction, double angleOffset) { -
trunk/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelationSettings.java
r18065 r19387 13 13 private final boolean forceTags; 14 14 private final GpxImageDirectionPositionSettings directionPositionSettings; 15 private final GpxImageDatumSettings datumSettings; 15 16 16 17 /** … … 20 21 */ 21 22 public GpxImageCorrelationSettings(long offset, boolean forceTags) { 22 this(offset, forceTags, new GpxImageDirectionPositionSettings(false, 0, 0, 0, 0)); 23 this(offset, forceTags, 24 new GpxImageDirectionPositionSettings(false, 0, false, 0, 0, 0), 25 new GpxImageDatumSettings(false, null) 26 ); 23 27 } 24 28 … … 31 35 public GpxImageCorrelationSettings(long offset, boolean forceTags, 32 36 GpxImageDirectionPositionSettings directionPositionSettings) { 37 this(offset, forceTags, directionPositionSettings, 38 new GpxImageDatumSettings(false, null)); 39 } 40 41 /** 42 * Constructs a new {@code GpxImageCorrelationSettings}. 43 * @param offset offset in milliseconds 44 * @param forceTags force tagging of all photos, otherwise prefs are used 45 * @param directionPositionSettings direction/position settings 46 * @param datumSettings GPS datum settings 47 * @since 19387 @datumSettings was added 48 */ 49 public GpxImageCorrelationSettings(long offset, boolean forceTags, 50 GpxImageDirectionPositionSettings directionPositionSettings, 51 GpxImageDatumSettings datumSettings) { 33 52 this.offset = offset; 34 53 this.forceTags = forceTags; 35 54 this.directionPositionSettings = Objects.requireNonNull(directionPositionSettings); 55 this.datumSettings = Objects.requireNonNull(datumSettings); 36 56 } 37 57 38 58 /** 39 59 * Returns the offset in milliseconds. … … 60 80 } 61 81 82 /** 83 * Returns the EXIF metadata datum settings. 84 * @return the EXIF metadata datum settings 85 * @since 19387 86 */ 87 public GpxImageDatumSettings getDatumSettings() { 88 return datumSettings; 89 } 90 62 91 @Override 63 92 public String toString() { 64 93 return "[offset=" + offset + ", forceTags=" + forceTags 65 + ", directionPositionSettings=" + directionPositionSettings + ']'; 94 + ", directionPositionSettings=" + directionPositionSettings 95 + ", datumSettings=" + datumSettings + ']'; 66 96 } 67 97 } -
trunk/src/org/openstreetmap/josm/data/gpx/GpxImageDirectionPositionSettings.java
r18065 r19387 10 10 private final boolean setImageDirection; 11 11 private final double imageDirectionAngleOffset; 12 private final boolean setGpxTrackDirection; 12 13 private final double shiftImageX; 13 14 private final double shiftImageY; … … 18 19 * @param setImageDirection determines if image direction must be set towards the next GPX waypoint 19 20 * @param imageDirectionAngleOffset direction angle offset in degrees 21 * @param setGpxTrackDirection determines if image course direction must be set 20 22 * @param shiftImageX image shift on X axis relative to the direction in meters 21 23 * @param shiftImageY image shift on Y axis relative to the direction in meters 22 24 * @param elevationShift image elevation shift in meters 25 * @since 19387 @setGpsTrackDirection was added 23 26 */ 24 27 public GpxImageDirectionPositionSettings( 25 boolean setImageDirection, double imageDirectionAngleOffset, double shiftImageX, double shiftImageY, double elevationShift) { 28 boolean setImageDirection, double imageDirectionAngleOffset, boolean setGpxTrackDirection, 29 double shiftImageX, double shiftImageY, double elevationShift) { 26 30 this.setImageDirection = setImageDirection; 27 31 this.imageDirectionAngleOffset = imageDirectionAngleOffset; 32 this.setGpxTrackDirection = setGpxTrackDirection; 28 33 this.shiftImageX = shiftImageX; 29 34 this.shiftImageY = shiftImageY; … … 45 50 public double getImageDirectionAngleOffset() { 46 51 return imageDirectionAngleOffset; 52 } 53 54 /** 55 * Determines if GPS course direction must be set. Angle value is from the gpx trace. 56 * @return {@code true} if image GPS course must be set 57 * @since 19387 58 */ 59 public boolean isSetGpxTrackDirection() { 60 return setGpxTrackDirection; 47 61 } 48 62 … … 74 88 public String toString() { 75 89 return "[setImageDirection=" + setImageDirection 76 + ", imageDirectionAngleOffset=" + imageDirectionAngleOffset + ", shiftImageX=" + shiftImageX 77 + ", shiftImageY=" + shiftImageY + ", elevationShift=" + elevationShift + ']'; 90 + ", imageDirectionAngleOffset=" + imageDirectionAngleOffset 91 + ", setImageGpxTrackDirection=" + setGpxTrackDirection 92 + ", shiftImageX=" + shiftImageX 93 + ", shiftImageY=" + shiftImageY 94 + ", elevationShift=" + elevationShift + ']'; 78 95 } 79 96 } -
trunk/src/org/openstreetmap/josm/data/gpx/GpxImageEntry.java
r19320 r19387 33 33 private LatLon exifCoor; 34 34 private Double exifImgDir; 35 private Double exifGpsTrack; 36 private Double exifHPosErr; 37 private Double exifGpsDop; 35 38 private Instant exifTime; 36 39 private Projections cameraProjection = Projections.UNKNOWN; … … 58 61 /** Elevation (altitude) in meters */ 59 62 private Double elevation; 63 /** GPS Differential mode */ 64 private Integer gpsDiffMode; 65 /** GPS Measure mode */ 66 private Integer gps2d3dMode; 67 /** GPS Datum */ 68 private String exifGpsDatum; 69 /** GPS processing method */ 70 private String exifGpsProcMethod; 60 71 /** The time after correlation with a gpx track */ 61 72 private Instant gpsTime; … … 89 100 exifCoor = other.exifCoor; 90 101 exifImgDir = other.exifImgDir; 102 exifGpsTrack = other.exifGpsTrack; 103 exifHPosErr = other.exifHPosErr; 104 gpsDiffMode = other.gpsDiffMode; 105 gps2d3dMode = other.gps2d3dMode; 106 exifGpsDop = other.exifGpsDop; 107 exifGpsDatum = other.exifGpsDatum; 108 exifGpsProcMethod = other.exifGpsProcMethod; 91 109 exifTime = other.exifTime; 92 110 isNewGpsData = other.isNewGpsData; … … 171 189 172 190 /** 191 * Return the GPS Differential mode value. The GPS Differential mode value from the temporary 192 * copy is returned if that copy exists. 193 * @return the differential mode value 194 * @since 19387 195 */ 196 @Override 197 public Integer getGpsDiffMode() { 198 if (tmp != null) 199 return tmp.gpsDiffMode; 200 return gpsDiffMode; 201 } 202 203 /** 204 * Return the GPS 2d or 3d mode value. The GPS mode value form the temporary 205 * copy is returned if that copy exists. 206 * @return the GPS 2d/3d mode value 207 * @since 19387 208 */ 209 @Override 210 public Integer getGps2d3dMode() { 211 if (tmp != null) 212 return tmp.gps2d3dMode; 213 return gps2d3dMode; 214 } 215 216 /** 217 * Return the GPS DOP value. The GPS DOP value from the temporary 218 * copy is returned if that copy exists. 219 * @return the DOP value 220 * @since 19387 221 */ 222 @Override 223 public Double getExifGpsDop() { 224 if (tmp != null) 225 return tmp.exifGpsDop; 226 return exifGpsDop; 227 } 228 229 /** 230 * Return the exif GPS coordinates datum value. 231 * @return The datum value 232 * @since 19387 233 */ 234 @Override 235 public String getExifGpsDatum() { 236 if (tmp != null) 237 return tmp.exifGpsDatum; 238 return exifGpsDatum; 239 } 240 241 /** 242 * Return the exif GPS processing method string 243 * @return the processing method string 244 * @since 19387 245 */ 246 @Override 247 public String getExifGpsProcMethod() { 248 if (tmp != null) 249 return tmp.exifGpsProcMethod; 250 return exifGpsProcMethod; 251 } 252 253 /** 173 254 * Returns the GPS time value. The GPS time value from the temporary copy 174 255 * is returned if that copy exists. … … 272 353 return tmp.exifImgDir; 273 354 return exifImgDir; 355 } 356 357 /** 358 * Convenient way to determine if this entry has a EXIF GPS track angle value, 359 * without the cost of building a defensive copy. 360 * @return {@code true} if this entry has a EXIF track angle value 361 * @since 19387 362 */ 363 @Override 364 public Double getExifGpsTrack() { 365 if (tmp != null) 366 return tmp.exifGpsTrack; 367 return exifGpsTrack; 368 } 369 370 /** 371 * Convenient way to determine if this entry has a EXIF GPS horizontal positionning error value, 372 * without the cost of building a defensive copy. 373 * @return {@code true} if this entry has a EXIF GPS horizontal positionning error value 374 * @since 19387 375 */ 376 @Override 377 public Double getExifHPosErr() { 378 if (tmp != null) 379 return tmp.exifHPosErr; 380 return exifHPosErr; 274 381 } 275 382 … … 347 454 348 455 /** 456 * Sets GPS Differential mode. 457 * @param gpsDiffMode GPS Differential mode 458 * @since 19387 459 */ 460 @Override 461 public void setGpsDiffMode(Integer gpsDiffMode) { 462 this.gpsDiffMode = gpsDiffMode; 463 } 464 465 /** 466 * Sets GPS 2d/3d mode. 467 * @param gps2d3dMode GPS 2d/3d mode value 468 * @since 19387 469 */ 470 @Override 471 public void setGps2d3dMode(Integer gps2d3dMode) { 472 this.gps2d3dMode = gps2d3dMode; 473 } 474 475 /** 476 * Sets GPS DOP value. 477 * @param exifGpsDop GPS DOP value 478 * @since 19387 479 */ 480 @Override 481 public void setExifGpsDop(Double exifGpsDop) { 482 this.exifGpsDop = exifGpsDop; 483 } 484 485 /** 486 * Sets the GPS Datum. 487 * @param exifGpsDatum GPS Datum 488 * @since 19387 489 */ 490 @Override 491 public void setExifGpsDatum(String exifGpsDatum) { 492 this.exifGpsDatum = exifGpsDatum; 493 } 494 495 /** 496 * Sets the GPS Processing Method. 497 * @param exifGpsProcMethod GPS Processing Method 498 * @since 19387 499 */ 500 @Override 501 public void setExifGpsProcMethod(String exifGpsProcMethod) { 502 this.exifGpsProcMethod = exifGpsProcMethod; 503 } 504 505 /** 349 506 * Sets associated file. 350 507 * @param file associated file … … 411 568 public void setExifImgDir(Double exifDir) { 412 569 this.exifImgDir = exifDir; 570 } 571 572 /** 573 * Sets the exif GPS track (move direction angle) 574 * @param exifGpsTrack the exif GPS track angle 575 * @since 19387 576 */ 577 @Override 578 public void setExifGpsTrack(Double exifGpsTrack) { 579 this.exifGpsTrack = exifGpsTrack; 580 } 581 582 /** 583 * Sets the exif horizontal positioning error 584 * @param exifHposErr the Exif horizontal positionning error 585 * @since 19387 586 */ 587 @Override 588 public void setExifHPosErr(Double exifHPosErr) { 589 this.exifHPosErr = exifHPosErr; 413 590 } 414 591 … … 508 685 public int hashCode() { 509 686 return Objects.hash(height, width, isNewGpsData, 510 elevation, exifCoor, exifGpsTime, exifImgDir, exifOrientation, exifTime, 511 iptcCaption, iptcHeadline, iptcKeywords, iptcObjectName, 512 file, gpsTime, pos, speed, tmp, cameraProjection); 687 elevation, exifCoor, exifGpsTime, exifImgDir, exifGpsTrack, exifHPosErr, 688 exifGpsDop, gpsDiffMode, gps2d3dMode, exifGpsDatum, exifGpsProcMethod, 689 exifOrientation, exifTime, iptcCaption, iptcHeadline, iptcKeywords, 690 iptcObjectName, file, gpsTime, pos, speed, tmp, cameraProjection); 513 691 } 514 692 … … 527 705 && Objects.equals(exifGpsTime, other.exifGpsTime) 528 706 && Objects.equals(exifImgDir, other.exifImgDir) 707 && Objects.equals(exifGpsTrack, other.exifGpsTrack) 708 && Objects.equals(exifHPosErr, other.exifHPosErr) 709 && Objects.equals(gpsDiffMode, other.gpsDiffMode) 710 && Objects.equals(gps2d3dMode, other.gps2d3dMode) 711 && Objects.equals(exifGpsDop, other.exifGpsDop) 712 && Objects.equals(exifGpsDatum, other.exifGpsDatum) 713 && Objects.equals(exifGpsProcMethod, other.exifGpsProcMethod) 529 714 && Objects.equals(exifOrientation, other.exifOrientation) 530 715 && Objects.equals(exifTime, other.exifTime) … … 571 756 * temporary variable is deleted. 572 757 * @see #discardTmp() 758 * @since 19387 exifGpsTrack, exifHPosErr, gpsDiffMode, gps2d3dMode, exifGpsDop, exifGpsDatum, exifGpsProcMethod added 573 759 */ 574 760 public void applyTmp() { … … 579 765 gpsTime = tmp.gpsTime; 580 766 exifImgDir = tmp.exifImgDir; 767 exifGpsTrack = tmp.exifGpsTrack; 768 exifHPosErr = tmp.exifHPosErr; 769 gpsDiffMode = tmp.gpsDiffMode; 770 gps2d3dMode = tmp.gps2d3dMode; 771 exifGpsDop = tmp.exifGpsDop; 772 exifGpsDatum = tmp.exifGpsDatum; 773 exifGpsProcMethod = tmp.exifGpsProcMethod; 581 774 isNewGpsData = isNewGpsData || tmp.isNewGpsData; 582 775 tmp = null; -
trunk/src/org/openstreetmap/josm/data/imagery/street_level/IImageEntry.java
r18599 r19387 220 220 221 221 /** 222 * Return the GPS Differential mode value. The differential mode value from the temporary 223 * copy is returned if that copy exists. 224 * @return the fix mode value 225 * @since 19387 226 */ 227 Integer getGpsDiffMode(); 228 229 /** 230 * Return the GPS 2d/3d mode value. The 2d/3d mode value from the temporary 231 * copy is returned if that copy exists. 232 * @return the 2d/3d mode value 233 * @since 19387 234 */ 235 Integer getGps2d3dMode(); 236 237 /** 238 * Return the GPS DOP value. The GPS DOP value from the temporary 239 * copy is return if that copy exists. 240 * @return the GPS DOP value 241 * @since 19387 242 */ 243 Double getExifGpsDop(); 244 245 /** 246 * Return the GPS datum value. The GPS datum value from the temporary 247 * copy is return if that copy exists. 248 * @return the GPS datum value 249 * @since 19387 250 */ 251 String getExifGpsDatum(); 252 253 /** 254 * Return the GPS processing method. The processing method value from the temporary 255 * copy is return if that copy exists. 256 * @return the GPS processing method 257 * @since 19387 258 */ 259 String getExifGpsProcMethod(); 260 261 /** 222 262 * Returns the image direction. The image direction from the temporary 223 263 * copy is returned if that copy exists. … … 225 265 */ 226 266 Double getExifImgDir(); 227 267 268 /** 269 * Returns the image GPS track direction. The GPS track direction from the temporary 270 * copy is returned if that copy exists. 271 * @return the image GPS track direction angle 272 * @since 19387 273 */ 274 Double getExifGpsTrack(); 275 276 /** 277 * Returns the image horizontal positionning error. The image positionning error 278 * from the temporary copy is returned if that copy exists. 279 * @return the image horizontal positionning error 280 * @since 19387 281 */ 282 Double getExifHPosErr(); 283 228 284 /** 229 285 * Convenient way to determine if this entry has a EXIF time, without the cost of building a defensive copy. … … 253 309 254 310 /** 311 * Returns the Exif GPS Time value. The Exif GPS time value from the temporary copy 312 * is returned if that copy exists. 313 * @return the Exif GPS time value 314 * @since 19387 315 */ 316 Instant getExifGpsInstant(); 317 318 /** 255 319 * Returns the IPTC caption. 256 320 * @return the IPTC caption
Note:
See TracChangeset
for help on using the changeset viewer.
