Class AbstractCoordinateFormat
- java.lang.Object
-
- org.openstreetmap.josm.data.coor.conversion.AbstractCoordinateFormat
-
- All Implemented Interfaces:
ICoordinateFormat
- Direct Known Subclasses:
DecimalDegreesCoordinateFormat
,DMSCoordinateFormat
,NauticalCoordinateFormat
,ProjectedCoordinateFormat
public abstract class AbstractCoordinateFormat extends java.lang.Object implements ICoordinateFormat
Abstract base class forICoordinateFormat
implementations.- Since:
- 12735
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.text.DecimalFormat
cDdFormatter
The normal number format for server precision coordinatesprotected java.lang.String
displayName
protected static java.lang.String
EAST
Character denoting East, as stringprotected java.lang.String
id
protected static java.lang.String
NORTH
Character denoting North, as stringprotected static java.lang.String
SOUTH
Character denoting South, as stringprotected static java.lang.String
WEST
Character denoting West, as string
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCoordinateFormat(java.lang.String id, java.lang.String displayName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDisplayName()
Get display name for this coordinate formatjava.lang.String
getId()
Get unique id for this coordinate format.static java.text.DecimalFormat
newUnlocalizedDecimalFormat(java.lang.String pattern)
Creates a new unlocalizedDecimalFormat
.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.data.coor.conversion.ICoordinateFormat
latToString, lonToString, toString
-
-
-
-
Field Detail
-
id
protected final java.lang.String id
-
displayName
protected final java.lang.String displayName
-
cDdFormatter
protected static final java.text.DecimalFormat cDdFormatter
The normal number format for server precision coordinates
-
SOUTH
protected static final java.lang.String SOUTH
Character denoting South, as string
-
NORTH
protected static final java.lang.String NORTH
Character denoting North, as string
-
WEST
protected static final java.lang.String WEST
Character denoting West, as string
-
EAST
protected static final java.lang.String EAST
Character denoting East, as string
-
-
Constructor Detail
-
AbstractCoordinateFormat
protected AbstractCoordinateFormat(java.lang.String id, java.lang.String displayName)
-
-
Method Detail
-
newUnlocalizedDecimalFormat
public static java.text.DecimalFormat newUnlocalizedDecimalFormat(java.lang.String pattern)
Creates a new unlocalizedDecimalFormat
. By not using the localized decimal separator, we can present a comma separated list of coordinates.- Parameters:
pattern
- decimal format pattern- Returns:
DecimalFormat
using dot as decimal separator- Since:
- 14203
- See Also:
DecimalFormat.applyPattern(String)
-
getId
public java.lang.String getId()
Description copied from interface:ICoordinateFormat
Get unique id for this coordinate format.- Specified by:
getId
in interfaceICoordinateFormat
- Returns:
- unique id
-
getDisplayName
public java.lang.String getDisplayName()
Description copied from interface:ICoordinateFormat
Get display name for this coordinate format- Specified by:
getDisplayName
in interfaceICoordinateFormat
- Returns:
- display name (localized)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-