Versions in this module Expand all Collapse all v0 v0.3.0 Oct 1, 2026 v0.2.0 Sep 30, 2026 Changes in this version + type SnapReport struct + Extended int + ExtensionEdges int + SingleVertexLinks int + SingleVertexMouths int v0.1.0 Sep 28, 2026 Changes in this version + func DrawEdges(img *image.RGBA, g hmz2ele.Grid, edges []RiverEdge, pixelAreaM2 float64, ...) + func DrawLinks(img *image.RGBA, h *Hydrology, links []Link, scale int) + func PixelFromLonLat(hm *dem2hm.HeightMap16, lon, lat float64) (x, y float64, err error) + func Version() semver.Version + type Barrier struct + Height int16 + Lat1 float64 + Lat2 float64 + Lon1 float64 + Lon2 float64 + func ParseBarrier(s string) (Barrier, error) + func (b Barrier) Apply(hm *dem2hm.HeightMap16) (int, error) + func (b Barrier) String() string + type EdgeJSON struct + Col int + DrainageKm2 float64 + From VertexJSON + Row int + Side hmz2ele.Side + To VertexJSON + func EdgesJSON(edges []RiverEdge, pixelAreaM2 float64) []EdgeJSON + type GridInfo struct + ApothemPx int + Columns int + Rows int + SidePx float64 + type HeightmapInfo struct + FileName string + Metadata dem2hm.Metadata + type Hydrology struct + Acc []uint32 + Dir []uint8 + Elev []int16 + FilledPixels int + FlatPixels int + Height int + Width int + func Compute(width, height int, elev []int16) (*Hydrology, error) + func (h *Hydrology) Downstream(i int) int + func (h *Hydrology) Rivers(threshold uint32) []Link + func (h *Hydrology) Trace(i int) (last, steps int) + type HydrologyInfo struct + Barriers []string + Method string + PixelAreaM2 float64 + ThresholdKm2 float64 + ThresholdPixels uint32 + type Lines struct + Hmz2rivVersion string + Links []LinkJSON + func LinesJSON(h *Hydrology, links []Link, pixelAreaM2 float64) Lines + type Link struct + Mouth bool + Pixels []int32 + type LinkJSON struct + DrainageKm2 float64 + Mouth bool + Points [][2]int + type RiverEdge struct + Acc uint32 + Edge hmz2ele.EdgeKey + From hmz2ele.VertexKey + To hmz2ele.VertexKey + func Snap(h *Hydrology, g hmz2ele.Grid, links []Link) []RiverEdge + type Rivers struct + Edges []EdgeJSON + Grid GridInfo + Heightmap HeightmapInfo + Hmz2rivVersion string + Hydrology HydrologyInfo + Stats Stats + type Stats struct + BarrierPixels int + FilledPixels int + FlatPixels int + Links int + Mouths int + RiverEdges int + type VertexJSON struct + Col int + Corner hmz2ele.Corner + Row int