Public Member Functions |
abstract ResultType | FindResult (double latDeg, double 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.
|
double[] | GetBbox () |
| Returns the bounding box for this map as a double 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.
|
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:
-
ResultType | is the generic subclass of ResultBase that defines the return type for a number of the methods in GeneralMap, most notably FindResult. |
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:
-
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.
Implemented in AskGeo.Dbl.NaturalEarthCountryMap, AskGeo.Dbl.TimeZoneMap, AskGeo.Dbl.UsBlockGroupHighMap, AskGeo.Dbl.UsBlockGroupLowMap, AskGeo.Dbl.UsCountyHighMap, AskGeo.Dbl.UsCountyLowMap, AskGeo.Dbl.UsCountySubdivisionHighMap, AskGeo.Dbl.UsCountySubdivisionLowMap, AskGeo.Dbl.UsPlaceHighMap, AskGeo.Dbl.UsPlaceLowMap, AskGeo.Dbl.UsStateHighMap, AskGeo.Dbl.UsStateLowMap, AskGeo.Dbl.UsTractHighMap, AskGeo.Dbl.UsTractLowMap, and AskGeo.Dbl.UsZctaHighMap.