From 567bb80e8b1993a4bdc07927dab456399415e979 Mon Sep 17 00:00:00 2001 From: Donald Clark Jackson Date: Sun, 25 Oct 2020 11:47:08 -0700 Subject: [PATCH] initial implemenation of feature? --- src/ovid/feature.clj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ovid/feature.clj b/src/ovid/feature.clj index 7fac707..2c8928f 100644 --- a/src/ovid/feature.clj +++ b/src/ovid/feature.clj @@ -366,3 +366,8 @@ "Convert a Feature's geometry to spatial4j." [feat] (update-geometry feat to-shape)) + +(defn feature? + "WARNING: this assumes feature is implemented as a hashmap, and uses duck-typing" + [feat] + (and (map? feat) (contains? feat :geometry) (contains? feat :properties)))