Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v0 source realm

Package geohashdemo is a small gnoweb demo of the [p/moul/x/daily/geohash](/p/moul/x/daily/geohash)(/p/moul/x/daily/g...

Readme View source

gno.land/r/moul/x/daily/geohashdemo/v0

A gnoweb demo of p/moul/x/daily/geohash, the base32 geohash library. Three read-only pages, no state, no caller input.

path shows
/ one point encoded at every length from 1 to 11, so the prefix property is visible
/cell the box ezs42 actually names, its bounds and its size in degrees
/neighbors the eight cells around it, and the wrap at the antimeridian

It contains no geohash logic of its own: every string on the page comes from the library. Render takes nothing from a caller and reads no clock, height or balance, so all three pages are pinned exactly by ExampleRender tests.

The page worth reading is /neighbors. The cell east of z is b, because longitude wraps, while z has no northern neighbour at all and Neighbors returns five cells rather than eight. That asymmetry is the part of geohash adjacency people get wrong.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

On mainnet: deployment status transactions unique callers deployed revision

Dependency graph:

gno.land/r/moul/x/daily/geohashdemo/v0 dependency graph

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.

Overview

Package geohashdemo is a small gnoweb demo of the p/moul/x/daily/geohash(/p/moul/x/daily/geohash/v0) library: it shows a point encoded at growing precision, the box a hash actually names, and the eight cells around one, including the wrap at the antimeridian.

It contains no geohash logic of its own. Stateless and read-only, so Render is fully deterministic and takes nothing from a caller.

Functions 1

func Render

1func Render(path string) string
source

Render renders the demo for gnoweb.

Example
1Render("") / Render("/")  -> a point at growing precision
2Render("/cell")           -> the box a hash names
3Render("/neighbors")      -> the eight cells around one, and the wrap

Dependencies

Imports 3

/r/g1magld5ptgzaktqcexxq0pgq5lmdf0kz6re8hlv/x/daily/geohashdemo/v0

Imported by indexer

Source Files 4