Documentation
¶
Overview ¶
Package pmtiles implements the `whosonfirst/go-whosonfirst-spatial` interfaces using a Protomaps `.pmtiles` database.
Index ¶
- func NewPMTilesSpatialDatabase(ctx context.Context, uri string) (database.SpatialDatabase, error)
- func NewPMTilesSpatialDatabaseReader(ctx context.Context, uri string) (reader.Reader, error)
- type Counter
- type PMTilesResults
- type PMTilesSpatialDatabase
- func (db *PMTilesSpatialDatabase) Disconnect(ctx context.Context) error
- func (db *PMTilesSpatialDatabase) IndexFeature(context.Context, []byte) error
- func (db *PMTilesSpatialDatabase) Intersects(ctx context.Context, geom orb.Geometry, filters ...spatial.Filter) (spr.StandardPlacesResults, error)
- func (db *PMTilesSpatialDatabase) IntersectsWithIterator(ctx context.Context, geom orb.Geometry, filters ...spatial.Filter) iter.Seq2[spr.StandardPlacesResult, error]
- func (db *PMTilesSpatialDatabase) PointInPolygon(ctx context.Context, coord *orb.Point, filters ...spatial.Filter) (spr.StandardPlacesResults, error)
- func (db *PMTilesSpatialDatabase) PointInPolygonWithIterator(ctx context.Context, coord *orb.Point, filters ...spatial.Filter) iter.Seq2[spr.StandardPlacesResult, error]
- func (db *PMTilesSpatialDatabase) Read(ctx context.Context, path string) (io.ReadSeekCloser, error)
- func (db *PMTilesSpatialDatabase) ReaderURI(ctx context.Context, path string) string
- func (db *PMTilesSpatialDatabase) RemoveFeature(context.Context, string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Counter ¶ added in v0.6.0
type Counter struct {
// contains filtered or unexported fields
}
func NewCounter ¶ added in v0.6.0
func NewCounter() *Counter
type PMTilesResults ¶ added in v0.8.0
type PMTilesResults struct { spr.StandardPlacesResults `json:",omitempty"` Places []spr.StandardPlacesResult `json:"places"` }
func (*PMTilesResults) Results ¶ added in v0.8.0
func (r *PMTilesResults) Results() []spr.StandardPlacesResult
type PMTilesSpatialDatabase ¶
type PMTilesSpatialDatabase struct { database.SpatialDatabase // contains filtered or unexported fields }
func (*PMTilesSpatialDatabase) Disconnect ¶
func (db *PMTilesSpatialDatabase) Disconnect(ctx context.Context) error
func (*PMTilesSpatialDatabase) IndexFeature ¶
func (db *PMTilesSpatialDatabase) IndexFeature(context.Context, []byte) error
func (*PMTilesSpatialDatabase) Intersects ¶ added in v0.8.0
func (*PMTilesSpatialDatabase) IntersectsWithIterator ¶ added in v0.8.0
func (*PMTilesSpatialDatabase) PointInPolygon ¶
func (*PMTilesSpatialDatabase) PointInPolygonWithIterator ¶ added in v0.8.0
func (*PMTilesSpatialDatabase) Read ¶ added in v0.0.3
func (db *PMTilesSpatialDatabase) Read(ctx context.Context, path string) (io.ReadSeekCloser, error)
Read implements the whosonfirst/go-reader.Reader interface
func (*PMTilesSpatialDatabase) ReaderURI ¶ added in v0.0.3
func (db *PMTilesSpatialDatabase) ReaderURI(ctx context.Context, path string) string
func (*PMTilesSpatialDatabase) RemoveFeature ¶
func (db *PMTilesSpatialDatabase) RemoveFeature(context.Context, string) error
Click to show internal directories.
Click to hide internal directories.