DataQueryQueryPolygons Method (BoundingBox, String, Double, CancellationToken) |
Namespace: Telogis.GeoBase
public static Polygon[] QueryPolygons( BoundingBox bbox, string tableName, double simplificationLevel, CancellationToken token )
This method matches Polygons that pass through rect and continue
outside its area.
Further, Polygons with BoundingBoxes
that intersect rect will also be returned by this method, thus it is possible
that streets will be returned that appear to lie outside rect.
Map features are stored in tables, named according to type. Developers with custom data should avoid using the table names in the list below.
Pre-defined polygon query tables | Polygon Import Type |
---|---|
all | All |
countries | Countries (22) |
states | States (1) |
counties | Counties (23) |
islands | Islands (24) |
cities | Cities (2) |
airports | Airports (8) |
runways | Aircraft roads (runways & taxi-ways)(19) |
cemeteries | Cemeteries (9) |
hospitals | Hospitals (10) |
industrial | Industrial complexes (11) |
major_parks | National parks (13) |
state_parks | State parks (14) |
parks | County parks (15) |
shopping | Shopping centers (16) |
sports | Sports complexes (17) |
universities | Colleges (18) |
golf_courses | Golf courses (20) |
native | Native American reservations (21) |
military | Military bases (12) |
buildings | Buildings (5) |
oceans | Oceans (0) |
bays | Bays (3) |
water | Water (4) |
global_water | Global waters (26) |
// Create a BoundingBox in Los Angeles, USA BoundingBox myBBox = new BoundingBox(new LatLon(34, -117), new LatLon(33.75, -117.5)); // Create a cancellation token CancellationToken token = new CancellationToken(); // Query within the BoundingBox for polygons of the type 'airports'. 300 meters per pixel Polygon[] airportPolygons = DataQuery.QueryPolygons(myBBox, "airports", 300, token); // Print the results Console.WriteLine("There are {0} airports within this BoundingBox. They are:", airportPolygons.Length); for (int i = 0; i < airportPolygons.Length; i++) { Console.WriteLine("- {0}", airportPolygons[i].Name); } // There are 3 airports in this BoundingBox. They are: // - Riverside Municipal Airport // - Flabob Airport // - Perris Valley Airport