Ticket #17234: 17234.patch
| File 17234.patch, 1.5 KB (added by , 7 years ago) |
|---|
-
src/org/openstreetmap/josm/plugins/elevation/gpx/ElevationProfile.java
1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.plugins.elevation.gpx; 3 3 4 4 import java.util.ArrayList; 5 5 import java.util.Date; 6 6 import java.util.List; … … 9 9 import org.openstreetmap.josm.data.gpx.WayPoint; 10 10 import org.openstreetmap.josm.plugins.elevation.ElevationHelper; 11 11 import org.openstreetmap.josm.plugins.elevation.IElevationProfile; 12 13 12 13 14 14 /** 15 15 * Base class for an elevation profile. An elevation profile is constructed out 16 16 * of a set of way points. The profile computes min/max/average height from the … … 377 377 */ 378 378 @Override 379 379 public void visitWayPoint(WayPoint wp) { 380 if (wp.getDate().after(end)) { 381 setEnd(wp); 382 } 380 if (wp == null) 381 return; 382 if (wp.getDate() != null) { 383 if (wp.getDate().after(end)) { 384 setEnd(wp); 385 } 383 386 384 if (wp.getDate().before(start)) { 385 setStart(wp); 387 if (wp.getDate().before(start)) { 388 setStart(wp); 389 } 386 390 } 387 388 391 // update boundaries 389 392 if (bounds == null) { 390 393 bounds = new Bounds(wp.getCoor());
