func (e *EdgeQuery) FindEdges(target distanceTarget) []EdgeQueryResult {
	return e.findEdges(target, e.opts)
}
FindEdges returns the edges for the given target that satisfy the current options.

Note that if opts.IncludeInteriors is true, the results may include some
entries with edge_id == -1. This indicates that the target intersects
the indexed polygon with the given ShapeID.
package s2
import (
	"sort"
	"github.com/golang/geo/s1"
)
type EdgeQueryOptions struct {
	common *queryOptions
}
func (e *EdgeQueryOptions) DistanceLimit(limit s1.ChordAngle) *EdgeQueryOptions {
	e.common = e.common.DistanceLimit(limit)
	return e
}
func (e *EdgeQueryOptions) IncludeInteriors(x bool) *EdgeQueryOptions {
	e.common = e.common.IncludeInteriors(x)
	return e
}
func (e *EdgeQueryOptions) UseBruteForce(x bool) *EdgeQueryOptions {
	e.common = e.common.UseBruteForce(x)
	return e
}
func (e *EdgeQueryOptions) MaxError(dist s1.ChordAngle) *EdgeQueryOptions {
	e.common = e.common.MaxError(dist)
	return e
}
func (e *EdgeQueryOptions) MaxResults(n int) *EdgeQueryOptions {
	e.common = e.common.MaxResults(n)
	return e
}
func NewClosestEdgeQueryOptions() *EdgeQueryOptions {
	return &EdgeQueryOptions{
		common: newQueryOptions(minDistance(0)),
	}
}
func NewFurthestEdgeQueryOptions() *EdgeQueryOptions {
	return &EdgeQueryOptions{
		common: newQueryOptions(maxDistance(0)),
	}
}
type EdgeQueryResult struct {
	distance distance
	shapeID  int32
	edgeID   int32
}
func (e EdgeQueryResult) Distance() s1.ChordAngle { return e.distance.chordAngle() }
func (e EdgeQueryResult) ShapeID() int32 { return e.shapeID }
func (e EdgeQueryResult) EdgeID() int32 { return e.edgeID }
func newEdgeQueryResult(target distanceTarget) EdgeQueryResult {
	return EdgeQueryResult{
		distance: target.distance().infinity(),
		shapeID:  -1,
		edgeID:   -1,
	}
}
func (e EdgeQueryResult) IsInterior() bool {
	return e.shapeID >= 0 && e.edgeID < 0
}
func (e EdgeQueryResult) IsEmpty() bool {
	return e.shapeID < 0
}
func (e EdgeQueryResult) Less(other EdgeQueryResult) bool {
	if e.distance.chordAngle() != other.distance.chordAngle() {
		return e.distance.less(other.distance)
	}
	if e.shapeID != other.shapeID {
		return e.shapeID < other.shapeID
	}
	return e.edgeID < other.edgeID
}
type EdgeQuery struct {
	index  *ShapeIndex
	opts   *queryOptions
	target distanceTarget
	useConservativeCellDistance bool
	indexNumEdges      int
	indexNumEdgesLimit int
	distanceLimit distance
	results []EdgeQueryResult
	avoidDuplicates bool
	testedEdges map[ShapeEdgeID]uint32
	indexCovering []CellID
	indexCells    []*ShapeIndexCell
	queue *queryQueue
	iter                *ShapeIndexIterator
	maxDistanceCovering []CellID
	initialCells        []CellID
}
func NewClosestEdgeQuery(index *ShapeIndex, opts *EdgeQueryOptions) *EdgeQuery {
	if opts == nil {
		opts = NewClosestEdgeQueryOptions()
	}
	e := &EdgeQuery{
		testedEdges: make(map[ShapeEdgeID]uint32),
		index:       index,
		opts:        opts.common,
		queue:       newQueryQueue(),
	}
	return e
}
func NewFurthestEdgeQuery(index *ShapeIndex, opts *EdgeQueryOptions) *EdgeQuery {
	if opts == nil {
		opts = NewFurthestEdgeQueryOptions()
	}
	e := &EdgeQuery{
		testedEdges: make(map[ShapeEdgeID]uint32),
		index:       index,
		opts:        opts.common,
		queue:       newQueryQueue(),
	}
	return e
}
func (e *EdgeQuery) Reset() {
	e.indexNumEdges = 0
	e.indexNumEdgesLimit = 0
	e.indexCovering = nil
	e.indexCells = nil
}