Functions to encode and decode Google polyline algorithm.
Functions to encode and decode Google polyline algorithm.
(compress rf)
Transducer that compresses polyline coordinates by turning them into deltas from the previous coord.
Transducer that compresses polyline coordinates by turning them into deltas from the previous coord.
(coord->integer coord)
Returns the coord (a double) multiplied by 100,000 and rounded to nearest integer.
Returns the coord (a double) multiplied by 100,000 and rounded to nearest integer.
(decode polystring)
Takes a polyline-encoded string and returns a collection of decoded [lat long] coordintes.
Takes a polyline-encoded string and returns a collection of decoded [lat long] coordintes.
(decompress rf)
Transducer that decompresses polyline coordinates that have been compressed by turning them into deltas from the previous coord.
Transducer that decompresses polyline coordinates that have been compressed by turning them into deltas from the previous coord.
(encode coords)
Main polyline encoding function. Takes a collection of [lat long] tuples and returns the polyline encoded string representation.
Main polyline encoding function. Takes a collection of [lat long] tuples and returns the polyline encoded string representation.
(encode-coord x)
Returns the polyline encoded string of given coordinate (a double between -180 and 180).
Returns the polyline encoded string of given coordinate (a double between -180 and 180).
(integers->coord [lat lon :as integers])
Returns the coord (a pair of doubles) divided by 100,000.
Returns the coord (a pair of doubles) divided by 100,000.
(latlon [lon lat :as coord])
Converts a coordinate in [lon lat] format to [lat lon].
Converts a coordinate in [lon lat] format to [lat lon].
(lonlat [lat lon :as coord])
Converts a coordinate in [lat lon] format to [lon lat].
Converts a coordinate in [lat lon] format to [lon lat].
(poly-number rf)
Transducer that transforms characters from a polyline string into the raw decoded numbers, without double or negative conversion.
Transducer that transforms characters from a polyline string into the raw decoded numbers, without double or negative conversion.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close