Skip to content

Commit

Permalink
(chore) formation
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Feb 28, 2015
1 parent 7fe5c7a commit 6697c84
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/cljts/geom.clj
Expand Up @@ -12,8 +12,8 @@

(defn c
"create a coordinate object."
([x y] (Coordinate. x y))
([x y z] (Coordinate. x y z)))
([x y] (Coordinate. (double x) (double y)))
([x y z] (Coordinate. (double x) (double y) (double z))))

(def ^{:private true} precisions
{:floating PrecisionModel/FLOATING
Expand All @@ -33,8 +33,8 @@

(defmacro defgeom [geom-type doc args bodyfn]
`(defn ~geom-type ~doc [~@args & {:keys [precision-model# srid#]
:or {precision-model# :floating
srid# 0}}]
:or {precision-model# :floating
srid# 0}}]
(let [geom-factory# (cached-geom-factory precision-model# srid#)]
(~bodyfn geom-factory# ~@args))))

Expand Down Expand Up @@ -67,7 +67,7 @@
(fn [factory ring rings]
(.createPolygon ^GeometryFactory factory
^LinearRing ring
(into-array LinearRing rings))))
(into-array LinearRing rings))))

(defgeom multi-point
"create a multi-point with some points"
Expand Down Expand Up @@ -128,4 +128,3 @@
(.isEmpty this))
(simple? [this]
(.isSimple this)))

0 comments on commit 6697c84

Please sign in to comment.