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
Files:
3 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
  • trunk/src/org/openstreetmap/josm/data/projection/Projections.java

    r12725 r12778  
    194194     * @return the corresponding east/north coordinates
    195195     * @since 12725
    196      */
     196     * @deprecated use <code>Main.getProjection().latlon2eastNorth(ll)</code>
     197     */
     198    @Deprecated
    197199    public static EastNorth project(ILatLon ll) {
    198200        if (ll == null) return null;
     
    205207     * @param ll the geographical point to convert (in WGS84 lat/lon)
    206208     * @return the corresponding east/north coordinates
    207      */
     209     * @deprecated use <code>Main.getProjection().latlon2eastNorth(ll)</code>
     210     */
     211    @Deprecated
    208212    public static EastNorth project(LatLon ll) {
    209213        return project((ILatLon) ll);
     
    215219     * @param en the geographical point to convert (in projected coordinates)
    216220     * @return the corresponding lat/lon (WGS84)
    217      */
     221     * @deprecated use <code>Main.getProjection().eastNorth2latlon(en)</code>
     222     */
     223    @Deprecated
    218224    public static LatLon inverseProject(EastNorth en) {
    219225        if (en == null) return null;
Note: See TracChangeset for help on using the changeset viewer.