Explorar el Código

Convert tag keys to keywords if possible.

Lucas Stadler %!s(int64=12) %!d(string=hace) años
padre
commit
ef4ee343c6
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      clj/paths.clj

+ 2 - 2
clj/paths.clj

@ -18,10 +18,10 @@
18 18
  (let [tags (filter #(= (:tag %) :tag) (:content osm-element))]
19 19
    (into {} (map #(-> (get+ (:attrs %) [:k :v])
20 20
                       ((fn [[k v]]
21
                          [(keyword k) v])))
21
                          [(or (keyword k) k) v])))
22 22
                  tags))))
23 23
24
(tags-as-map {:content [{:tag :tag, :attrs {:k :hey, :v 1}}, {:tag :tag, :attrs {:k :there, :v 2}}]})
24
(tags-as-map {:content [{:tag :tag, :attrs {:k "hey", :v 1}}, {:tag :tag, :attrs {:k :there, :v 2}}]})
25 25
26 26
(defn dev-prepare [& [path]]
27 27
  (let [path (or path "data/leipzig_highways.osm")]