AskGeo .NET  1.1.0
AskGeo Libraries for .NET
 All Classes Namespaces Functions Variables Enumerations Pages
Public Member Functions | Static Public Member Functions
AskGeo.Flt.GeneralMap< ResultType > Class Template Reference

All the map classes in AskGeo derive directly or indirectly from GeneralMap. GeneralMap implements the basic functionality shared among all of the maps. More...

Inheritance diagram for AskGeo.Flt.GeneralMap< ResultType >:
AskGeo.Flt.NaturalEarthCountryMap AskGeo.Flt.TimeZoneMap AskGeo.Flt.UsCensusMapBase< ResultType > AskGeo.Flt.UsCensusMapBase-g< UsBlockGroupHighResult > AskGeo.Flt.UsCensusMapBase-g< UsBlockGroupLowResult > AskGeo.Flt.UsCensusMapBase-g< UsCountyHighResult > AskGeo.Flt.UsCensusMapBase-g< UsCountyLowResult > AskGeo.Flt.UsCensusMapBase-g< UsCountySubdivisionHighResult > AskGeo.Flt.UsCensusMapBase-g< UsCountySubdivisionLowResult > AskGeo.Flt.UsCensusMapBase-g< UsPlaceHighResult > AskGeo.Flt.UsCensusMapBase-g< UsPlaceLowResult > AskGeo.Flt.UsCensusMapBase-g< UsStateHighResult > AskGeo.Flt.UsCensusMapBase-g< UsStateLowResult > AskGeo.Flt.UsCensusMapBase-g< UsTractHighResult > AskGeo.Flt.UsCensusMapBase-g< UsTractLowResult > AskGeo.Flt.UsCensusMapBase-g< UsZctaHighResult >

List of all members.

Public Member Functions

abstract ResultType FindResult (float latDeg, float lonDeg)
 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.
List< ResultType > GetAllResults ()
 Returns a Vector of results, each result corresponding to a shape in the map. All result classes extend ResultBase but the specific subclass depends on what map class is being used. Each map class has a companion result class.
void Authorize (String s)
 Authorizes the use of the map object by providing a license String.
void Authorize (Stream stream)
 Authorizes the use of the map object by providing a license file's input stream. The stream is closed upon completion.
abstract String GetOracleName ()
 A unique identifier for this map, used in the license file and in the AskGeo Web API.
float[] GetBbox ()
 Returns the bounding box for this map as a float array. The order of the array is: min latitude, min longitude, max latitude, max longitude.
DataFieldInterface GetDataField (int index)
 Each map contains metadata associated with each shape. The metadata is indexed by an Java-style enum that is defined within each map subclass. All of the Java-style enums implement the DataFieldInterface. Those Java-style enums are exposed through this common interface here.
int GetNumDataFields ()
 Returns the number of data fields associated with this map.

Static Public Member Functions

static float[] GetWorldBbox ()
 Returns a new bounding box encompassing the entire globe (for example, from -180 to +180 degrees longitude and from -90 to +90 degrees latitude). Values are stored in radians.
static float[] GetConusBbox ()
 Returns a new bounding box roughly containing the continental US, or CONUS (i.e., from -125 to -66 degrees longitude and from 24 to 50 degrees latitude).

Detailed Description

All the map classes in AskGeo derive directly or indirectly from GeneralMap. GeneralMap implements the basic functionality shared among all of the maps.

A GeneralMap contains a representation of a map that covers part or all of the Earth. These are defined by a set of polygonal shapes. Each shape represents a geographic entity that might be of interest to the user of the map.

Subclasses of GeneralMap allow the user to query a given latitude and longitude and to get a result back that contains polygonal data that defines the shape, as well as metadata associated with that shape. In some cases, additional metadata that is external to the map but is associated with the shapes in the map is also returned (such as with maps based on data from the US Census Bureau).

In the event that a query point is not inside any of the shapes in the map, a GeneralMap may also snap to a nearby shape and use that to build the result object. Whether or not this is the case, and the distance from the query point to the shape is also returned in the result object.

