pointindex

package
v0.0.0-...-aaa3bb6 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VectorTileInternalPixelResolution = 16
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level = uint

type PointIndex

type PointIndex struct {
	Quadrant
	// contains filtered or unexported fields
}

PointIndex is a pointcloud annex quadtree to enable snapping lines to a grid accounting for those points. Quadrants:

|-------|
| 2 | 3 |
|-------|
| 0 | 1 |
|-------|

Edges:

          exc
   maxX    2    maxY
       |-------|
       | 3 | 2 |
inc  3 |-------| 1  exc
       | 0 | 1 |
       |-------|
   minX    0    maxX
          inc

func FromTileMatrixSet

func FromTileMatrixSet(tileMatrixSet tms20.TileMatrixSet, deepestTMID tms20.TMID) *PointIndex

func (*PointIndex) GetHitMultiple

func (ix *PointIndex) GetHitMultiple(l Level) map[intgeom.Point][]int

func (*PointIndex) InsertCoord

func (ix *PointIndex) InsertCoord(deepestX int, deepestY int)

InsertCoord inserts a Point by its x/y coord on the deepest level

func (*PointIndex) InsertPoint

func (ix *PointIndex) InsertPoint(point geom.Point)

InsertPoint inserts a Point by its absolute coord

func (*PointIndex) InsertPolygon

func (ix *PointIndex) InsertPolygon(polygon geom.Polygon)

InsertPolygon inserts all points from a Polygon

func (*PointIndex) SnapClosestPoints

func (ix *PointIndex) SnapClosestPoints(line geom.Line, levelMap map[Level]any, ringID int) map[Level][][2]float64

SnapClosestPoints returns the points (centroids) in the index that are intersected by a line on multiple levels

type Q

type Q = int // quadrant index (0, 1, 2 or 3)

type Quadrant

type Quadrant struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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