Ignore:
Timestamp:
2022-06-15T20:10:48+02:00 (3 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideLayer.java

    r35601 r35978  
    2323import org.apache.log4j.Logger;
    2424import org.openstreetmap.josm.data.Bounds;
     25import org.openstreetmap.josm.data.coor.ILatLon;
    2526import org.openstreetmap.josm.data.osm.DataSet;
    2627import org.openstreetmap.josm.data.osm.event.DataChangedEvent;
     
    462463      .filter(img -> // Filters out images too far away from target
    463464        img != null &&
    464         img.getMovingLatLon().greatCircleDistance(target.getMovingLatLon())
     465        img.getMovingLatLon().greatCircleDistance((ILatLon) target.getMovingLatLon())
    465466          < StreetsideProperties.SEQUENCE_MAX_JUMP_DISTANCE.get()
    466467       )
     
    501502    public int compare(StreetsideAbstractImage img1, StreetsideAbstractImage img2) {
    502503      return (int) Math.signum(
    503         img1.getMovingLatLon().greatCircleDistance(target.getMovingLatLon()) -
    504         img2.getMovingLatLon().greatCircleDistance(target.getMovingLatLon())
     504        img1.getMovingLatLon().greatCircleDistance((ILatLon) target.getMovingLatLon()) -
     505        img2.getMovingLatLon().greatCircleDistance((ILatLon) target.getMovingLatLon())
    505506      );
    506507    }
Note: See TracChangeset for help on using the changeset viewer.