Class: AbstractGeometry

H.geo.AbstractGeometry

new H.geo.AbstractGeometry () abstract

The base class for all geometry types.

Methods

equals (other)boolean abstract

Checks whether the geometry is equal to the geometry supplied by the caller. Two geometries are considered as equal if they represent the same geometry type and have equal coordinate values.

Name Type Description
other *

The geometry to check against

Returns:
Type Description
boolean true if the two geometries are equal, otherwise false

getBoundingBox ()H.geo.Rect abstract

Returns the bounding rectangle of the geometry.

Returns:
Type Description
H.geo.Rect the bounding rectangle of the geometry or null if the bounding rectangle can't be computed (e.g. for a geometry without coordinates)

toGeoJSON ()Object

To obtain a GeoJSON representation of the given geometry.

Returns:
Type Description
Object A GeoJSON Geometry object representing the given geometry.

toString ()

To obtain a Well-Known-Text (WKT) representation of the geometry.