Extents

Documentation for Extents.

Extents.ExtentType
Extent

Extent(; kw...)
Extent(bounds::NamedTuple)

A wrapper for a NamedTuple of tuples holding the lower and upper bounds for each dimension of the object.

keys(extent) will return the dimension name Symbols, in the order the dimensions are used in the object.

values(extent) will return a tuple of tuples: (lowerbound, upperbound) for each dimension.

Examples

julia> ext = Extent(X = (1.0, 2.0), Y = (3.0, 4.0))
Extent(X = (1.0, 2.0), Y = (3.0, 4.0))

julia> keys(ext)
(:X, :Y)

julia> values(ext)
((1.0, 2.0), (3.0, 4.0))
source
Extents.bufferMethod
buffer(ext::Extent, buff::NamedTuple)

buffer Extent by corresponding name-pair values supplied in buff NamedTuple.

Examples

julia> ext = Extent(X = (1.0, 2.0), Y = (3.0, 4.0))
Extent(X = (1.0, 2.0), Y = (3.0, 4.0))
julia> ext_buffered = Extents.buffer(ext, (X=1, Y=3))
Extent(X = (0.0, 3.0), Y = (0.0, 7.0))
source
Extents.containsMethod
contains(a::Extent, b::Extent; strict=false)

a contains b if no points of b lie in the exterior of a, and at least one point of the interior of b lies in the interior of a. If b has no interior points it is not contained in a.

Identical to within with argument order reversed.

Dimensions that are not shared are ignored by default with strict=false. When strict=true, any unshared dimensions cause the function to return nothng.

If there are no common dimensions, false is returned.

The order of dimensions is ignored in all cases.

Conforms to the DE-9IM spatial predicates standard https://en.wikipedia.org/wiki/DE-9IM

source
Extents.coveredbyMethod
coveredby(a::Extent, b::Extent; strict=false)

At least one point of a lies in b, and no point of a lies in the exterior of b, Every point of a is a point in the interior or boundary of b.

Identical to covers with argument order reversed.

Dimensions that are not shared are ignored by default with strict=false. When strict=true, any unshared dimensions cause the function to return nothng.

If there are no common dimensions with strict=false, false is returned.

The order of dimensions is ignored in all cases.

Conforms to the DE-9IM spatial predicates standard https://en.wikipedia.org/wiki/DE-9IM

source
Extents.coversMethod
covers(a::Extent, b::Extent; strict=false)

At least one point of b lies in a, and no point of b lies in the exterior of a, Every point of b is a point in the interior or boundary of a.

Identical to coveredby with argument order reversed.

Dimensions that are not shared are ignored by default with strict=false. When strict=true, any unshared dimensions cause the function to return nothng.

If there are no common dimensions with strict=false, false is returned.

The order of dimensions is ignored in all cases.

Conforms to the DE-9IM spatial predicates standard https://en.wikipedia.org/wiki/DE-9IM

source
Extents.disjointMethod
disjoint(a::Extent, b::Extent; strict=false)

a and b are disjoint if they have no point in common (the inverse of intersects).

Returns false if the extents of all common dimensions share some values, including just the edge values of their range.

Dimensions that are not shared are ignored by default with strict=false. When strict=true, any unshared dimensions cause the function to return nothng.

If there are no common dimensions when strict=false, true is returned.

The order of dimensions is ignored in all cases.

Conforms to the DE-9IM spatial predicates standard https://en.wikipedia.org/wiki/DE-9IM

source
Extents.equalsMethod
equals(a::Extent, b::Extent; strict=false)

a and b are topologically equal: their interiors intersect and no part of the interior or boundary of one intersects the exterior of the other.

Dimensions that are not shared are ignored by default with strict=false. When strict=true, any unshared dimensions cause the function to return nothng.

If there are no common dimensions with strict=false, false is returned.

The order of dimensions is ignored in all cases.

Conforms to the DE-9IM spatial predicates standard https://en.wikipedia.org/wiki/DE-9IM

source
Extents.intersectionMethod
intersection(ext1::Extent, ext2::Extent; strict=false)

Get the intersection of two extents as another Extent, e.g. the area covered by the shared dimensions for both extents.

If there is no intersection for any shared dimension, nothing will be returned.

The order of dimensions is ignored in all cases.

source
Extents.intersectsMethod
intersects(a::Extent, b::Extent; strict=false)

a intersects b if a and b have at least one point in common (the inverse of disjoint).

Returns true if the extents of all common dimensions share some values, including just the edge values of their range.

Dimensions that are not shared are ignored by default with strict=false. When strict=true, any unshared dimensions cause the function to return nothng.

If there are no common dimensions with strict=false, false is returned.

The order of dimensions is ignored in all cases.

Conforms to the DE-9IM spatial predicates standard https://en.wikipedia.org/wiki/DE-9IM

source
Extents.overlapsMethod
overlaps(a::Extent, b::Extent; strict=false)

a overlaps b: they have some but not all points in common, they have the same dimension, and the intersection of the interiors of the two geometries has the same dimension as the geometries themselves.

Returns true if the extents of common dimensions overlap.

Dimensions that are not shared are ignored by default with strict=false. When strict=true, any unshared dimensions cause the function to return nothng.

If there are no common dimensions with strict=false, false is returned.

The order of dimensions is ignored in all cases.

Conforms to the DE-9IM spatial predicates standard https://en.wikipedia.org/wiki/DE-9IM

source
Extents.touchesMethod
touches(a::Extent, b::Extent; strict=false)

a and b have at least one point in common, but their interiors do not intersect.

Returns true if the extents of any common dimensions share boundaries.

Dimensions that are not shared are ignored by default with strict=false. When strict=true, any unshared dimensions cause the function to return nothng.

If there are no common dimensions with strict=false, false is returned.

The order of dimensions is ignored in all cases.

Conforms to the DE-9IM spatial predicates standard https://en.wikipedia.org/wiki/DE-9IM

source
Extents.unionMethod
union(ext1::Extent, ext2::Extent; strict=false)

Get the union of two extents, e.g. the combined extent of both objects for all dimensions.

The order of dimensions is ignored in all cases.

source
Extents.withinMethod
within(a::Extent, b::Extent; strict=false)

a is within b if no points of a lie in the exterior of b, and at least one point of the interior of a lies in the interior of b. If a has no interior points it is not contained in b.

Identical to contains with argument order reversed.

Dimensions that are not shared are ignored by default with strict=false. When strict=true, any unshared dimensions cause the function to return nothng.

If there are no common dimensions, false is returned.

The order of dimensions is ignored in all cases.

Conforms to the DE-9IM spatial predicates standard https://en.wikipedia.org/wiki/DE-9IM

source