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

Represents the raw polygonal data of a geographic shape on a map. The PolygonData is the only form of geographic data that can be queried from the subclasses of GeneralMap, so if you are wanting to work with the raw shapes, this is the class that you will be interfacing with. More...

List of all members.

Public Member Functions

int GetNumNodes ()
 Returns a count of the total number of nodes (vertexes) in this shape.
double GetMinLatitudeDeg ()
 Returns the lower bound latitude in degrees from the bounding box.
double GetMaxLatitudeDeg ()
 Returns the upper bound latitude in degrees from the bounding box.
double GetMinLongitudeDeg ()
 Returns the lower bound longitude in degrees from the bounding box.
double GetMaxLongitudeDeg ()
 Returns the upper bound longitude in degrees from the bounding box.
int GetNumParts ()
 Returns the number of parts in the polygon data. Each part is one of the closed polygonal chains that define the shape.
int GetNumVertexes (int partIndex)
 Returns the number of vertexes in the given part.
double GetVertexLatitudeDeg (int partIndex, int vertexIndex)
 Returns the latitude in degrees of the given vertex.
double GetVertexLongitudeDeg (int partIndex, int vertexIndex)
 Returns the longitude in degrees of the given vertex.
double ComputeAreaSqKm ()
 Computes the approximate area in square kilometers.

Detailed Description

Represents the raw polygonal data of a geographic shape on a map. The PolygonData is the only form of geographic data that can be queried from the subclasses of GeneralMap, so if you are wanting to work with the raw shapes, this is the class that you will be interfacing with.

Geographic shapes in AskGeo are described as complex polygons. By this, we mean the union of multiple closed polygonal chains of latitude and longitude vertexes. Counter-clockwise polygonal chains count as positive area, adding to the shape. Clockwise polygonal chains count as negative area, subtracting from positive areas to create cut-outs.

PolygonData objects are not intended to be created by the user. Rather, they are created by a Multigon as an internal operation in constructing a subclass of ResultBase. So to access a PolygonData object, you should query a map with FindResult(), which will return a subclass of ResultBase, which has an accessor getPolygonData that will return the corresponding shape's PolygonData.

The subclasses of GeneralMap also expose the method getAllResults(), which returns a Vector of all the possible results. If you wish to iterate over the shapes in a map, that is the method you will want to use.


Member Function Documentation

double AskGeo.Dbl.PolygonData.ComputeAreaSqKm ( )

Computes the approximate area in square kilometers.

double AskGeo.Dbl.PolygonData.GetMaxLatitudeDeg ( )

Returns the upper bound latitude in degrees from the bounding box.

Returns:
the upper bound latitude in degrees from the bounding box.
double AskGeo.Dbl.PolygonData.GetMaxLongitudeDeg ( )

Returns the upper bound longitude in degrees from the bounding box.

Returns:
the upper bound longitude in degrees from the bounding box.
double AskGeo.Dbl.PolygonData.GetMinLatitudeDeg ( )

Returns the lower bound latitude in degrees from the bounding box.

Returns:
the lower bound latitude in degrees from the bounding box.
double AskGeo.Dbl.PolygonData.GetMinLongitudeDeg ( )

Returns the lower bound longitude in degrees from the bounding box.

Returns:
the lower bound longitude in degrees from the bounding box.
int AskGeo.Dbl.PolygonData.GetNumNodes ( )

Returns a count of the total number of nodes (vertexes) in this shape.

Returns:
the number of nodes (vertexes) in this shape.
int AskGeo.Dbl.PolygonData.GetNumParts ( )

Returns the number of parts in the polygon data. Each part is one of the closed polygonal chains that define the shape.

Returns:
the number of rings in the shape.
int AskGeo.Dbl.PolygonData.GetNumVertexes ( int  partIndex)

Returns the number of vertexes in the given part.

Parameters:
partIndexpartIndex the index of the part.
Returns:
the number of vertexes in the given part.
double AskGeo.Dbl.PolygonData.GetVertexLatitudeDeg ( int  partIndex,
int  vertexIndex 
)

Returns the latitude in degrees of the given vertex.

Parameters:
partIndexthe part index.
vertexIndexthe vertex index within that part.
Returns:
the latitude in degrees of the given vertex.
double AskGeo.Dbl.PolygonData.GetVertexLongitudeDeg ( int  partIndex,
int  vertexIndex 
)

Returns the longitude in degrees of the given vertex.

Parameters:
partIndexthe part index.
vertexIndexthe vertex index within that part.
Returns:
the longitude in degrees of the given vertex.

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