Template Parameters:
ResultTypeis the generic subclass of ResultBase that defines the return type for a number of the methods in GeneralMap, most notably FindResult.
Type Constraints
ResultType :ResultBase 

Member Function Documentation

template<ResultType >
void AskGeo.Flt.GeneralMap< ResultType >.Authorize ( String  s)

Authorizes the use of the map object by providing a license String.

Parameters:
sthe license String.
template<ResultType >
void AskGeo.Flt.GeneralMap< ResultType >.Authorize ( Stream  stream)

Authorizes the use of the map object by providing a license file's input stream. The stream is closed upon completion.

Parameters:
san input stream to the license file.
template<ResultType >
abstract ResultType AskGeo.Flt.GeneralMap< ResultType >.FindResult ( float  latDeg,
float  lonDeg 
)
pure virtual

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.

Parameters:
latDegthe latitude of the query point, expressed in degrees.
lonDegthe longitude of the query point, expressed in degrees.
Returns:
the result for the given latitude and longitude, or null if none is found.

Implemented in AskGeo.Flt.NaturalEarthCountryMap, AskGeo.Flt.TimeZoneMap, AskGeo.Flt.UsBlockGroupHighMap, AskGeo.Flt.UsBlockGroupLowMap, AskGeo.Flt.UsCountyHighMap, AskGeo.Flt.UsCountyLowMap, AskGeo.Flt.UsCountySubdivisionHighMap, AskGeo.Flt.UsCountySubdivisionLowMap, AskGeo.Flt.UsPlaceHighMap, AskGeo.Flt.UsPlaceLowMap, AskGeo.Flt.UsStateHighMap, AskGeo.Flt.UsStateLowMap, AskGeo.Flt.UsTractHighMap, AskGeo.Flt.UsTractLowMap, and AskGeo.Flt.UsZctaHighMap.

template<ResultType >
List<ResultType> AskGeo.Flt.GeneralMap< ResultType >.GetAllResults ( )

Returns a Vector of results, each result corresponding to a shape in the map. All result classes extend ResultBase but the specific subclass depends on what map class is being used. Each map class has a companion result class.

Returns:
a Vector of results.
template<ResultType >
float [] AskGeo.Flt.GeneralMap< ResultType >.GetBbox ( )

Returns the bounding box for this map as a float array. The order of the array is: min latitude, min longitude, max latitude, max longitude.

Returns:
the bounding box.
template<ResultType >
static float [] AskGeo.Flt.GeneralMap< ResultType >.GetConusBbox ( )
static

Returns a new bounding box roughly containing the continental US, or CONUS (i.e., from -125 to -66 degrees longitude and from 24 to 50 degrees latitude).

Returns:
the bounding box float array (values stored in radians).
template<ResultType >
DataFieldInterface AskGeo.Flt.GeneralMap< ResultType >.GetDataField ( int  index)

Each map contains metadata associated with each shape. The metadata is indexed by an Java-style enum that is defined within each map subclass. All of the Java-style enums implement the DataFieldInterface. Those Java-style enums are exposed through this common interface here.

Parameters:
indexthe index of the data field to return, ranging from 0 to getNumDataFields inclusive.
Returns:
the requested data field.
template<ResultType >
int AskGeo.Flt.GeneralMap< ResultType >.GetNumDataFields ( )

Returns the number of data fields associated with this map.

Returns:
the number of data fields associated with this map.
template<ResultType >
abstract String AskGeo.Flt.GeneralMap< ResultType >.GetOracleName ( )
pure virtual
template<ResultType >
static float [] AskGeo.Flt.GeneralMap< ResultType >.GetWorldBbox ( )
static

Returns a new bounding box encompassing the entire globe (for example, from -180 to +180 degrees longitude and from -90 to +90 degrees latitude). Values are stored in radians.

Returns:
the bounding box float array (values stored in radians).

The documentation for this class was generated from the following file: