Documentation
¶
Index ¶
- Variables
- func AppendPropertiesWithJSON(ctx context.Context, opts *PropertiesResponseOptions, source []byte, ...) ([]byte, error)
- func SpatialIdWithFeature(body []byte, extra ...interface{}) (string, error)
- type Filter
- type PropertiesResponse
- type PropertiesResponseOptions
- type PropertiesResponseResults
- type SpatialIndex
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("Not found")
ErrNotFound is an error indicating that an item is not present or was not found.
View Source
var ErrNotImplemented = errors.New("Not implemented")
ErrNotImplemented is an error indicating that a feature or specific functionality is not implemented.
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 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 performs a point-in-polygon operation yielding matching records in an iterator. PointInPolygonWithIterator(context.Context, *orb.Point, ...Filter) iter.Seq2[spr.StandardPlacesResult, error] // Intersects performs a intersects operation (as in intersecting geometries) to retrieve matching records from the index. Intersects(context.Context, orb.Geometry, ...Filter) (spr.StandardPlacesResults, error) // IntersectsWithIterator performs a intersects operation (as in intersecting geometries) yielding matching records in an iterator. IntersectsWithIterator(context.Context, orb.Geometry, ...Filter) iter.Seq2[spr.StandardPlacesResult, error] // 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.