Click or drag to resize

PolygonIntersects Method (BoundingBox)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Determines whether the Polygon intersects, contains, or touches a BoundingBox.

Namespace:  Telogis.GeoBase.Geometry
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public bool Intersects(
	BoundingBox bbox
)

Parameters

bbox
Type: Telogis.GeoBaseBoundingBox
The BoundingBox to test against.

Return Value

Type: Boolean
True if the Polygon intersects, contains, or touches the given BoundingBox.
Examples
C#
// Create a four sided polygon in Los Angeles, Ca.
Telogis.GeoBase.Geometry.Polygon myPolygon = new Telogis.GeoBase.Geometry.Polygon(
    new Telogis.GeoBase.Geometry.LineString[] {
        new Telogis.GeoBase.Geometry.LineString(
        new LatLon(33.694165,-117.956236),
        new LatLon(33.697935,-117.842219),
        new LatLon(33.616715,-117.834638),
        new LatLon(33.625434,-117.937813),
        new LatLon(33.694165,-117.956236))
    }
);
// Create a BoundingBox that overlaps the area contained by the Polygon
BoundingBox myTestBox = new BoundingBox(new LatLon[] { 
    new LatLon(33.651362,-117.916582),
    new LatLon(33.651362,-117.916582)}
);
Console.WriteLine("Do the Polygon and BoundingBox intersect? {0}", myPolygon.Intersects(myTestBox));
// 'Do the Polygon and BoundingBox intersect? True'
See Also