utils

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractGeohashesFromKML

func ExtractGeohashesFromKML(kmlPath string, precision uint) (map[string]struct{}, error)

ExtractGeohashesFromKML parses the given KML file at kmlPath, extracts coordinate data from polygons, and generates geohashes with the specified precision.

kmlPath: The path to the KML file. precision: The desired geohash precision. Returns: A set of geohashes covering the KML-defined regions, or an error if parsing fails.

func GenerateGeohashesForPolygon

func GenerateGeohashesForPolygon(polygons []structs.Polygon, precision uint) map[string]struct{}

GenerateGeohashesForPolygon generates geohashes that cover the entire polygon area

func GetInteriorPointByTriangulation

func GetInteriorPointByTriangulation(polygon []structs.Coordinate) structs.Coordinate

GetInteriorPointByTriangulation returns an interior point of the polygon using triangulation.

func ParseCoordinates

func ParseCoordinates(coordString string) []structs.Coordinate

ParseCoordinates parses the KML coordinates string into a slice of Coordinates

func PointInPolygon

func PointInPolygon(point structs.Coordinate, polygon []structs.Coordinate) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL