                             :maxDistance radius
                             :distanceField "calculated_distance"
                             :query {:_id {"$ne" id }
-                                    :geometry { "$geoIntersects" { "$geometry" (:geometry (geo-feature "LineString" perp)) } }}
+                                    :geometry { "$geoIntersects" { "$geometry" (:geometry (geo-feature "LineString" perp nil)) } }}
                             }}]))
          [v-results t-results] (map q ["v" "t"])
          bordures (filter (fn [t] (= "BOR" (get-in t [:properties :info]))) t-results)]

(def mperp [[2.379382788590524 48.84552083430268] [2.3791172006642896 48.84528245774338]])
(compute-perp-polygon mseg mperp)

(defn geo-feature [geo-type coordinates]
  "Form the perpendicular geojson map"
  { :type "Feature"
    :properties {:computed true} ;not part of the real source of features
    :geometry { :type geo-type
                :coordinates coordinates}})


                         (if valid
                           (let [seg-coords (:coords seg)
                                 d-perp (compute-perp (:coords seg) (:calculated_distance closest))]
                             [{
                               :coordinates (compute-perp-polygon seg-coords d-perp)
                               :properties {:t-width (segment-length d-perp) }
                               }])
                           [])
                         ))
                  perps)
