Ignore:
Timestamp:
2017-09-08T01:04:05+02:00 (2 years ago)
Author:
bastiK
Message:

see #15229 - deprecate Projections#project and Projections#inverseProject

replacement is a bit more verbose, but the fact that Main.proj is
involved need not be hidden

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/Node.java

    r12753 r12778  
    1616import org.openstreetmap.josm.data.osm.visitor.Visitor;
    1717import org.openstreetmap.josm.data.projection.Projecting;
    18 import org.openstreetmap.josm.data.projection.Projections;
    1918import org.openstreetmap.josm.tools.CheckParameterUtil;
    2019import org.openstreetmap.josm.tools.Utils;
     
    142141            invalidateEastNorthCache();
    143142        } else if (eastNorth != null) {
    144             LatLon ll = Projections.inverseProject(eastNorth);
     143            LatLon ll = Main.getProjection().eastNorth2latlon(eastNorth);
    145144            this.lat = ll.lat();
    146145            this.lon = ll.lon();
  • trunk/src/org/openstreetmap/josm/data/osm/NodeData.java

    r12738 r12778  
    22package org.openstreetmap.josm.data.osm;
    33
     4import org.openstreetmap.josm.Main;
    45import org.openstreetmap.josm.data.coor.EastNorth;
    56import org.openstreetmap.josm.data.coor.LatLon;
    67import org.openstreetmap.josm.data.osm.visitor.PrimitiveVisitor;
    7 import org.openstreetmap.josm.data.projection.Projections;
    88
    99/**
     
    8383        // No internal caching of projected coordinates needed. In contrast to getEastNorth()
    8484        // on Node, this method is rarely used. Caching would be overkill.
    85         return Projections.project(getCoor());
     85        return Main.getProjection().latlon2eastNorth(getCoor());
    8686    }
    8787
    8888    @Override
    8989    public void setEastNorth(EastNorth eastNorth) {
    90         setCoor(Projections.inverseProject(eastNorth));
     90        setCoor(Main.getProjection().eastNorth2latlon(eastNorth));
    9191    }
    9292
Note: See TracChangeset for help on using the changeset viewer.