com.metsci.glimpse.util.geo.format
Class LatLonFormatCompact

java.lang.Object
  extended by com.metsci.glimpse.util.geo.format.LatLonFormatCompact
All Implemented Interfaces:
LatLonFormat, java.lang.Cloneable

public class LatLonFormatCompact
extends java.lang.Object
implements LatLonFormat

LatLonFormat which formats a LatLonGeo as a String containing lat and lon as degrees in decimal form separated by a comma.

Author:
osborn

Constructor Summary
LatLonFormatCompact(int nDecimals)
          Simple constructor.
 
Method Summary
 java.lang.String format(LatLonGeo latLon)
           
 LatLonGeo parse(java.lang.String s)
           
static LatLonGeo parseToLatLonGeo(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LatLonFormatCompact

public LatLonFormatCompact(int nDecimals)
Simple constructor.

Parameters:
nDecimals - number of decimal places to be shown for each of lat and lon (equivalent to using formatString "%.[nDecimals]f")
Method Detail

format

public java.lang.String format(LatLonGeo latLon)
Specified by:
format in interface LatLonFormat

parse

public LatLonGeo parse(java.lang.String s)
                throws LatLonFormatParseException
Specified by:
parse in interface LatLonFormat
Throws:
LatLonFormatParseException

parseToLatLonGeo

public static LatLonGeo parseToLatLonGeo(java.lang.String s)
                                  throws LatLonFormatParseException
Throws:
LatLonFormatParseException


Copyright © 2012 Metron, Inc.. All Rights Reserved.