Loading TOC...

MarkLogic 9 Product Documentation
geo.geohashNeighbors

geo.geohashNeighbors(
   hash as String
) as Object

Summary

Given a geohash string, return hashes for the neighbors. The result is a map with the keys "N", "NE", "E", "SE", "S", "SW", "W", "NW" for the neighbors in those directions.

Parameters
hash The geohash string, as produced by geo.geohashEncode.

See Also

Example

geo.geohashNeighbors("c3k6svq")

=> {"NE":"c3k6svx", "S":"c3k6svn", "E":"c3k6svr", "W":"c3k6svm",
    "N":"c3k6svw", "SW":"c3k6svj", "SE":"c3k6svp", "NW":"c3k6svt"}

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.