Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Sep 28, 2023
1 parent bb61b5d commit 5552f75
Show file tree
Hide file tree
Showing 3 changed files with 500 additions and 175 deletions.
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,28 @@ julia> # get the underlying NamedTuple
julia> bounds(ext1)
(X = (1.0, 2.0), Y = (3.0, 4.0))
julia> # compare different extents
julia> Extents.intersection(ext1, ext2)
Extent(X = (1.5, 2.0), Y = (3.0, 4.0))
julia> Extents.union(ext1, ext2)
Extent(X = (1.0, 2.5), Y = (3.0, 4.0))
```

Extents.jl also defines spatial predicates following the
[DE-9IM](https://en.wikipedia.org/wiki/DE-9IM) standard.

```julia-repl
julia> Extents.intersects(ext1, ext2)
true
julia> Extents.intersect(ext1, ext2)
Extent(X = (1.5, 2.0), Y = (3.0, 4.0))
julia> Extents.disjoint(ext1, ext2)
false
julia> Extents.union(ext1, ext2)
Extent(X = (1.0, 2.5), Y = (3.0, 4.0))
julia> Extents.touches(ext1, ext2)
false
julia> Extents.overlaps(ext1, ext2)
true
```

See [the docs](https://rafaqz.github.io/Extents.jl/stable) for all available methods.
Loading

0 comments on commit 5552f75

Please sign in to comment.