Ignore:
Timestamp:
2022-06-15T20:10:48+02:00 (2 years ago)
Author:
taylor.smock
Message:

See #22115: Extract methods from LatLon into ILatLon where they are generally applicable

This uses the extracted methods where possible, and removes unnecessary
Node#getCoor calls.

Location:
applications/editors/josm/plugins/ColumbusCSV
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/ColumbusCSV/build.xml

    r35948 r35978  
    44    <property name="commit.message" value="Commit message"/>
    55    <!-- Enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="17715"/>
     6    <property name="plugin.main.version" value="18494"/>
    77   
    88    <!-- Plugin meta data -->
  • applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/WayPointHelper.java

    r34496 r35978  
    5959   
    6060    public static double getLonDist(WayPoint w1, WayPoint w2) {
    61         LatLon ll = new LatLon(w1.getCoor().lat(), w2.getCoor().lon());
    62         return w1.getCoor().greatCircleDistance(ll);
     61        LatLon ll = new LatLon(w1.lat(), w2.lon());
     62        return w1.greatCircleDistance(ll);
    6363    }
    6464   
    6565    public static double getLatDist(WayPoint w1, WayPoint w2) {
    66         LatLon ll = new LatLon(w2.getCoor().lat(), w1.getCoor().lon());
    67         return w1.getCoor().greatCircleDistance(ll);
     66        LatLon ll = new LatLon(w2.lat(), w1.lon());
     67        return w1.greatCircleDistance(ll);
    6868    }
    6969   
Note: See TracChangeset for help on using the changeset viewer.