From 8abde0a7be95d328c247cde2f2fb491b2e5db61f Mon Sep 17 00:00:00 2001 From: Daniel Pulido Date: Sun, 19 May 2019 19:22:08 -0400 Subject: [PATCH] Update readme with new optional argument. --- readme.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index 59ed28b..f3b9fe8 100644 --- a/readme.md +++ b/readme.md @@ -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) @@ -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`