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/opendata
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • 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);
Note: See TracChangeset for help on using the changeset viewer.