Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
{:1.7 {:extra-deps #:org.clojure{clojure #:mvn{:version "1.7.0"}}},
:1.8 {:extra-deps #:org.clojure{clojure #:mvn{:version "1.8.0"}}},
:1.9 {:extra-deps #:org.clojure{clojure #:mvn{:version "1.9.0"}}},
:dev {:extra-deps {cheshire #:mvn{:version "5.9.0"},
codox-theme-rdash #:mvn{:version "0.1.2"},
:1.10 {:extra-deps #:org.clojure{clojure #:mvn{:version "1.10.0"}}},
:1.11 {:extra-deps #:org.clojure{clojure #:mvn{:version "1.11.0"}}},
:1.12 {:extra-deps #:org.clojure{clojure #:mvn{:version "1.12.0"}}},
:dev {:extra-deps {cheshire/cheshire #:mvn{:version "5.9.0"},
codox-theme-rdash/codox-theme-rdash #:mvn{:version "0.1.2"},
com.fasterxml.jackson.core/jackson-core #:mvn{:version "2.10.2"},
com.fasterxml.jackson.dataformat/jackson-dataformat-cbor #:mvn{:version "2.10.2"},
com.fasterxml.jackson.dataformat/jackson-dataformat-smile #:mvn{:version "2.10.2"},
criterium #:mvn{:version "0.4.5"},
midje #:mvn{:version "1.9.9"},
criterium/criterium #:mvn{:version "0.4.5"},
midje/midje #:mvn{:version "1.9.9"},
org.clojure/clojure #:mvn{:version "1.10.1"}}}},
:deps {ch.hsr/geohash #:mvn{:version "1.4.0"},
com.uber/h3 #:mvn{:version "3.6.3"},
org.clojure/math.numeric-tower #:mvn{:version "0.0.4"},
org.clojure/math.numeric-tower #:mvn{:version "0.1.0"},
org.locationtech.jts.io/jts-io-common #:mvn{:version "1.16.1"},
org.locationtech.jts/jts-core #:mvn{:version "1.16.1"},
org.locationtech.proj4j/proj4j #:mvn{:version "1.1.0"},
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:comments "same as Clojure"}
:description "Geospatial operations over points, lines, polys, geohashes, etc."
:dependencies
[[org.clojure/math.numeric-tower "0.0.4"]
[[org.clojure/math.numeric-tower "0.1.0"]
[ch.hsr/geohash "1.4.0"]
[com.uber/h3 "3.6.3"]
[org.locationtech.proj4j/proj4j "1.1.0"]
Expand Down
8 changes: 4 additions & 4 deletions src/geo/spatial.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
functions over shapes for their heights, centers, areas, etc. Can also
compute relationships between shapes: their intersections, contains, disjoint
statuses, etc."
(:use [clojure.math.numeric-tower :only [abs]])
(:require [geo.crs :as crs]
(:require [clojure.math.numeric-tower :as numeric-tower]
[geo.crs :as crs]
[geo.jts :as jts])
(:import (ch.hsr.geohash WGS84Point)
(ch.hsr.geohash.util VincentyGeodesy)
Expand Down Expand Up @@ -318,8 +318,8 @@
; algorithm, which causes distances at the poles to return
; bad results. In these cases, use spatial4j's spherical vincenty
; distance calculator.
(if (and (<= (abs (latitude a)) 89.99999999999999)
(<= (abs (latitude b)) 89.99999999999999))
(if (and (<= (numeric-tower/abs (latitude a)) 89.99999999999999)
(<= (numeric-tower/abs (latitude b)) 89.99999999999999))
(VincentyGeodesy/distanceInMeters
(to-geohash-point a)
(to-geohash-point b))
Expand Down