Ignore:
Timestamp:
2017-08-02T23:17:16+02:00 (7 years ago)
Author:
Don-vip
Message:

deprecate LatLon.dms

File:
1 edited

Legend:

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

    r12538 r12561  
    205205     * @param pCoordinate The coordinate to convert
    206206     * @return The coordinate in degrees/minutes/seconds format
    207      */
     207     * @deprecated use {@link #degreesMinutesSeconds} instead
     208     */
     209    @Deprecated
    208210    public static String dms(double pCoordinate) {
     211        return degreesMinutesSeconds(pCoordinate);
     212    }
     213
     214    /**
     215     * Replies the coordinate in degrees/minutes/seconds format
     216     * @param pCoordinate The coordinate to convert
     217     * @return The coordinate in degrees/minutes/seconds format
     218     * @since 12561
     219     */
     220    public static String degreesMinutesSeconds(double pCoordinate) {
    209221
    210222        double tAbsCoord = Math.abs(pCoordinate);
     
    302314        switch(d) {
    303315        case DECIMAL_DEGREES: return cDdFormatter.format(y);
    304         case DEGREES_MINUTES_SECONDS: return dms(y) + ((y < 0) ? SOUTH : NORTH);
     316        case DEGREES_MINUTES_SECONDS: return degreesMinutesSeconds(y) + ((y < 0) ? SOUTH : NORTH);
    305317        case NAUTICAL: return degreesMinutes(y) + ((y < 0) ? SOUTH : NORTH);
    306318        case EAST_NORTH: return cDdFormatter.format(this.getEastNorth().north());
     
    322334        switch(d) {
    323335        case DECIMAL_DEGREES: return cDdFormatter.format(x);
    324         case DEGREES_MINUTES_SECONDS: return dms(x) + ((x < 0) ? WEST : EAST);
     336        case DEGREES_MINUTES_SECONDS: return degreesMinutesSeconds(x) + ((x < 0) ? WEST : EAST);
    325337        case NAUTICAL: return degreesMinutes(x) + ((x < 0) ? WEST : EAST);
    326338        case EAST_NORTH: return cDdFormatter.format(this.getEastNorth().east());
Note: See TracChangeset for help on using the changeset viewer.