AskGeo .NET
1.1.0
AskGeo Libraries for .NET
|
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...
Public Member Functions | |
int | GetNumNodes () |
Returns a count of the total number of nodes (vertexes) in this shape. | |
float | GetMinLatitudeDeg () |
Returns the lower bound latitude in degrees from the bounding box. | |
float | GetMaxLatitudeDeg () |
Returns the upper bound latitude in degrees from the bounding box. | |
float | GetMinLongitudeDeg () |
Returns the lower bound longitude in degrees from the bounding box. | |
float | 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. | |
float | GetVertexLatitudeDeg (int partIndex, int vertexIndex) |
Returns the latitude in degrees of the given vertex. | |
float | GetVertexLongitudeDeg (int partIndex, int vertexIndex) |
Returns the longitude in degrees of the given vertex. | |
float | ComputeAreaSqKm () |
Computes the approximate area in square kilometers. |
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.
float AskGeo.Flt.PolygonData.ComputeAreaSqKm | ( | ) |
Computes the approximate area in square kilometers.
float AskGeo.Flt.PolygonData.GetMaxLatitudeDeg | ( | ) |
Returns the upper bound latitude in degrees from the bounding box.
float AskGeo.Flt.PolygonData.GetMaxLongitudeDeg | ( | ) |
Returns the upper bound longitude in degrees from the bounding box.
float AskGeo.Flt.PolygonData.GetMinLatitudeDeg | ( | ) |
Returns the lower bound latitude in degrees from the bounding box.
float AskGeo.Flt.PolygonData.GetMinLongitudeDeg | ( | ) |
Returns the lower bound longitude in degrees from the bounding box.
int AskGeo.Flt.PolygonData.GetNumNodes | ( | ) |
Returns a count of the total number of nodes (vertexes) in this shape.
int AskGeo.Flt.PolygonData.GetNumParts | ( | ) |
Returns the number of parts in the polygon data. Each part is one of the closed polygonal chains that define the shape.
int AskGeo.Flt.PolygonData.GetNumVertexes | ( | int | partIndex | ) |
Returns the number of vertexes in the given part.
partIndex | partIndex the index of the part. |
float AskGeo.Flt.PolygonData.GetVertexLatitudeDeg | ( | int | partIndex, |
int | vertexIndex | ||
) |
Returns the latitude in degrees of the given vertex.
partIndex | the part index. |
vertexIndex | the vertex index within that part. |
float AskGeo.Flt.PolygonData.GetVertexLongitudeDeg | ( | int | partIndex, |
int | vertexIndex | ||
) |
Returns the longitude in degrees of the given vertex.
partIndex | the part index. |
vertexIndex | the vertex index within that part. |