Skip to content

Clojure utility to convert WGS-84 lat/lng coordinates to quadkeys

License

Notifications You must be signed in to change notification settings

davidsnyder/quadkeys-clj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quadkeys-clj

Functions to convert WGS-84 latitude/longitude pairs into quadkeys at a zoom level in 1-23.

Adapted from the discussion at http://msdn.microsoft.com/en-us/library/bb259689.aspx.

Usage

This project is built with Leiningen.

Given a file containing tab-separated latitude/longitude pairs, emits the input pair with an appended quadkey (the main function currently uses zoom level 11).

#Example file in test/quadkeys/coordinates.tsv


-90.242608	38.604001
-90.212338	38.635538
-80.22258	36.109978
-78.905379	36.001676
-79.465736	35.722965


lein run test/quadkeys/coordinates.tsv

-90.242608	38.604001	32233233211
-90.212338	38.635538	32233233211
-80.22258	36.109978	32211201103
-78.905379	36.001676	32033223100
-79.465736	35.722965	32211003013

There are also a few assertion tests.


lein test

About

Clojure utility to convert WGS-84 lat/lng coordinates to quadkeys

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages