Loading TOC...

geo:geohash-neighbors

geo:geohash-neighbors(
   $hash as xs:string
) as map:map

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:geohash-encode.

See Also

Example

geo:geohash-neighbors("c3k6svq")

=> a map:map with the following keys and values:

   key  :   value
   ----------------
   "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.