reduce

package
v1.2.2-beta1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Package reduce could reduce Polygon size both polygon lines and float precise.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress added in v0.8.0

func Compress(input *pb.Timezones, method pb.CompressMethod) (*pb.CompressedTimezones, error)

func CompressTopoTimezones added in v1.1.0

func CompressTopoTimezones(input *pb.TopoTimezones) *pb.CompressedTopoTimezones

CompressTopoTimezones converts a TopoTimezones into CompressedTopoTimezones by polyline-encoding all point sequences (shared edges and inline segments). Edge ID references (edge_forward / edge_reversed) are stored as-is.

func CompressWithPolyline added in v0.8.0

func CompressWithPolyline(input *pb.Timezones) *pb.CompressedTimezones

func CompressedPointsToPolylineBytes added in v0.8.0

func CompressedPointsToPolylineBytes(points []*pb.Point) []byte

func Decompress added in v0.8.0

func Decompress(input *pb.CompressedTimezones) (*pb.Timezones, error)

func DecompressTopoTimezones added in v1.1.0

func DecompressTopoTimezones(input *pb.CompressedTopoTimezones) *pb.TopoTimezones

DecompressTopoTimezones converts a CompressedTopoTimezones back to TopoTimezones by decoding all polyline-encoded point sequences.

func DecompressWithPolyline added in v0.8.0

func DecompressWithPolyline(input *pb.CompressedTimezones) *pb.Timezones

func DecompressedPolylineBytesToPoints added in v0.8.0

func DecompressedPolylineBytesToPoints(input []byte) []*pb.Point

func Do

func Do(input *pb.Timezones, skip int, precise float64, minist float64) *pb.Timezones

func DoTopologyAware added in v1.1.0

func DoTopologyAware(input *pb.Timezones, epsilon float64) *pb.Timezones

func DoTopologyAwareWithStats added in v1.1.0

func DoTopologyAwareWithStats(input *pb.Timezones, epsilon float64) (*pb.Timezones, topology.Stats)

func ReducePoints added in v0.7.0

func ReducePoints(points []*pb.Point) []*pb.Point

Types

This section is empty.

Jump to

Keyboard shortcuts

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