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.

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

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/MicrosoftStreetside/gradle.properties

    r35816 r35978  
    88# Minimum required JOSM version to run this plugin, choose the lowest version possible that is compatible.
    99# You can check if the plugin compiles against this version by executing `./gradlew compileJava_minJosm`.
    10 plugin.main.version=18004
     10plugin.main.version=18494
    1111#plugin.version=
    1212# Version of JOSM against which the plugin is compiled
    1313# Please check, if the specified version is available for download from https://josm.openstreetmap.de/download/ .
    1414# If not, choose the next higher number that is available, or the gradle build will break.
    15 plugin.compile.version=18004
     15plugin.compile.version=18494
    1616plugin.requires=apache-commons;apache-http;utilsplugin2;javafx
    1717
  • 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.