Click or drag to resize

DataQueryQueryPolygons Method (BoundingBox, String, Double)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Gets an array of Polygons that lie underneath the given BoundingBox.

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public static Polygon[] QueryPolygons(
	BoundingBox bbox,
	string tableName,
	double simplificationLevel
)

Parameters

bbox
Type: Telogis.GeoBaseBoundingBox
The BoundingBox representing the area to be queried.
tableName
Type: SystemString
The name of the polygon table to query.
simplificationLevel
Type: SystemDouble
Level used to simplify results, given as meters per pixel.

Return Value

Type: Polygon
An array of Polygons matching the specified type.
Remarks

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 tablesPolygon Import Type
allAll
countriesCountries (22)
statesStates (1)
countiesCounties (23)
islandsIslands (24)
citiesCities (2)
airportsAirports (8)
runwaysAircraft roads (runways & taxi-ways)(19)
cemeteriesCemeteries (9)
hospitalsHospitals (10)
industrialIndustrial complexes (11)
major_parksNational parks (13)
state_parksState parks (14)
parksCounty parks (15)
shoppingShopping centers (16)
sportsSports complexes (17)
universitiesColleges (18)
golf_coursesGolf courses (20)
nativeNative American reservations (21)
militaryMilitary bases (12)
buildingsBuildings (5)
oceansOceans (0)
baysBays (3)
waterWater (4)
global_waterGlobal waters (26)
Examples
C#
// Create a BoundingBox in Los Angeles, USA
BoundingBox myBBox = new BoundingBox(new LatLon(34, -117), new LatLon(33.75, -117.5));

// Query within the BoundingBox for polygons of the type 'airports'. 300 meters per pixel
Polygon[] airportPolygons = DataQuery.QueryPolygons(myBBox, "airports", 300);

// 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
See Also