AskGeo .NET  1.1.0
AskGeo Libraries for .NET
 All Classes Namespaces Functions Variables Enumerations Pages
Public Member Functions
AskGeo.Flt.ResultBase Class Reference

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...

Inheritance diagram for AskGeo.Flt.ResultBase:
AskGeo.Flt.NaturalEarthCountryResult AskGeo.Flt.TimeZoneResult AskGeo.Flt.UsCensusResultBase AskGeo.Flt.UsBlockGroupHighResult AskGeo.Flt.UsBlockGroupLowResult AskGeo.Flt.UsCountyHighResult AskGeo.Flt.UsCountyLowResult AskGeo.Flt.UsCountySubdivisionHighResult AskGeo.Flt.UsCountySubdivisionLowResult AskGeo.Flt.UsPlaceHighResult AskGeo.Flt.UsPlaceLowResult AskGeo.Flt.UsStateHighResult AskGeo.Flt.UsStateLowResult AskGeo.Flt.UsTractHighResult AskGeo.Flt.UsTractLowResult AskGeo.Flt.UsZctaHighResult

List of all members.

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.

Detailed Description

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).


Member Function Documentation

int AskGeo.Flt.ResultBase.GetAskGeoId ( )

Within each map, every shape has a unique int ID.

Returns:
the ID of the shape from which this result was built.
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

Parameters:
eis a DataField enum value from the public inner enum within the map class from which this result was generated.
Returns:
the string representation of the requested data field.
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.

Returns:
whether the 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.

Returns:
the distance in kilometers between the query point and the shape, along the shortest path between them.
PolygonData AskGeo.Flt.ResultBase.GetPolygonData ( )

Returns the polygon data for the shape from which this result was built

Returns:
the polygon data.
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.

Parameters:
fis a ResultField enum value (either ResultField.AskGeoId, ResultField.IsInside, or ResultField.MinDistanceKm).
Returns:
a string representation of the given result field.
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.

Parameters:
textthe string representation of a float.
Returns:
the float value of this String, or float.NaN if the conversion fails.
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.

Parameters:
texttext the string representation of a float.
altalt the int to return if the parsing fails.
Returns:
the float value of this String, or alt 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.

Returns:
the string representation of the result.

Reimplemented in AskGeo.Flt.UsCensusResultBase.


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