Bounds<T extends Point<num>> class abstract

A base interface for bounds (aka a bounding box in 2D).

Inheritance
Implemented types
Implementers

Constructors

Bounds()
Default const constructor to allow extending this abstract class.
const
Bounds.make(Iterable<Iterable<num>> values, PointFactory<T> pointFactory)
Create Bounds from values with two points (both a list of nums).
factory
Bounds.of({required T min, required T max})
Create bounds with required (and non-empty) min and max points.
factory
Bounds.parse(String text, PointFactory<T> pointFactory, {ParseCoordsList? parser})
Create Bounds parsed from text with two points.
factory

Properties

bounds Bounds<Point<num>>?
The bounds for this object (could be calculated if not explicitely set).
no setterinherited
boundsExplicit Bounds<Point<num>>?
The explicit bounds for this object when available.
no setterinherited
coordinateDimension int
The number of coordinate values (2, 3 or 4).
no setter
corners2D Iterable<T>
Returns all distinct (in 2D) corners for this axis aligned bounding box.
no setter
hashCode int
The hash code for this object.
no setterinherited
is3D bool
True for 3D positions (with z or elevation coordinate).
no setter
isGeographic bool
True for geographic coordinates (with longitude and latitude).
no setter
isMeasured bool
True if a measure value is available (or the m coordinate for a position).
no setter
max → T
The maximum position (or east-north) of this bounding box.
no setter
maxM num?
The maximum m coordinate optionally. Returns null if not available.
no setter
maxX num
The maximum x (or east) coordinate.
no setter
maxY num
The maximum y (or north) coordinate.
no setter
maxZ num?
The maximum z coordinate optionally. Returns null if not available.
no setter
min → T
The minimum position (or west-south) of this bounding box.
no setter
minM num?
The minimum m coordinate optionally. Returns null if not available.
no setter
minX num
The minimum x (or west) coordinate.
no setter
minY num
The minimum y (or south) coordinate.
no setter
minZ num?
The minimum z coordinate optionally. Returns null if not available.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spatialDimension int
The number of spatial coordinate values (2 for 2D or 3 for 3D).
no setter
type Coords
The coordinate type.
no setter

Methods

copyTo<R extends Box>(CreateBox<R> factory) → R
Copies this box to a new box created by the factory.
inherited
equals2D(Box other, {num? toleranceHoriz}) bool
True if this box equals with other by testing 2D coordinates only.
inherited
equals3D(Box other, {num? toleranceHoriz, num? toleranceVert}) bool
True if this box equals with other by testing 3D coordinates only.
inherited
intersects(Box other) bool
Returns true if this bounding box intesects with other box.
override
intersects2D(Box other) bool
Returns true if this bounding box intersects with other box in 2D.
override
intersectsPoint(Position point) bool
Returns true if this bounding box intesects with point.
override
intersectsPoint2D(Position point) bool
Returns true if this bounding box intesects with point in 2D.
override
newFrom(Iterable<num> coords, {int? offset, int? length}) Bounds<T>
Creates a new Geometry instance of a type compatible with this object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
project<R extends Point<num>>(Projection projection, {required CreatePosition<R> to}) Bounds<R>
Returns a new object with all points projected using projection.
override
toString() String
A string representation of this object.
inherited
transform(TransformPosition transform) Bounds<T>
Returns new bounds transformed from this bounds using transform.
override
valuesAsString({String delimiter = ',', int? decimals}) String
Returns coordinate values as a string separated by delimiter.
writeTo(CoordinateContent output) → void
Writes this bounds object to output.
writeValues(StringSink buffer, {String delimiter = ',', int? decimals}) → void
Writes coordinate values to buffer separated by delimiter.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromCoords<T extends Point<num>>(Iterable<num> coords, {required PointFactory<T> pointFactory, int? offset, int? length}) Bounds<T>
Creates Bounds from coords using pointFactory.