Documentation
¶
Index ¶
- func AppendPropertiesWithJSON(ctx context.Context, opts *PropertiesResponseOptions, source []byte, ...) ([]byte, error)
- func SpatialIdWithFeature(body []byte, extra ...interface{}) (string, error)
- type Filter
- type PointInPolygonCandidate
- type PropertiesResponse
- type PropertiesResponseOptions
- type PropertiesResponseResults
- type SpatialIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendPropertiesWithJSON ¶ added in v0.0.48
func SpatialIdWithFeature ¶ added in v0.0.23
SpatialIdWithFeatures generates a unique identifiers derived from the feature data in 'body'.
Types ¶
type Filter ¶ added in v0.0.42
type Filter interface {
HasPlacetypes(flags.PlacetypeFlag) bool
MatchesInception(flags.DateFlag) bool
MatchesCessation(flags.DateFlag) bool
IsCurrent(flags.ExistentialFlag) bool
IsDeprecated(flags.ExistentialFlag) bool
IsCeased(flags.ExistentialFlag) bool
IsSuperseded(flags.ExistentialFlag) bool
IsSuperseding(flags.ExistentialFlag) bool
IsAlternateGeometry(flags.AlternateGeometryFlag) bool
HasAlternateGeometry(flags.AlternateGeometryFlag) bool
}
type PointInPolygonCandidate ¶
type PropertiesResponse ¶
type PropertiesResponse map[string]interface{}
type PropertiesResponseOptions ¶ added in v0.0.51
type PropertiesResponseResults ¶
type PropertiesResponseResults struct {
Properties []*PropertiesResponse `json:"places"` // match spr response
}
func PropertiesResponseResultsWithStandardPlacesResults ¶ added in v0.0.48
func PropertiesResponseResultsWithStandardPlacesResults(ctx context.Context, opts *PropertiesResponseOptions, results spr.StandardPlacesResults) (*PropertiesResponseResults, error)
type SpatialIndex ¶ added in v0.0.28
type SpatialIndex interface {
// IndexFeature adds a Who's On First GeoJSON feature to the index.
IndexFeature(context.Context, []byte) error
// RemoveFeature removes a Who's On First GeoJSON feature from the index.
RemoveFeature(context.Context, string) error
// PointInPolygon performs a point-in-polygon operation to retrieve matching records from the index.
PointInPolygon(context.Context, *orb.Point, ...Filter) (spr.StandardPlacesResults, error)
// PointInPolygon returns the initial candidates for a point-in-polygon operation.
PointInPolygonCandidates(context.Context, *orb.Point, ...Filter) ([]*PointInPolygonCandidate, error)
// PointInPolygon performs a point-in-polygon operation to retrieve matching records from the index returning each match (or errors) to user-defined channels.
PointInPolygonWithChannels(context.Context, chan spr.StandardPlacesResult, chan error, chan bool, *orb.Point, ...Filter)
// PointInPolygon returns the initial candidates for a point-in-polygon operation to a set of user-defined channels.
PointInPolygonCandidatesWithChannels(context.Context, chan *PointInPolygonCandidate, chan error, chan bool, *orb.Point, ...Filter)
// Disconnect closes any underlying connections used by the index.
Disconnect(context.Context) error
}
SpatialIndex defines an interface for performing spatial operations on a collection of Who's On First GeoJSON features.
Click to show internal directories.
Click to hide internal directories.