Skip to content

Commit

Permalink
Update readme with new optional argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpmcmlxxvi committed May 19, 2019
1 parent 8f1fdea commit 8abde0a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,16 @@ The `de9im` object has the following spatial predicate functions available:
touches
within

Each predicate takes two arguments and returns true, false, or throws an
exception if the geometry types provided are not supported. Each predicate
should be interpreted as the first argument operating on the second. For
example,
Each predicate takes two GeoJSON arguments and an optional boolean argument:

```javascript
de9im.predicate(geojson1, geojson2, [error=true])
```

It returns true, false, or throws an exception if the geometry types provided
are not supported. If the optional argument `error` is false then unsupported
geometries return false instead of throwing an exception. Each predicate should
be interpreted as the first argument operating on the second. For example,

```javascript
de9im.contains(line, point)
Expand All @@ -90,7 +96,7 @@ points and lines.
#### Argument Types

Each predicate has a unique combination of first and second argument geometries
that it supports. Using an unsupported argument throws an exception.
that it supports.

- `contains`, `covers`

Expand Down

0 comments on commit 8abde0a

Please sign in to comment.