Ignore:
Timestamp:
2022-06-14T20:11:21+02:00 (2 years ago)
Author:
taylor.smock
Message:

see #22104: Remove usages of Node#getCoor where possible

This also accounts for cases where Node has the methods used later,
so a new LatLon is unnecessary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeographicReader.java

    r35975 r35976  
    66import java.awt.Component;
    77import java.awt.GraphicsEnvironment;
    8 import java.awt.Point;
    98import java.io.IOException;
    109import java.io.InputStream;
     
    2524import javax.swing.Icon;
    2625import javax.swing.JOptionPane;
    27 import javax.xml.crypto.dsig.TransformException;
    2826
    2927import org.geotools.geometry.jts.JTS;
     
    3735import org.geotools.util.factory.Hints;
    3836import org.locationtech.jts.geom.LineString;
     37import org.locationtech.jts.geom.Point;
    3938import org.opengis.geometry.MismatchedDimensionException;
    4039import org.opengis.referencing.FactoryException;
     
    4443import org.opengis.referencing.crs.ProjectedCRS;
    4544import org.opengis.referencing.cs.CoordinateSystem;
     45import org.opengis.referencing.datum.Datum;
    4646import org.opengis.referencing.operation.MathTransform;
    4747import org.opengis.referencing.operation.OperationNotFoundException;
     48import org.opengis.referencing.operation.TransformException;
    4849import org.openstreetmap.josm.data.coor.ILatLon;
    4950import org.openstreetmap.josm.data.coor.LatLon;
     
    5455import org.openstreetmap.josm.data.osm.RelationMember;
    5556import org.openstreetmap.josm.data.osm.Way;
    56 import org.openstreetmap.josm.data.projection.datum.Datum;
    5757import org.openstreetmap.josm.data.validation.tests.DuplicateWay;
    5858import org.openstreetmap.josm.gui.ExtendedDialog;
     
    113113            LatLon ll = new LatLon(p.getY(), p.getX());
    114114            for (Node node : nodes.values()) {
    115                 if (node.getCoor().equalsEpsilon(ll, ILatLon.MAX_SERVER_PRECISION)) {
     115                if (node.equalsEpsilon(ll, ILatLon.MAX_SERVER_PRECISION)) {
    116116                    return node;
    117117                }
     
    261261        CoordinateSystem cs2 = crs2.getCoordinateSystem();
    262262        if (!compareDebug("cs", cs1, cs2)) {
    263             Integer dim1 = cs1.getDimension();
    264             Integer dim2 = cs2.getDimension();
     263            int dim1 = cs1.getDimension();
     264            int dim2 = cs2.getDimension();
    265265            if (compareDebug("cs.dim", dim1, dim2)) {
    266266                for (int i = 0; i < dim1; i++) {
     
    397397                }
    398398
    399                 if (candidates.size() > 0) {
     399                if (!candidates.isEmpty()) {
    400400                    CoordinateReferenceSystem newCRS = candidates.get(0);
    401401                    try {
Note: See TracChangeset for help on using the changeset viewer.