Skip to content

Area

Class to hold a geospatial area of data in the given projection.

Parameters:

Name Type Description Default
left float

Left most point in the projection space.

required
top float

Top most point in the projection space.

required
right float

Right most point in the projection space.

required
bottom float

Bottom most point in the projection space.

required

Attributes:

Name Type Description
left float

Left most point in the projection space.

top float

Top most point in the projection space.

right float

Right most point in the projection space.

bottom float

Bottom most point in the projection space.

is_world property

Returns true if this is a global area, independent of projection.

Returns:

Type Description
bool

True if the Area was created with world otherwise False.

grow(offset)

Expand the area in all directions by the given amount.

Generates a new area that is an expanded version of the current area.

Parameters:

Name Type Description Default
offset float

The amount by which to grow the area.

required

Returns:

Type Description
Area

A new area of the expanded size.

overlaps(other)

Check if this area overlaps with another area.

Parameters:

Name Type Description Default
other Area

The other area to compare this area with.

required

Returns:

Type Description
bool

True if the two areas intersect, otherwise false.

world() staticmethod

Creates an area that covers the entire planet.

Returns:

Type Description
Area

An area where the extents are nan, but is_world returns true.