Ignore:
Timestamp:
2017-11-28T00:56:29+01:00 (4 years ago)
Author:
Don-vip
Message:

see #15310 - remove most of deprecated APIs

Location:
trunk/src/org/openstreetmap/josm/data/coor
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java

    r13140 r13173  
    44import java.io.Serializable;
    55import java.util.Objects;
    6 
    7 import org.openstreetmap.josm.data.osm.BBox;
    86
    97/**
     
    9290    }
    9391
    94     /**
    95      * Creates bbox around this coordinate. Coordinate defines
    96      * center of bbox, its edge will be 2*r.
    97      *
    98      * @param r size
    99      * @return BBox around this coordinate
    100      * @since 6203
    101      * @deprecated use {@link BBox#BBox(double, double, double)} instead
    102      */
    103     @Deprecated
    104     public BBox toBBox(final double r) {
    105         return new BBox(x, y, r);
    106     }
    107 
    10892    @Override
    10993    public int hashCode() {
  • trunk/src/org/openstreetmap/josm/data/coor/ILatLon.java

    r12729 r13173  
    22package org.openstreetmap.josm.data.coor;
    33
    4 import org.openstreetmap.josm.Main;
    54import org.openstreetmap.josm.data.projection.Projecting;
    65
     
    3938
    4039    /**
    41      * <p>Replies the projected east/north coordinates.</p>
    42      *
    43      * <p>Uses the {@link Main#getProjection() global projection} to project the lat/lon-coordinates.</p>
    44      *
    45      * @return the east north coordinates or {@code null} if #is
    46      * @deprecated use {@link #getEastNorth(org.openstreetmap.josm.data.projection.Projecting)}
    47      */
    48     @Deprecated
    49     default EastNorth getEastNorth() {
    50         return getEastNorth(Main.getProjection());
    51     }
    52 
    53     /**
    5440     * Replies the projected east/north coordinates.
    5541     * <p>
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r12873 r13173  
    99import static java.lang.Math.sqrt;
    1010import static org.openstreetmap.josm.data.projection.Ellipsoid.WGS84;
    11 import static org.openstreetmap.josm.tools.I18n.trc;
    1211import static org.openstreetmap.josm.tools.Utils.toRadians;
    1312
     
    1514import java.text.DecimalFormat;
    1615import java.text.NumberFormat;
    17 import java.util.Arrays;
    1816import java.util.Locale;
    1917import java.util.Objects;
     
    2119import org.openstreetmap.josm.Main;
    2220import org.openstreetmap.josm.data.Bounds;
    23 import org.openstreetmap.josm.data.coor.conversion.DMSCoordinateFormat;
    24 import org.openstreetmap.josm.data.coor.conversion.DecimalDegreesCoordinateFormat;
    25 import org.openstreetmap.josm.data.coor.conversion.LatLonParser;
    26 import org.openstreetmap.josm.data.coor.conversion.NauticalCoordinateFormat;
    2721import org.openstreetmap.josm.tools.Logging;
    2822import org.openstreetmap.josm.tools.Utils;
     
    8781
    8882    /**
    89      * Character denoting South, as string.
    90      * @deprecated use {@link LatLonParser#SOUTH}
    91      */
    92     @Deprecated
    93     public static final String SOUTH = trc("compass", "S");
    94     /**
    95      * Character denoting North, as string.
    96      * @deprecated use {@link LatLonParser#NORTH}
    97      */
    98     @Deprecated
    99     public static final String NORTH = trc("compass", "N");
    100     /**
    101      * Character denoting West, as string.
    102      * @deprecated use {@link LatLonParser#WEST}
    103      */
    104     @Deprecated
    105     public static final String WEST = trc("compass", "W");
    106     /**
    107      * Character denoting East, as string.
    108      * @deprecated use {@link LatLonParser#EAST}
    109      */
    110     @Deprecated
    111     public static final String EAST = trc("compass", "E");
    112 
    113     /**
    11483     * Replies true if lat is in the range [-90,90]
    11584     *
     
    185154
    186155    /**
    187      * Replies the coordinate in degrees/minutes/seconds format
    188      * @param pCoordinate The coordinate to convert
    189      * @return The coordinate in degrees/minutes/seconds format
    190      * @deprecated use {@link #degreesMinutesSeconds} instead
    191      */
    192     @Deprecated
    193     public static String dms(double pCoordinate) {
    194         return degreesMinutesSeconds(pCoordinate);
    195     }
    196 
    197     /**
    198      * Replies the coordinate in degrees/minutes/seconds format
    199      * @param pCoordinate The coordinate to convert
    200      * @return The coordinate in degrees/minutes/seconds format
    201      * @since 12561
    202      * @deprecated use {@link DMSCoordinateFormat#degreesMinutesSeconds(double)}
    203      */
    204     @Deprecated
    205     public static String degreesMinutesSeconds(double pCoordinate) {
    206         return DMSCoordinateFormat.degreesMinutesSeconds(pCoordinate);
    207     }
    208 
    209     /**
    210      * Replies the coordinate in degrees/minutes format
    211      * @param pCoordinate The coordinate to convert
    212      * @return The coordinate in degrees/minutes format
    213      * @since 12537
    214      * @deprecated use {@link NauticalCoordinateFormat#degreesMinutes(double)}
    215      */
    216     @Deprecated
    217     public static String degreesMinutes(double pCoordinate) {
    218         return NauticalCoordinateFormat.degreesMinutes(pCoordinate);
    219     }
    220 
    221     /**
    222      * Replies the coordinate in degrees/minutes format
    223      * @param pCoordinate The coordinate to convert
    224      * @return The coordinate in degrees/minutes format
    225      * @deprecated use {@link #degreesMinutes(double)} instead
    226      */
    227     @Deprecated
    228     public static String dm(double pCoordinate) {
    229         return degreesMinutes(pCoordinate);
    230     }
    231 
    232     /**
    233156     * Constructs a new object representing the given latitude/longitude.
    234157     * @param lat the latitude, i.e., the north-south position in degrees
     
    252175    }
    253176
    254     /**
    255      * Formats the latitude part according to the given format
    256      * @param d the coordinate format to use
    257      * @return the formatted latitude
    258      * @deprecated use {@link org.openstreetmap.josm.data.coor.conversion.ICoordinateFormat#latToString(ILatLon)}
    259      */
    260     @Deprecated
    261     public String latToString(CoordinateFormat d) {
    262         return d.getICoordinateFormat().latToString(this);
    263     }
    264 
    265177    @Override
    266178    public double lon() {
    267179        return x;
    268     }
    269 
    270     /**
    271      * Formats the longitude part according to the given format
    272      * @param d the coordinate format to use
    273      * @return the formatted longitude
    274      * @deprecated use {@link org.openstreetmap.josm.data.coor.conversion.ICoordinateFormat#lonToString(ILatLon)}
    275      */
    276     @Deprecated
    277     public String lonToString(CoordinateFormat d) {
    278         return d.getICoordinateFormat().lonToString(this);
    279180    }
    280181
     
    409310
    410311    /**
    411      * Returns this lat/lon pair in human-readable format separated by {@code separator}.
    412      * @param separator values separator
    413      * @return String in the format {@code "1.23456[separator]2.34567"}
    414      * @deprecated method removed without replacement
    415      */
    416     @Deprecated
    417     public String toStringCSV(String separator) {
    418         return Utils.join(separator, Arrays.asList(
    419                 DecimalDegreesCoordinateFormat.INSTANCE.latToString(this),
    420                 DecimalDegreesCoordinateFormat.INSTANCE.lonToString(this)
    421         ));
    422     }
    423 
    424     /**
    425312     * Interpolate between this and a other latlon
    426313     * @param ll2 The other lat/lon object
     
    506393               Double.compare(that.y, y) == 0;
    507394    }
    508 
    509     /**
    510      * Parses the given string as lat/lon.
    511      * @param coord String to parse
    512      * @return parsed lat/lon
    513      * @since 11045
    514      * @deprecated use {@link LatLonParser#parse(java.lang.String)}
    515      */
    516     @Deprecated
    517     public static LatLon parse(String coord) {
    518         return LatLonParser.parse(coord);
    519     }
    520395}
Note: See TracChangeset for help on using the changeset viewer.