Versions in this module Expand all Collapse all v0 v0.3.0 Oct 1, 2026 v0.2.0 Oct 1, 2026 v0.1.0 Sep 29, 2026 Changes in this version + func Borders(width, height int, data []int16, cliffAbove int16, minPixels int) (border, shore []bool) + func ForeignPixels(width, height int, data []int16, border, shore []bool) []bool + func HexArea(apothem int) float64 + func HexIndex(g hmz2ele.Grid) []int32 + func RenderPreview(g hmz2ele.Grid, centers []hmz2ele.Hex, hexes []Hex, rivers []hmz2riv.EdgeJSON, ...) (*image.RGBA, error) + func RiverSlots(g hmz2ele.Grid, rivers *hmz2riv.Rivers) (map[int]bool, error) + func Slot(g hmz2ele.Grid, col, row int) int + func Version() semver.Version + type Biome string + const BiomeClear + const BiomeEmpty + type Depth string + const Deep + const DepthNone + const Open + const Shallow + type ElevationJSON struct + Max int16 + Median int16 + Min int16 + P5 int16 + P95 int16 + type Flag string + const Coast + const FlatSurface + const Impassable + const InlandSea + const River + const Volcano + type GridInfo struct + ApothemPx int + Columns int + HexAreaPx float64 + HexCount int + Rows int + SidePx float64 + type HeightmapInfo struct + FileName string + Metadata dem2hm.Metadata + type Hex struct + Biome Biome + Center *int16 + Col int + Depth Depth + Flags []Flag + Landform Landform + Row int + SeaDistance int + Stats PixelStats + Surface Surface + func Classify(in Inputs) ([]Hex, error) + type HexJSON struct + Biome Biome + Center *int16 + Col int + Depth Depth + Elevation *ElevationJSON + Flags []Flag + LandFraction float64 + Landform Landform + Pixels int + ReliefM *int + Row int + SeaDistance *int + Surface Surface + ValidPixels int + func HexesJSON(hexes []Hex) []HexJSON + type Inputs struct + BorderPixels []int + Centers []hmz2ele.Hex + FlatPixels []int + ForeignPixels []int + Grid hmz2ele.Grid + LakePixels []int + PixelSizeM float64 + RiverSlots map[int]bool + Rules Rules + SeaPixels []int + Stats []PixelStats + VolcanoSlots map[int]bool + Volcanoes [][2]float64 + type LakeJSON struct + ElevationM int16 + Name string + Pixels int + Seed Place + type Landform string + const Badlands + const Cliffs + const Flats + const FreshWater + const Hills + const LandformEmpty + const Mountains + const Plains + const Plateaus + const RollingPlains + const SaltWater + const VolcanicHighlands + func (l Landform) IsLand() bool + type Level struct + Elevation int16 + Lake string + Pixels int + Seed int + SlotPixels map[int32]int + func FindLevels(width, height int, data []int16, index []int32, minPixels float64, ...) ([]Level, error) + type MethodInfo struct + Borders string + Cuts string + InlandSeas string + Lakes string + Sea string + Statistics string + type PixelStats struct + Land int + Max int16 + Median int16 + Min int16 + P5 int16 + P95 int16 + Pixels int + Valid int + func ComputeStats(g hmz2ele.Grid, data []int16, index []int32) []PixelStats + func (s PixelStats) Relief() int + type Place struct + Lat float64 + Lon float64 + Name string + func ParsePlace(s string) (Place, error) + func (p Place) Pixel(hm *dem2hm.HeightMap16) (int, error) + func (p Place) String() string + type RiversInfo struct + FileName string + Hmz2rivVersion string + ThresholdKm2 float64 + type Rules struct + BorderMinPixels int + CliffAbove int16 + FlatsBelow int + HillsBelow int + InlandMinHexes int + OpenMax int + PlainsBelow int + PlateauBelow int + PlateauMinMedian int + RollingBelow int + ShallowMax int + StraitMax int + VolcanicRadiusRealKm float64 + func DefaultRules() Rules + func (r Rules) Depth(distance int) Depth + func (r Rules) Landform(relief, median int) Landform + type Stats struct + BorderPixels int + Depths map[Depth]int + Flags map[Flag]int + ForeignPixels int + Landforms map[Landform]int + OtherLevels int + SeaDistance []int + UnreachableSea int + func Summarize(hexes []Hex) Stats + type Surface string + const SurfaceClear + const SurfaceEmpty + type Terrain struct + Grid GridInfo + Heightmap HeightmapInfo + Hexes []HexJSON + Hmz2terVersion string + Lakes []LakeJSON + Method MethodInfo + Rivers RiversInfo + Rules Rules + Stats Stats + Volcanoes []VolcanoJSON + type VolcanoJSON struct + Col int + Row int