com.askgeo.flt.timezone
Class TimeZoneMap

java.lang.Object
  extended by com.askgeo.flt.base.GeneralMap<TimeZoneResult>
      extended by com.askgeo.flt.timezone.TimeZoneMap

public final class TimeZoneMap
extends GeneralMap<TimeZoneResult>

The TimeZoneMap is a map of the world that returns the Olson time zone ID for any given latitude and longitude.


Nested Class Summary
static class TimeZoneMap.DataField
          Enumerates the metadata associated with each shape in the map.
 
Method Summary
static TimeZoneMap create(java.io.InputStream dataFileStream)
          Static factory method used to construct an instance of this class.
static TimeZoneMap create(java.io.InputStream dataFileStream, float cellsPerDeg, float snapRadiusKm)
          Static factor method used to construct an instance of this class.
 TimeZoneResult findResult(float latDeg, float lonDeg)
          Returns a results map query result.
 java.lang.String getOracleName()
          A unique identifier for this map, used in the license file and in the AskGeo Web API.
static java.lang.String getOracleNameStatic()
          A unique identifier for this map, used in the license file and in the AskGeo Web API.
 
Methods inherited from class com.askgeo.flt.base.GeneralMap
authorize, authorize, authorize, conusBbox, getAllResults, getBbox, getDataField, getNumDataFields, worldBbox
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findResult

public TimeZoneResult findResult(float latDeg,
                                 float lonDeg)
Description copied from class: GeneralMap
Returns a results map query result. All result classes extend ResultBase but the specific subclass returned depends on what map class is being used. Each map class has a companion result class. If no shape is found at or near the query point, null is returned.

Specified by:
findResult in class GeneralMap<TimeZoneResult>
Parameters:
latDeg - the latitude of the query point, expressed in degrees.
lonDeg - the longitude of the query point, expressed in degrees.
Returns:
the result for the given latitude and longitude, or null if none is found.

create

public static TimeZoneMap create(java.io.InputStream dataFileStream)
                          throws java.lang.Exception
Static factory method used to construct an instance of this class.

Parameters:
dataFileStream - an input stream of the companion data file for this class.
Returns:
a instance of this class with default parameters.
Throws:
java.lang.Exception - e if the wrong data file is provided.

create

public static TimeZoneMap create(java.io.InputStream dataFileStream,
                                 float cellsPerDeg,
                                 float snapRadiusKm)
                          throws java.lang.Exception
Static factor method used to construct an instance of this class.

Parameters:
dataFileStream - an input stream of the companion data file for this class.
cellsPerDeg - is the resolution of the spatial index. Testing has show that a suitable value for this parameter is 1.0, which is the default value.
snapRadiusKm - is the maximum snap-to distance for query points not inside any shape on the map.
Returns:
an instance of this class with given parameters.
Throws:
java.lang.Exception - e if the wrong data file is provided.

getOracleNameStatic

public static java.lang.String getOracleNameStatic()
A unique identifier for this map, used in the license file and in the AskGeo Web API.

Returns:
the unique identifier for this map.

getOracleName

public java.lang.String getOracleName()
Description copied from class: GeneralMap
A unique identifier for this map, used in the license file and in the AskGeo Web API.

Specified by:
getOracleName in class GeneralMap<TimeZoneResult>
Returns:
the unique identifier for this map.


Copyright © 2012 Vector Magic, Inc.