AskGeo .NET
1.1.0
AskGeo Libraries for .NET
|
The base class of all result classes. Each subclass of GeneralMap has a companion result class that is itself a subclass of ResultBase. Those result classes are what are returned when a map is queried. More...
Public Member Functions | |
override String | ToString () |
The string representation of a result is a tab-separated concatenation of all the data fields. | |
PolygonData | GetPolygonData () |
Returns the polygon data for the shape from which this result was built | |
int | GetAskGeoId () |
Within each map, every shape has a unique int ID. | |
bool | GetIsInside () |
Query points that are not within any of the shapes in the map will snap-to the nearest shape if that shape is within a specified snap-to radius. This method returns whether the this particular query point was inside the shape from which this result was built. | |
float | GetMinDistanceKm () |
Query points that are not within any of the shapes in the map will snap-to the nearest shape if that shape is within a specified snap-to radius. If the query point was inside the shape, this method returns zero. If the query point was outside the shape, this method returns the smallest distance (in km) along the surface of the globe between the query point and the outer boundary of the shape. | |
String | GetResultField (DataFieldInterface f) |
The AskGeo ID, the isInside bool, and the minDistanceKm may be accessed by the direct accessors getAskGeoId, getIsInside, and getMinDistanceKm. They may also be accessed by using this method with the ResultField enum. | |
String | GetDataField (DataFieldInterface e) |
Each map has metadata associated with each shape. That metadata is returned with results built from that shape. This method gives access to that metadata using a DataField enum. Each map has an public inner enum called DataField. Passing | |
float | ParseFloatOrNan (String text) |
All data fields are stored as strings but many are more useful as numbers. This method converts a String to a float. If the conversion fails, float.NaN is returned. | |
int | ParseIntOrElse (String text, int alt) |
All data fields are stored as strings but many are more useful as numbers. This method converts a String to an int. If the conversion fails, alt is returned. |
The base class of all result classes. Each subclass of GeneralMap has a companion result class that is itself a subclass of ResultBase. Those result classes are what are returned when a map is queried.
Maps may be configured so that if a given query point does not lie inside any of the shapes in the map, then it will snap to a nearby shape if it is within a specified distance of the query point. The getIsInside method return whether the query point was inside the shape or not, and the getMinDistanceKm method returns the distance from the query point to the shape in kilometers (or zero if it is inside the shape).
int AskGeo.Flt.ResultBase.GetAskGeoId | ( | ) |
Within each map, every shape has a unique int ID.
String AskGeo.Flt.ResultBase.GetDataField | ( | DataFieldInterface | e | ) |
Each map has metadata associated with each shape. That metadata is returned with results built from that shape. This method gives access to that metadata using a DataField enum. Each map has an public inner enum called DataField. Passing
e | is a DataField enum value from the public inner enum within the map class from which this result was generated. |
bool AskGeo.Flt.ResultBase.GetIsInside | ( | ) |
Query points that are not within any of the shapes in the map will snap-to the nearest shape if that shape is within a specified snap-to radius. This method returns whether the this particular query point was inside the shape from which this result was built.
float AskGeo.Flt.ResultBase.GetMinDistanceKm | ( | ) |
Query points that are not within any of the shapes in the map will snap-to the nearest shape if that shape is within a specified snap-to radius. If the query point was inside the shape, this method returns zero. If the query point was outside the shape, this method returns the smallest distance (in km) along the surface of the globe between the query point and the outer boundary of the shape.
PolygonData AskGeo.Flt.ResultBase.GetPolygonData | ( | ) |
Returns the polygon data for the shape from which this result was built
String AskGeo.Flt.ResultBase.GetResultField | ( | DataFieldInterface | f | ) |
The AskGeo ID, the isInside bool, and the minDistanceKm may be accessed by the direct accessors getAskGeoId, getIsInside, and getMinDistanceKm. They may also be accessed by using this method with the ResultField enum.
f | is a ResultField enum value (either ResultField.AskGeoId, ResultField.IsInside, or ResultField.MinDistanceKm). |
float AskGeo.Flt.ResultBase.ParseFloatOrNan | ( | String | text | ) |
All data fields are stored as strings but many are more useful as numbers. This method converts a String to a float. If the conversion fails, float.NaN is returned.
text | the string representation of a float. |
int AskGeo.Flt.ResultBase.ParseIntOrElse | ( | String | text, |
int | alt | ||
) |
All data fields are stored as strings but many are more useful as numbers. This method converts a String to an int. If the conversion fails, alt is returned.
text | text the string representation of a float. |
alt | alt the int to return if the parsing fails. |
override String AskGeo.Flt.ResultBase.ToString | ( | ) |
The string representation of a result is a tab-separated concatenation of all the data fields.
Reimplemented in AskGeo.Flt.UsCensusResultBase.