Click or drag to resize

GeoCoordinateRectangle Structure

This is preliminary documentation and is subject to change.

Represents a spherical rectangle determined by the top-left (north-west) and bottom-right (south-east) coordinates on the globe.
Inheritance Hierarchy
SystemObject
  SystemValueType
    WikiClientLibraryGeoCoordinateRectangle

Namespace: WikiClientLibrary
Assembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax
public struct GeoCoordinateRectangle : IEquatable<GeoCoordinateRectangle>

The GeoCoordinateRectangle type exposes the following members.

Constructors
 NameDescription
Public methodGeoCoordinateRectangle Initializes a new GeoCoordinateRectangle with the specified left, top, width, height on sphere.
Top
Properties
 NameDescription
Public propertyBottom Gets the bottom-border latitude of the rectangle.
Public propertyHeight Gets/sets the height in latitude of the rectangle.
Public propertyIsEmpty Determines whether the rectangle is empty in area.
Public propertyIsNormalizable Gets a value that indicates whether the current rectangle instance is normalizable.
Public propertyIsNormalized Determines whether the coordinates of current spherical rectangle are normalized.
Public propertyLeft Gets/sets the left-border longitude of the rectangle.
Public propertyRight Gets the right-border longitude of the rectangle.
Public propertyTop Gets/sets the top-border latitude of the rectangle.
Public propertyWidth Gets/sets the width in longitude of the rectangle.
Top
Methods
 NameDescription
Public methodContains Determines whether the rectangle contains the given coordinate, or the given coordinate falls on the edge of the rectangle.
Public methodEquals(GeoCoordinateRectangle)Indicates whether the current object is equal to another object of the same type.
Public methodEquals(Object)Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object))
Public methodStatic memberFromBoundingCoordinates(GeoCoordinate, GeoCoordinate) Constructs a GeoCoordinateRectangle instance from the given bounding coordinates.
Public methodStatic memberFromBoundingCoordinates(Double, Double, Double, Double) Constructs a GeoCoordinateRectangle instance from the given bounding coordinates.
Public methodGetHashCodeReturns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodNormalize Normalizes the coordinates, ensuring the current coordinates meets the definition of "normalized spherical rectangle" as specified in IsNormalized.
Public methodOffset Offsets the rectangle by the specified values.
Public methodToStringReturns the fully qualified type name of this instance.
(Overrides ValueTypeToString)
Top
Operators
Fields
 NameDescription
Public fieldStatic memberEmpty Gets an empty GeoCoordinateRectangle value with its members uninitialized.
Top
Remarks

This structure uses degrees as the unit of the coordinate.

Keep in mind the latitude decreases as you go down / south (i.e. bottom of the rectangle). Thus Bottom value is less than or equals to Top value.

Rectangles spanning along meridian and across the north/south pole may not be represented properly by this structure. Consider using two GeoCoordinateRectangle instances in this case. Though you may still represent such a rectangle with Bottom less than -90, you will not be able to normalize it and perform other common operations. See Normalize and Contains(GeoCoordinate) for more information.

See Also