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. | |
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. |
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.
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.
double AskGeo.Dbl.PolygonData.GetMaxLongitudeDeg | ( | ) |
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.
double AskGeo.Dbl.PolygonData.GetMinLongitudeDeg | ( | ) |
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.
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.
int AskGeo.Dbl.PolygonData.GetNumVertexes | ( | int | partIndex | ) |
Returns the number of vertexes in the given part.
partIndex | partIndex the index of the part. |
double AskGeo.Dbl.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. |
double AskGeo.Dbl.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. |