 (ns pdok.featured.feature
   (:refer-clojure :exclude [type])
   (:require [clojure.string :as str]
+            [clojure.core.cache :as cache]
             [clojure.java.io :as io]
             [clojure.java.jdbc :as j]
             [pdok.postgres :as pg]


(defmulti as-jts (fn [obj] (lower-case (get obj "type"))))
(defmethod as-jts :default [_] nil)
(defmethod as-jts "gml" [obj]
 (when-let [gml (get obj "gml")]
  (gml3-as-jts gml)))
(defmethod as-jts "jts" [obj]
  (get obj "jts"))


(def gml3-parser (GML3Parser.))

(defn gml3-as-jts [gml]
  (locking gml3-parser (.toJTSGeometry ^GML3Parser gml3-parser gml)))

(def wkt-writer (WKTWriter.))

