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
}
Less reports if this results is less that the other first by distance,
then by (shapeID, edgeID). This is used for sorting.
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
}