Changeset 35978 in osm for applications/editors/josm


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
Files:
59 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   
  • applications/editors/josm/plugins/CommandLine/build.xml

    r35937 r35978  
    44    <property name="commit.message" value="JOSM/CommandLine: fix exception after JOSM update"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="17749"/>
     6    <property name="plugin.main.version" value="18494"/>
    77
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/CommandLine/src/org/openstreetmap/josm/plugins/commandline/LengthAction.java

    r35976 r35978  
    2020import org.openstreetmap.josm.actions.mapmode.MapMode;
    2121import org.openstreetmap.josm.data.Bounds;
     22import org.openstreetmap.josm.data.coor.ILatLon;
    2223import org.openstreetmap.josm.data.coor.LatLon;
    2324import org.openstreetmap.josm.data.osm.Node;
     
    149150
    150151    private void drawingFinish() {
    151         parentPlugin.loadParameter(String.valueOf(startCoor.greatCircleDistance(endCoor)), true);
     152        parentPlugin.loadParameter(String.valueOf(startCoor.greatCircleDistance((ILatLon) endCoor)), true);
    152153        drawStartPos = null;
    153154        drawing = false;
     
    191192        endCoor = map.mapView.getLatLon(drawEndPos.x, drawEndPos.y);
    192193        if (drawing) {
    193             map.statusLine.setDist(startCoor.greatCircleDistance(endCoor));
     194            map.statusLine.setDist(startCoor.greatCircleDistance((ILatLon) endCoor));
    194195            map.mapView.repaint();
    195196        }
  • applications/editors/josm/plugins/ElevationProfile/build.xml

    r35221 r35978  
    44    <property name="commit.message" value="[josm_elevationprofile]"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="15502"/>
     6    <property name="plugin.main.version" value="18494"/>
    77   
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationHelper.java

    r35964 r35978  
    109109
    110110        // get distance in meters and divide it by 100 in advance
    111         double distInMeter = w1.greatCircleDistance(w2) / 100.0;
     111        double distInMeter = w1.greatCircleDistance((ILatLon) w2) / 100.0;
    112112
    113113        // get elevation (difference)
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/EleVertex.java

    r35165 r35978  
    66import java.util.List;
    77
     8import org.openstreetmap.josm.data.coor.ILatLon;
    89import org.openstreetmap.josm.data.coor.LatLon;
    910import org.openstreetmap.josm.plugins.elevation.ElevationHelper;
     
    4142
    4243        // compute the (approx.!) area of the vertex using heron's formula
    43         double a = p1.greatCircleDistance(p2);
    44         double b = p2.greatCircleDistance(p3);
    45         double c = p1.greatCircleDistance(p3);
     44        double a = p1.greatCircleDistance((ILatLon) p2);
     45        double b = p2.greatCircleDistance((ILatLon) p3);
     46        double c = p1.greatCircleDistance((ILatLon) p3);
    4647
    4748        double s = (a + b + c) / 2D;
     
    5556        int k = 0;
    5657        for (int i = 0; i < points.length; i++) {
    57             EleCoordinate c1 = points[i];
     58            ILatLon c1 = points[i];
    5859
    5960            for (int j = i + 1; j < points.length; j++) {
    60                 EleCoordinate c2 = points[j];
     61                ILatLon c2 = points[j];
    6162                edges[k++] = new TriangleEdge(i, j, c1.greatCircleDistance(c2));
    6263            }
     
    119120
    120121        double z = (c1.getEle() + c2.getEle()) / 2.0;
    121         if (c1.greatCircleDistance(c2) > MIN_DIST) {
     122        if (c1.greatCircleDistance((ILatLon) c2) > MIN_DIST) {
    122123            double hgtZ = ElevationHelper.getSrtmElevation(new LatLon(y, x));
    123124
  • applications/editors/josm/plugins/FastDraw/build.xml

    r35860 r35978  
    44    <property name="commit.message" value="[josm_fastdraw] Fix incorrect settings saving-2"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="18173"/>
     6    <property name="plugin.main.version" value="18494"/>
    77   
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java

    r34949 r35978  
    1010import java.util.Set;
    1111
     12import org.openstreetmap.josm.data.coor.ILatLon;
    1213import org.openstreetmap.josm.data.coor.LatLon;
    1314import org.openstreetmap.josm.gui.MapView;
     
    3839        List<LatLon> pts = getPoints();
    3940        Iterator<LatLon> it1, it2;
    40         LatLon pp1, pp2;
     41        ILatLon pp1, pp2;
    4142        if (pts.size() < 2) return 0;
    4243        it1 = pts.listIterator(0);
     
    368369        if (k > n) k = n;
    369370
    370         LatLon pp1, pp2 = null;
     371        ILatLon pp1, pp2 = null;
    371372        Iterator<LatLon> it1, it2;
    372373        it1 = pts.listIterator(0);
  • applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java

    r35864 r35978  
    560560            // there may be a node with the same coords!
    561561
    562             if (nd != null && p.greatCircleDistance(nd.getCoor()) > 0.01) nd = null;
     562            if (nd != null && p.greatCircleDistance(nd) > 0.01) nd = null;
    563563            if (nd == null) {
    564564                if (i > 0 && p.equals(first)) {
  • applications/editors/josm/plugins/FixAddresses/build.xml

    r34511 r35978  
    44    <property name="commit.message" value="[josm_fixadresses]: Fixes #josm8336"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="14153"/>
     6    <property name="plugin.main.version" value="18494"/>
    77       
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/GuessedValueHandler.java

    r34880 r35978  
    162162
    163163        if (n.hasKey(tag)) {
    164             double dist = n.getCoor().greatCircleDistance(aNode.getCoor());
     164            double dist = n.greatCircleDistance(aNode.getCoor());
    165165            if (dist < minDist && dist < maxDist) {
    166166                minDist = dist;
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OsmUtils.java

    r33718 r35978  
    66
    77import org.openstreetmap.josm.data.Bounds;
     8import org.openstreetmap.josm.data.coor.ILatLon;
    89import org.openstreetmap.josm.data.coor.LatLon;
    910import org.openstreetmap.josm.data.osm.Node;
     
    4546
    4647        for (Pair<Node, Node> pair : x) {
    47             LatLon ap = pair.a.getCoor();
    48             LatLon bp = pair.b.getCoor();
     48            ILatLon ap = pair.a;
     49            ILatLon bp = pair.b;
    4950
    5051            double dist = findMinimum(ap, bp, coor);
     
    6465     * @return the double the minimum distance in m of the way and the node
    6566     */
    66     private static double findMinimum(LatLon a, LatLon b, LatLon c) {
     67    private static double findMinimum(ILatLon a, ILatLon b, ILatLon c) {
    6768        CheckParameterUtil.ensureParameterNotNull(c, "c");
    6869        CheckParameterUtil.ensureParameterNotNull(b, "b");
  • 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    }
  • applications/editors/josm/plugins/NanoLog/build.xml

    r35221 r35978  
    55    <property name="commit.message" value="NanoLog"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="15502"/>
     7    <property name="plugin.main.version" value="18494"/>
    88    <property name="plugin.author" value="Ilya Zverev"/>
    99    <property name="plugin.class" value="nanolog.NanoLogPlugin"/>
  • applications/editors/josm/plugins/NanoLog/src/nanolog/Correlator.java

    r35221 r35978  
    131131        Integer direction = null;
    132132        if (prevWp != null) {
    133             direction = Long.valueOf(Math.round(180.0 / Math.PI * -prevWp.getCoor().bearing(curWp.getCoor()))).intValue();
     133            direction = Long.valueOf(Math.round(180.0 / Math.PI * -prevWp.bearing(curWp))).intValue();
    134134        }
    135135
  • applications/editors/josm/plugins/addrinterpolation/build.xml

    r34487 r35978  
    44    <property name="commit.message" value="Impoved Icon"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="14153"/>
     6    <property name="plugin.main.version" value="18494"/>
    77   
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/addrinterpolation/src/org/openstreetmap/josm/plugins/AddrInterpolation/AddrInterpolationDialog.java

    r34658 r35978  
    826826        for (int segment = 0; segment < nSegments; segment++) {
    827827            Node toNode = addrInterpolationWay.getNode(startNodeIndex + 1 + segment);
    828             segmentLengths[segment] = fromNode.getCoor().greatCircleDistance(toNode.getCoor());
     828            segmentLengths[segment] = fromNode.greatCircleDistance(toNode);
    829829            totalLength += segmentLengths[segment];
    830830
  • applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/AngleSnap.java

    r34850 r35978  
    2525    public final Double addSnap(Node[] nodes) {
    2626        if (nodes.length == 2) {
    27             EastNorth p1 = latlon2eastNorth(nodes[0].getCoor());
    28             EastNorth p2 = latlon2eastNorth(nodes[1].getCoor());
     27            EastNorth p1 = latlon2eastNorth(nodes[0]);
     28            EastNorth p2 = latlon2eastNorth(nodes[1]);
    2929            double heading = p1.heading(p2);
    3030            addSnap(heading);
     
    3838    public final void addSnap(Way way) {
    3939        for (Pair<Node, Node> pair : way.getNodePairs(false)) {
    40             EastNorth a = latlon2eastNorth(pair.a.getCoor());
    41             EastNorth b = latlon2eastNorth(pair.b.getCoor());
     40            EastNorth a = latlon2eastNorth(pair.a);
     41            EastNorth b = latlon2eastNorth(pair.b);
    4242            double heading = a.heading(b);
    4343            addSnap(heading);
  • applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/BuildingsToolsPlugin.java

    r34572 r35978  
    55
    66import org.openstreetmap.josm.data.coor.EastNorth;
     7import org.openstreetmap.josm.data.coor.ILatLon;
    78import org.openstreetmap.josm.data.coor.LatLon;
    89import org.openstreetmap.josm.data.projection.Projection;
     
    1819    public static final Projection MERCATOR = Projections.getProjectionByCode("EPSG:3857"); // Mercator
    1920
    20     public static EastNorth latlon2eastNorth(LatLon p) {
     21    public static EastNorth latlon2eastNorth(ILatLon p) {
    2122        return MERCATOR.latlon2eastNorth(p);
    2223    }
  • applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/DrawBuildingAction.java

    r35929 r35978  
    210210            Node n = MainApplication.getMap().mapView.getNearestNode(mousePos, OsmPrimitive::isUsable);
    211211            if (n != null)
    212                 return latlon2eastNorth(n.getCoor());
     212                return latlon2eastNorth(n);
    213213            IWaySegment<Node, Way> ws = MainApplication.getMap().mapView.getNearestWaySegment(mousePos,
    214214                    OsmPrimitive::isSelectable);
    215215            if (ws != null && ws.getWay().get("building") != null) {
    216                 EastNorth p1 = latlon2eastNorth(ws.getFirstNode().getCoor());
    217                 EastNorth p2 = latlon2eastNorth(ws.getSecondNode().getCoor());
     216                EastNorth p1 = latlon2eastNorth(ws.getFirstNode());
     217                EastNorth p2 = latlon2eastNorth(ws.getSecondNode());
    218218                EastNorth enX = Geometry.closestPointToSegment(p1, p2,
    219219                        latlon2eastNorth(MainApplication.getMap().mapView.getLatLon(mousePos.x, mousePos.y)));
  • applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/ToolSettings.java

    r35915 r35978  
    9898        } else {
    9999            ToolSettings.shape = Shape.RECTANGLE;
    100             return (Shape.RECTANGLE);
     100            return Shape.RECTANGLE;
    101101        }
    102102    }
  • applications/editors/josm/plugins/geochat/build.xml

    r35162 r35978  
    55    <property name="commit.message" value="[josm_geochat] copypaste from keyboard, font size advanced parameters"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="15389"/>
     7    <property name="plugin.main.version" value="18494"/>
    88
    99    <property name="plugin.author" value="Ilya Zverev"/>
  • applications/editors/josm/plugins/geochat/src/geochat/ChatServerConnection.java

    r35162 r35978  
    1919import javax.json.JsonObject;
    2020
     21import org.openstreetmap.josm.data.coor.ILatLon;
    2122import org.openstreetmap.josm.data.coor.LatLon;
    2223import org.openstreetmap.josm.data.coor.conversion.DecimalDegreesCoordinateFormat;
     
    349350            final boolean needReset;
    350351            final boolean needFullReset = lastUserId != userId;
    351             if (needFullReset || (lastPosition != null && pos.greatCircleDistance(lastPosition) > MAX_JUMP)) {
     352            if (needFullReset || (lastPosition != null && pos.greatCircleDistance((ILatLon) lastPosition) > MAX_JUMP)) {
    352353                // reset messages
    353354                lastId = 0;
  • applications/editors/josm/plugins/imagery_offset_db/build.xml

    r34641 r35978  
    55    <property name="commit.message" value="Imagery Offset Database"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="14221"/>
     7    <property name="plugin.main.version" value="18494"/>
    88    <property name="plugin.canloadatruntime" value="true"/>
    99
  • applications/editors/josm/plugins/imagery_offset_db/src/org/openstreetmap/josm/plugins/imagery_offset_db/ImageryOffsetWatcher.java

    r34596 r35978  
    1111import java.util.TreeMap;
    1212
     13import org.openstreetmap.josm.data.coor.ILatLon;
    1314import org.openstreetmap.josm.data.coor.LatLon;
    1415import org.openstreetmap.josm.data.imagery.OffsetBookmark;
     
    151152                setOffsetGood(true);
    152153            } else {
    153                 setOffsetGood(data.lastChecked != null && center.greatCircleDistance(data.lastChecked) <= maxDistance * 1000);
     154                setOffsetGood(data.lastChecked != null && center.greatCircleDistance((ILatLon) data.lastChecked) <= maxDistance * 1000);
    154155            }
    155156        }
     
    264265                    continue;
    265266                }
    266                 LatLon lastPos = new LatLon(dparts[0], dparts[1]);
     267                ILatLon lastPos = new LatLon(dparts[0], dparts[1]);
    267268                if (lastPos.greatCircleDistance(ImageryOffsetTools.getMapCenter()) < Math.max(maxDistance, 3.0) * 1000) {
    268269                    // apply offset
  • applications/editors/josm/plugins/imagery_offset_db/src/org/openstreetmap/josm/plugins/imagery_offset_db/OffsetDialogButton.java

    r34596 r35978  
    2626
    2727import org.openstreetmap.josm.data.coor.EastNorth;
     28import org.openstreetmap.josm.data.coor.ILatLon;
    2829import org.openstreetmap.josm.data.coor.LatLon;
    2930import org.openstreetmap.josm.data.projection.Projection;
     
    6869     */
    6970    public void updateLocation() {
    70         LatLon center = ImageryOffsetTools.getMapCenter();
     71        ILatLon center = ImageryOffsetTools.getMapCenter();
    7172        directionArrow.updateIcon(center);
    7273        double distance = center.greatCircleDistance(offset.getPosition());
     
    151152        Projection proj = ProjectionRegistry.getProjection();
    152153        EastNorth pos = proj.latlon2eastNorth(offset.getPosition());
    153         LatLon correctedCenterLL = proj.eastNorth2latlon(pos.add(-dx, -dy));
     154        ILatLon correctedCenterLL = proj.eastNorth2latlon(pos.add(-dx, -dy));
    154155        double length = correctedCenterLL.greatCircleDistance(offset.getImageryPos());
    155156        double direction = length < 1e-2 ? 0.0 : -correctedCenterLL.bearing(offset.getImageryPos());
     
    261262        }
    262263
    263         public void updateIcon(LatLon from) {
     264        public void updateIcon(ILatLon from) {
    264265            distance = from.greatCircleDistance(to);
    265266            direction = -to.bearing(from);
  • applications/editors/josm/plugins/imagery_offset_db/src/org/openstreetmap/josm/plugins/imagery_offset_db/OffsetInfoAction.java

    r34596 r35978  
    1212import javax.swing.JOptionPane;
    1313
     14import org.openstreetmap.josm.data.coor.ILatLon;
    1415import org.openstreetmap.josm.gui.MainApplication;
    1516import org.openstreetmap.josm.tools.ImageProvider;
     
    8081        StringBuilder sb = new StringBuilder();
    8182        if (offset instanceof ImageryOffset) {
    82             double odist = ((ImageryOffset) offset).getImageryPos().greatCircleDistance(offset.getPosition());
     83            double odist = ((ImageryOffset) offset).getImageryPos().greatCircleDistance((ILatLon) offset.getPosition());
    8384            if (odist < 1e-2) odist = 0.0;
    8485            sb.append(tr("An imagery offset of {0}", ImageryOffsetTools.formatDistance(odist))).append('\n');
     
    8889        }
    8990
    90         double dist = ImageryOffsetTools.getMapCenter().greatCircleDistance(offset.getPosition());
     91        double dist = ImageryOffsetTools.getMapCenter().greatCircleDistance((ILatLon) offset.getPosition());
    9192        sb.append(dist < 50 ? tr("Determined right here") : tr("Determined {0} away",
    9293                ImageryOffsetTools.formatDistance(dist)));
  • applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/CorridorGeography.java

    r32601 r35978  
    44import java.util.Vector;
    55
     6import org.openstreetmap.josm.data.coor.ILatLon;
    67import org.openstreetmap.josm.data.coor.LatLon;
    78import org.openstreetmap.josm.data.osm.DataSet;
     
    1718    private static final double MIN_LENGTH = 10.;
    1819
    19     private void setExtraElements(CorridorPart.ReachableSide side, LatLon from, LatLon to,
     20    private void setExtraElements(CorridorPart.ReachableSide side, ILatLon from, ILatLon to,
    2021            boolean extraWayUp, double minLength) {
    2122        LatLon middleCoor = new LatLon((from.lat() + to.lat())/2.,
     
    2728            middleNode.setCoor(middleCoor);
    2829
    29         LatLon start = from;
     30        ILatLon start = from;
    3031        if (side == CorridorPart.ReachableSide.LEFT) {
    3132            if (middleCoor.lat() < start.lat())
     
    7172
    7273    public void appendNodes(CorridorPart.Type type, CorridorPart.ReachableSide side, String level,
    73             LatLon from, LatLon to, ModelGeography target) {
     74            ILatLon from, ILatLon to, ModelGeography target) {
    7475        if (type == CorridorPart.Type.STAIRS_UP || type == CorridorPart.Type.STAIRS_DOWN) {
    7576            setExtraElements(side, from, to, type == CorridorPart.Type.STAIRS_UP, MIN_LENGTH);
  • applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/ModelGeography.java

    r32601 r35978  
    8585
    8686    public void finishWay(Strip strip, int partIndex, boolean isOuter, String level) {
    87         if (nodes.size() > 0) {
     87        if (!nodes.isEmpty()) {
    8888            CorridorPart part = strip.partAt(partIndex);
    8989            strip.geographyAt(partIndex).appendNodes(part.getType(), part.getSide(), level,
    90                     nodes.elementAt(nodes.size()-1).getCoor(), nodes.elementAt(0).getCoor(), this);
     90                    nodes.elementAt(nodes.size()-1), nodes.elementAt(0), this);
    9191            nodes.add(nodes.elementAt(0));
    9292        }
     
    9898    public void appendCorridorPart(CorridorPart part, CorridorGeography partGeography, int beamIndex, int partIndex,
    9999            String level) {
    100         if (nodes.size() > 0)
     100        if (!nodes.isEmpty())
    101101            partGeography.appendNodes(part.getType(), part.getSide(), level,
    102                     nodes.elementAt(nodes.size()-1).getCoor(),
     102                    nodes.elementAt(nodes.size()-1),
    103103                    beamsGeography.elementAt(beamIndex).coorAt(partIndex), this);
    104104    }
     
    113113                    0, strip.width / 2.));
    114114
    115         if (nodes.size() > 0) {
     115        if (!nodes.isEmpty()) {
    116116            CorridorPart part = strip.partAt(partIndex);
    117117            strip.geographyAt(partIndex).appendNodes(part.getType(), part.getSide(), level,
    118                     nodes.elementAt(nodes.size()-1).getCoor(), nodePool.elementAt(nodePoolCount).getCoor(), this);
     118                    nodes.elementAt(nodes.size()-1), nodePool.elementAt(nodePoolCount), this);
    119119        }
    120120        nodes.add(nodePool.elementAt(nodePoolCount));
     
    183183    private void adjustMultipolygonRelation(IndoorSweeplineModel.Type type, String level) {
    184184        if (members.size() > 1) {
    185             if (wayPool.size() > 0)
     185            if (!wayPool.isEmpty())
    186186                wayPool.elementAt(0).removeAll();
    187187
  • applications/editors/josm/plugins/infomode/build.xml

    r35221 r35978  
    55    <property name="commit.message" value="InfoMode : for shortcurt parser"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="15502"/>
     7    <property name="plugin.main.version" value="18494"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoMode.java

    r35221 r35978  
    289289                    double vel = -1;
    290290                    if (prevWp != null && wp.getTimeInMillis() != prevWp.getTimeInMillis()) {
    291                         vel = wp.getCoor().greatCircleDistance(prevWp.getCoor())/
     291                        vel = wp.greatCircleDistance(prevWp)/
    292292                                (wp.getTime()-prevWp.getTime());
    293293                    }
  • applications/editors/josm/plugins/livegps/src/livegps/AppendableGpxTrackSegment.java

    r35221 r35978  
    3939
    4040        if (size > 0) {
    41             Double distance = wayPoints[size - 1].getCoor().greatCircleDistance(p.getCoor());
    42             if (!distance.isNaN() && !distance.isInfinite()) {
     41            double distance = wayPoints[size - 1].greatCircleDistance(p);
     42            if (!Double.isNaN(distance) && !Double.isInfinite(distance)) {
    4343                length += distance;
    4444            }
  • applications/editors/josm/plugins/measurement/build.xml

    r35221 r35978  
    44    <property name="commit.message" value="recompile dure to core change"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="15502"/>
     6    <property name="plugin.main.version" value="18494"/>
    77    <property name="plugin.canloadatruntime" value="true"/>
    88   
  • applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementDialog.java

    r35976 r35978  
    204204            } else {
    205205                for (Node n : nodes) {
    206                     if (n.getCoor() != null) {
     206                    if (n.isLatLonKnown()) {
    207207                        if (lastNode == null) {
    208208                            lastNode = n;
    209209                        } else {
    210                             length += lastNode.getCoor().greatCircleDistance(n.getCoor());
     210                            length += lastNode.greatCircleDistance(n);
    211211                            segAngle = MeasurementLayer.angleBetween(lastNode, n);
    212212                            lastNode = n;
     
    223223                boolean isCircle = true;
    224224                for (Node n: w.getNodes()) {
    225                     if (lastN != null && lastN.getCoor() != null && n.getCoor() != null) {
    226                         final double segLength = lastN.getCoor().greatCircleDistance(n.getCoor());
     225                    if (lastN != null && lastN.isLatLonKnown() && n.isLatLonKnown()) {
     226                        final double segLength = lastN.greatCircleDistance(n);
    227227                        if (firstSegLength == null) {
    228228                            firstSegLength = segLength;
     
    233233                        length += segLength;
    234234                        //http://local.wasp.uwa.edu.au/~pbourke/geometry/polyarea/
    235                         wayArea += (MeasurementLayer.calcX(n.getCoor()) * MeasurementLayer.calcY(lastN.getCoor()))
    236                                 - (MeasurementLayer.calcY(n.getCoor()) * MeasurementLayer.calcX(lastN.getCoor()));
     235                        wayArea += (MeasurementLayer.calcX(n) * MeasurementLayer.calcY(lastN))
     236                                - (MeasurementLayer.calcY(n) * MeasurementLayer.calcX(lastN));
    237237                        segAngle = MeasurementLayer.angleBetween(lastN, n);
    238238                    }
  • applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java

    r35976 r35978  
    157157     * https://stackoverflow.com/questions/4681737/how-to-calculate-the-area-of-a-polygon-on-the-earths-surface-using-python
    158158     */
    159     public static double calcX(LatLon p1){
     159    public static double calcX(ILatLon p1){
    160160        return p1.lat() * Math.PI * 6367000 / 180;
    161161    }
    162162
    163     public static double calcY(LatLon p1){
     163    public static double calcY(ILatLon p1){
    164164        return p1.lon() * ( Math.PI * 6367000 / 180) * Math.cos(p1.lat() * Math.PI / 180);
    165165    }
    166166
    167167    public static double calcDistance(WayPoint p1, WayPoint p2){
    168         return p1.getCoor().greatCircleDistance(p2.getCoor());
     168        return p1.greatCircleDistance(p2);
    169169    }
    170170
  • applications/editors/josm/plugins/opendata/build.xml

    r35975 r35978  
    11<?xml version="1.0" encoding="utf-8"?>
    22<project name="opendata" default="dist" basedir=".">
    3     <property name="plugin.main.version" value="18464"/>
     3    <property name="plugin.main.version" value="18494"/>
    44    <property name="plugin.author" value="Don-vip"/>
    55    <property name="plugin.class" value="org.openstreetmap.josm.plugins.opendata.OdPlugin"/>
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/NeptuneReader.java

    r34384 r35978  
    2323import javax.xml.validation.Validator;
    2424
     25import org.openstreetmap.josm.data.coor.ILatLon;
    2526import org.openstreetmap.josm.data.coor.LatLon;
    2627import org.openstreetmap.josm.data.osm.DataSet;
     
    239240    }
    240241
    241     protected static final boolean isNullLatLon(LatLon ll) {
     242    protected static boolean isNullLatLon(ILatLon ll) {
    242243        return ll.lat() == 0.0 && ll.lon() == 0.0;
    243244    }
     
    362363            for (RelationMember member : stopArea.getMembers()) {
    363364                // Fix stop coordinates if needed
    364                 if (member.getRole().equals(OSM_PLATFORM) && isNullLatLon(member.getNode().getCoor())) {
     365                if (member.getRole().equals(OSM_PLATFORM) && isNullLatLon(member.getNode())) {
    365366                    member.getNode().setCoor(createLatLon(areaCentroid));
    366367                }
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/tabular/SpreadSheetReader.java

    r34452 r35978  
    253253                        firstNode = n;
    254254                    }
    255                     if (n == firstNode || n.getCoor().greatCircleDistance(firstNode.getCoor())
     255                    if (n == firstNode || n.greatCircleDistance(firstNode)
    256256                            > Config.getPref().getDouble(OdConstants.PREF_TOLERANCE, OdConstants.DEFAULT_TOLERANCE)) {
    257257                        ds.addPrimitive(n);
  • applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfWriter.java

    r35825 r35978  
    1212
    1313import org.openstreetmap.josm.data.DataSource;
    14 import org.openstreetmap.josm.data.coor.LatLon;
    1514import org.openstreetmap.josm.data.osm.DataSet;
    1615import org.openstreetmap.josm.data.osm.Node;
     
    200199                    bi.addId(id - lastid);
    201200                    lastid = id;
    202                     LatLon coor = i.getCoor();
    203                     if (coor != null) {
    204                         int lat = mapDegrees(coor.lat());
    205                         int lon = mapDegrees(coor.lon());
     201                    if (i.isLatLonKnown()) {
     202                        int lat = mapDegrees(i.lat());
     203                        int lon = mapDegrees(i.lon());
    206204                        bi.addLon(lon - lastlon);
    207205                        lastlon = lon;
     
    235233                for (Node i : contents) {
    236234                    long id = i.getUniqueId();
    237                     LatLon coor = i.getCoor();
    238                     int lat = mapDegrees(coor.lat());
    239                     int lon = mapDegrees(coor.lon());
     235                    int lat = mapDegrees(i.lat());
     236                    int lon = mapDegrees(i.lon());
    240237                    Osmformat.Node.Builder bi = Osmformat.Node.newBuilder();
    241238                    bi.setId(id);
     
    385382                    nodes = new NodeGroup();
    386383                }
    387                 if (node.getCoor() != null) {
     384                if (node.isLatLonKnown()) {
    388385                    nodes.add(node);
    389386                    checkLimit();
  • applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustWorker.java

    r35108 r35978  
    77import org.openstreetmap.josm.data.ImageData;
    88import org.openstreetmap.josm.data.coor.EastNorth;
     9import org.openstreetmap.josm.data.coor.ILatLon;
    910import org.openstreetmap.josm.data.coor.LatLon;
    1011import org.openstreetmap.josm.data.projection.ProjectionRegistry;
     
    226227    private void changeDirection(ImageEntry photo, ImageData data,
    227228            MouseEvent evt) {
    228         final LatLon photoLL = photo.getPos();
     229        final ILatLon photoLL = photo.getPos();
    229230        if (photoLL == null) {
    230231            // Direction cannot be set if image doesn't have a position.
  • applications/editors/josm/plugins/public_transport/build.xml

    r35221 r35978  
    55    <property name="commit.message" value="Commit message"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="15502"/>
     7    <property name="plugin.main.version" value="18494"/>
    88
    99    <property name="plugin.author" value="Roland M. Olbricht"/>
  • applications/editors/josm/plugins/public_transport/src/org/openstreetmap/josm/plugins/public_transport/PublicTransportAStar.java

    r34718 r35978  
    7070            double totalDistance = 0;
    7171            for (int i = min; i < max; ++i) {
    72                 totalDistance += way.getNode(i).getCoor().greatCircleDistance(way.getNode(i + 1).getCoor());
     72                totalDistance += way.getNode(i).greatCircleDistance(way.getNode(i + 1));
    7373            }
    7474            return totalDistance;
     
    138138    public double estimateDistance(AStarAlgorithm.Vertex vertex) {
    139139        NodeVertex nodeVertex = (NodeVertex) vertex;
    140         return ((NodeVertex) super.end).node.getCoor()
    141                 .greatCircleDistance(nodeVertex.node.getCoor());
     140        return ((NodeVertex) super.end).node
     141                .greatCircleDistance(nodeVertex.node);
    142142    }
    143143}
  • applications/editors/josm/plugins/public_transport/src/org/openstreetmap/josm/plugins/public_transport/commands/TrackSuggestStopsCommand.java

    r35219 r35978  
    99
    1010import org.openstreetmap.josm.command.Command;
     11import org.openstreetmap.josm.data.coor.ILatLon;
    1112import org.openstreetmap.josm.data.coor.LatLon;
    1213import org.openstreetmap.josm.data.gpx.IGpxTrackSegment;
     
    121122            if (j < k) {
    122123                double dist = 0;
    123                 LatLon latLonI = wayPoints.elementAt(i).getCoor();
     124                ILatLon latLonI = wayPoints.elementAt(i).getCoor();
    124125                for (int l = j; l < k; ++l) {
    125                     double distL = latLonI.greatCircleDistance(wayPoints.elementAt(l).getCoor());
     126                    double distL = latLonI.greatCircleDistance(wayPoints.elementAt(l));
    126127                    if (distL > dist)
    127128                        dist = distL;
     
    148149
    149150            LatLon latLon = wayPoints.elementAt(i).getCoor();
    150             if ((lastStopCoor != null) && (lastStopCoor.greatCircleDistance(latLon) < threshold))
     151            if ((lastStopCoor != null) && (lastStopCoor.greatCircleDistance((ILatLon) latLon) < threshold))
    151152                continue;
    152153
  • applications/editors/josm/plugins/public_transport/src/org/openstreetmap/josm/plugins/public_transport/models/GTFSStopTableModel.java

    r34718 r35978  
    180180        while (iter.hasNext()) {
    181181            Node node = iter.next();
    182             if (coor.greatCircleDistance(node.getCoor()) < 1000) {
     182            if (coor.greatCircleDistance(node) < 1000) {
    183183                nearBusStop = true;
    184184                break;
  • applications/editors/josm/plugins/routing/build.xml

    r35039 r35978  
    55    <property name="commit.message" value="added one-way support in roundabouts"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="14153"/>
     7    <property name="plugin.main.version" value="18494"/>
    88
    99    <property name="plugin.author" value="Jose Vidal &lt;vidalfree@gmail.com&gt;, Juangui Jordán &lt;juangui@gmail.com&gt;, Hassan S &lt;hassan.sabirin@gmail.com&gt;"/>
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/osm/OsmEdge.java

    r32768 r35978  
    4141        this.from = from;
    4242        this.to = to;
    43         this.length = from.getCoor().greatCircleDistance(to.getCoor());
     43        this.length = from.greatCircleDistance(to);
    4444    }
    4545
  • applications/editors/josm/plugins/simplifyarea/build.xml

    r34586 r35978  
    44    <property name="commit.message" value="Initial commit"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="14153"/>
     6    <property name="plugin.main.version" value="18494"/>
    77       
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/simplifyarea/src/org/openstreetmap/josm/plugins/simplifyarea/SimplifyAreaAction.java

    r35976 r35978  
    2929import org.openstreetmap.josm.data.Bounds;
    3030import org.openstreetmap.josm.data.UndoRedoHandler;
     31import org.openstreetmap.josm.data.coor.ILatLon;
    3132import org.openstreetmap.josm.data.coor.LatLon;
    3233import org.openstreetmap.josm.data.osm.Node;
     
    257258                    }
    258259
    259                     final LatLon a = coordMap.get(n1);
    260                     final LatLon b = coordMap.get(n2);
     260                    final ILatLon a = coordMap.get(n1);
     261                    final ILatLon b = coordMap.get(n2);
    261262                   
    262263                    if (a != null && b != null) {
     
    419420    }
    420421
    421     public static double computeConvectAngle(final LatLon coord1, final LatLon coord2, final LatLon coord3) {
     422    public static double computeConvectAngle(final ILatLon coord1, final ILatLon coord2, final ILatLon coord3) {
    422423        final double angle =  Math.abs(heading(coord2, coord3) - heading(coord1, coord2));
    423424        return Math.toDegrees(angle < Math.PI ? angle : 2 * Math.PI - angle);
    424425    }
    425426
    426     public static double computeArea(final LatLon coord1, final LatLon coord2, final LatLon coord3) {
     427    public static double computeArea(final ILatLon coord1, final ILatLon coord2, final ILatLon coord3) {
    427428        final double a = coord1.greatCircleDistance(coord2);
    428429        final double b = coord2.greatCircleDistance(coord3);
     
    437438    public static double R = 6378135;
    438439
    439     public static double crossTrackError(final LatLon l1, final LatLon l2, final LatLon l3) {
     440    public static double crossTrackError(final ILatLon l1, final ILatLon l2, final ILatLon l3) {
    440441        return R * Math.asin(sin(l1.greatCircleDistance(l2) / R) * sin(heading(l1, l2) - heading(l1, l3)));
    441442    }
    442443
    443     public static double heading(final LatLon a, final LatLon b) {
     444    public static double heading(final ILatLon a, final ILatLon b) {
    444445        double hd = Math.atan2(sin(toRadians(a.lon() - b.lon())) * cos(toRadians(b.lat())),
    445446                cos(toRadians(a.lat())) * sin(toRadians(b.lat())) -
  • applications/editors/josm/plugins/terracer/build.xml

    r35975 r35978  
    22<project name="terracer" default="dist" basedir=".">
    33    <property name="commit.message" value="applied #j5760 (patch by robome) - Order of housenumbers not correct"/>
    4     <property name="plugin.main.version" value="18464"/>
     4    <property name="plugin.main.version" value="18494"/>
    55    <property name="plugin.author" value="Matt Amos"/>
    66    <property name="plugin.class" value="org.openstreetmap.josm.plugins.terracer.TerracerPlugin"/>
  • applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/TerracerAction.java

    r35976 r35978  
    3333import org.openstreetmap.josm.data.UndoRedoHandler;
    3434import org.openstreetmap.josm.data.coor.ILatLon;
    35 import org.openstreetmap.josm.data.coor.LatLon;
    3635import org.openstreetmap.josm.data.osm.DataSet;
    3736import org.openstreetmap.josm.data.osm.Node;
     
    572571        for (int i = 0; i < pairs.size(); ++i) {
    573572            Pair<Node, Node> p = pairs.get(i);
    574             final double seg_length = p.a.getCoor().greatCircleDistance(p.b.getCoor());
     573            final double seg_length = p.a.greatCircleDistance(p.b);
    575574            if (l <= seg_length || i == pairs.size() - 1) {
    576575                // be generous on the last segment (numerical roudoff can lead to a small overshoot)
     
    594593        double length = 0.0;
    595594        for (Pair<Node, Node> p : w.getNodePairs(false)) {
    596             length += p.a.getCoor().greatCircleDistance(p.b.getCoor());
     595            length += p.a.greatCircleDistance(p.b);
    597596        }
    598597        return length;
     
    687686        Node a = w.getNode(i);
    688687        Node b = w.getNode((i + 1) % (w.getNodesCount() - 1));
    689         return a.getCoor().greatCircleDistance(b.getCoor());
     688        return a.greatCircleDistance(b);
    690689    }
    691690
  • applications/editors/josm/plugins/tracer/src/org/openstreetmap/josm/plugins/tracer/ConnectWays.java

    r35976 r35978  
    150150
    151151            for (Pair<Node, Node> np : ww.getNodePairs(false)) {
    152                 double dist = TracerGeometry.distanceFromSegment(ll, np.a.getCoor(), np.b.getCoor());
     152                double dist = TracerGeometry.distanceFromSegment(ll, np.a, np.b);
    153153                if (dist < minDist) {
    154154                    minDist = dist;
  • applications/editors/josm/plugins/trustosm/build.xml

    r35762 r35978  
    55    <property name="commit.message" value="trustosm: recompile for compatibility with JOSM r17896" />
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="17896"/>
     7    <property name="plugin.main.version" value="18494"/>
    88    <property name="plugin.author" value="Christoph Wagner" />
    99    <property name="plugin.class" value="org.openstreetmap.josm.plugins.trustosm.TrustOSMplugin" />
  • applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/util/TrustAnalyzer.java

    r34565 r35978  
    9595        Node signedNode = TrustNode.generateNodeFromSigtext(signedPlaintext);
    9696        Node currentNode = (Node) trust.getOsmPrimitive();
    97         double dist = signedNode.getCoor().greatCircleDistance(currentNode.getCoor());
     97        double dist = signedNode.greatCircleDistance(currentNode);
    9898
    9999        /** is distance between signed Node and current Node inside tolerance? */
     
    157157            Node signedNode = signedSegment.get(i);
    158158            Node currentNode = nodes.get(i);
    159             double dist = signedNode.getCoor().greatCircleDistance(currentNode.getCoor());
     159            double dist = signedNode.greatCircleDistance(currentNode);
    160160            if (dist > tolerance) return false;
    161161        }
  • applications/editors/josm/plugins/turnlanes/build.xml

    r34566 r35978  
    55    <property name="commit.message" value="fix toolbar warnings - toolbar still does not work"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="14153"/>
     7    <property name="plugin.main.version" value="18494"/>
    88
    99    <!--
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/GuiContainer.java

    r35812 r35978  
    1818
    1919import org.openstreetmap.josm.data.coor.EastNorth;
    20 import org.openstreetmap.josm.data.coor.LatLon;
     20import org.openstreetmap.josm.data.coor.ILatLon;
    2121import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    2222import org.openstreetmap.josm.plugins.turnlanes.model.Junction;
     
    5353        final Point2D origin = avgOrigin(locs(mc.getPrimaryJunctions()));
    5454
    55         final LatLon originCoor = ProjectionRegistry.getProjection().eastNorth2latlon(new EastNorth(origin.getX(), origin.getY()));
    56         final LatLon relCoor = ProjectionRegistry.getProjection().eastNorth2latlon(
     55        final ILatLon originCoor = ProjectionRegistry.getProjection().eastNorth2latlon(new EastNorth(origin.getX(), origin.getY()));
     56        final ILatLon relCoor = ProjectionRegistry.getProjection().eastNorth2latlon(
    5757                new EastNorth(origin.getX() + 1, origin.getY() + 1));
    5858
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Route.java

    r34976 r35978  
    5252            Node last = nodes.get(0);
    5353            for (Node n : nodes.subList(1, nodes.size())) {
    54                 length += last.getCoor().greatCircleDistance(n.getCoor());
     54                length += last.greatCircleDistance(n);
    5555                last = n;
    5656            }
  • applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/curves/CircleArcMaker.java

    r35624 r35978  
    2222import org.openstreetmap.josm.data.UndoRedoHandler;
    2323import org.openstreetmap.josm.data.coor.EastNorth;
    24 import org.openstreetmap.josm.data.coor.LatLon;
     24import org.openstreetmap.josm.data.coor.ILatLon;
    2525import org.openstreetmap.josm.data.coor.PolarCoor;
    2626import org.openstreetmap.josm.data.osm.DataSet;
     
    108108
    109109        // see #10777: calculate reasonable number of nodes for full circle (copy from CreateCircleAction)
    110         LatLon ll1 = ProjectionRegistry.getProjection().eastNorth2latlon(p1);
    111         LatLon ll2 = ProjectionRegistry.getProjection().eastNorth2latlon(center);
     110        ILatLon ll1 = ProjectionRegistry.getProjection().eastNorth2latlon(p1);
     111        ILatLon ll2 = ProjectionRegistry.getProjection().eastNorth2latlon(center);
    112112
    113113        double radiusInMeters = ll1.greatCircleDistance(ll2);
Note: See TracChangeset for help on using the changeset viewer.