Changeset 1998 in josm for trunk/src


Ignore:
Timestamp:
2009-08-27T14:24:03+02:00 (15 years ago)
Author:
stoecker
Message:

fixed calculation error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java

    r1911 r1998  
    124124                for (WayPoint tpt : trkseg) {
    125125                    if(last != null){
    126                         result += last.getCoor().greatCircleDistance(tpt.getCoor());
     126                        Double d = last.getCoor().greatCircleDistance(tpt.getCoor());
     127                        if(!d.isNaN() && !d.isInfinite())
     128                          result += d;
    127129                    }
    128130                    last = tpt;
Note: See TracChangeset for help on using the changeset viewer.