Click or drag to resize

BoundingBoxContains Method (LatLon)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Test if a given point lies within this BoundingBox. Points on the edge of the BoundingBox are considered to be outside.

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.98.0.0
Syntax
public bool Contains(
	LatLon point
)

Parameters

point
Type: Telogis.GeoBaseLatLon
A LatLon point

Return Value

Type: Boolean
True if the point lies within this BoundingBox, otherwise false. Will return false if the point lies on the edge of the bounding box.
Examples
C#
BoundingBox bb1 = new BoundingBox();

// Add arbitrary points in Los Angeles, USA.
bb1.Add(new LatLon(33.94, -118.34));
bb1.Add(new LatLon(33.78, -117.95));

// Locate the center of the BoundingBox:
LatLon BoxCenter = bb1.Center;

// Is the center of the BoundingBox in the BoundingBox?
Console.WriteLine("Center is in BB? " + bb1.Contains(BoxCenter));
// Writes 'Center is in BB? True'
See Also