|
1 |
| -;; Copyright (c) 2019, 2020 Will Cohen |
| 1 | +;; Copyright (c) 2019, 2020, 2024 Will Cohen |
2 | 2 | ;;
|
3 | 3 | ;; Licensed under the Apache License, Version 2.0 (the "License");
|
4 | 4 | ;; you may not use this file except in compliance with the License.
|
|
17 | 17 | [geo.geohash :as geo.geohash]
|
18 | 18 | [geo.h3 :as geo.h3])
|
19 | 19 | (:import (ch.hsr.geohash GeoHash WGS84Point)
|
20 |
| - (com.uber.h3core.util GeoCoord) |
| 20 | + (com.uber.h3core.util LatLng) |
21 | 21 | (org.locationtech.jts.geom Geometry)
|
22 | 22 | (org.locationtech.spatial4j.shape Shape)
|
23 | 23 | (org.locationtech.spatial4j.shape.impl
|
|
180 | 180 | (-assoc-properties [this p] (-to-feature this p))
|
181 | 181 | (-update-properties [this f] (-update-properties (-to-feature this) f))
|
182 | 182 |
|
183 |
| - GeoCoord |
| 183 | + LatLng |
184 | 184 | (-to-shape [this] (geo.spatial/to-shape this))
|
185 | 185 | (-to-jts
|
186 | 186 | ([this] (geo.spatial/to-jts this))
|
|
282 | 282 | (-geometry [this] (:geometry this))
|
283 | 283 | (-properties [this] (:properties this))
|
284 | 284 | (-assoc-geometry [this s] (assoc this :geometry s))
|
| 285 | + (-update-geometry |
| 286 | + ([this f] (update this :geometry f)) |
| 287 | + ([this f & args] |
285 | 288 | (-update-geometry
|
286 |
| - ([this f] (update this :geometry f)) |
287 |
| - ([this f & args] |
288 |
| - (-update-geometry |
289 |
| - this (fn [x] (apply f (cons x args)))))) |
| 289 | + this (fn [x] (apply f (cons x args)))))) |
290 | 290 | (-assoc-properties [this p] (assoc this :properties p))
|
291 | 291 | (-update-properties [this f] (update this :properties f)))
|
292 | 292 |
|
293 |
| -(defn h3->feature |
294 |
| - [h3] |
295 |
| - {:geometry (geo.h3/to-jts h3) :properties {:h3 h3}}) |
| 293 | +;; (defn h3->feature |
| 294 | +;; [h3] |
| 295 | +;; {:geometry (geo.h3/to-jts h3) :properties {:h3 h3}}) |
296 | 296 |
|
297 | 297 | (defn ^Shape to-shape
|
298 | 298 | "Get Shape from geometry of Featurelike
|
|
0 commit comments