PolygonIntersects Method (BoundingBox) |
Namespace: Telogis.GeoBase.Geometry
// 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'