public class

MapEnvelope

extends Object
java.lang.Object
   ↳ com.carto.core.MapEnvelope

Class Overview

A bounding area on the map. Can be defined by a map bounds object or by a convex bounding polygon.
This class is intended for conservative object area estimation and fast intersection testing.

Summary

Public Constructors
MapEnvelope()
Constructs an empty MapEnvelope object.
MapEnvelope(MapBounds bounds)
Constructs a MapEnvelope object using map bounds.
MapEnvelope(MapPosVector convexHull)
Constructs a MapEnvelope object from a convex bounding polygon.
Public Methods
boolean contains(MapEnvelope envelope)
Tests whether this map envelope contains another map envelope.
synchronized void delete()
boolean equals(Object obj)
Checks if this object is equal to the specified object.
MapBounds getBounds()
Returns the map bounds of this map envelope.
MapPosVector getConvexHull()
Returns the convex hull of this map envelope.
int hashCode()
Returns the hash value of this object.
boolean intersects(MapEnvelope envelope)
Tests whether this map envelope intersects with another map envelope.
String toString()
Creates a string representation of this map envelope, useful for logging.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MapEnvelope ()

Constructs an empty MapEnvelope object. Nothing is contained within
this envelope.

public MapEnvelope (MapBounds bounds)

Constructs a MapEnvelope object using map bounds.

Parameters
bounds The bounds for the envelope.

public MapEnvelope (MapPosVector convexHull)

Constructs a MapEnvelope object from a convex bounding polygon.

Parameters
convexHull The list of convex hull points.

Public Methods

public boolean contains (MapEnvelope envelope)

Tests whether this map envelope contains another map envelope.

Parameters
envelope The other map envelope.
Returns
  • True if this map envelope contains the other map envelope.

public synchronized void delete ()

public boolean equals (Object obj)

Checks if this object is equal to the specified object.

Parameters
obj The reference object.
Returns
  • True when objects are equal, false otherwise.

public MapBounds getBounds ()

Returns the map bounds of this map envelope.

Returns
  • The map bounds of this map envelope.

public MapPosVector getConvexHull ()

Returns the convex hull of this map envelope.

Returns
  • The convex hull of this map envelope.

public int hashCode ()

Returns the hash value of this object.

Returns
  • The hash value of this object.

public boolean intersects (MapEnvelope envelope)

Tests whether this map envelope intersects with another map envelope.

Parameters
envelope The other map envelope.
Returns
  • True if this map envelope intersects the other map envelope.

public String toString ()

Creates a string representation of this map envelope, useful for logging.

Returns
  • The string representation of this map envelope.