Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finder ¶
type Finder struct {
// contains filtered or unexported fields
}
func NewCompressedFinder ¶
type HTTPRangeFetcher ¶ added in v0.2.0
HTTPRangeFetcher implements SlabFetcher against any HTTP server that supports Range requests (S3, R2, GCS signed URLs, plain HTTP file servers).
func (*HTTPRangeFetcher) FetchRange ¶ added in v0.2.0
type RemoteFinder ¶ added in v0.2.0
type RemoteFinder struct {
// contains filtered or unexported fields
}
RemoteFinder queries geographic divisions using a remote polygon slab.
The compact index (~26 MB raw, ~16 MB gzipped) holds only subtype, bbox, and slab offsets per division — no names or IDs. All string metadata is read from the slab chunk after polygon containment is confirmed, so name and ID resolution always comes from the same fetch that checks the polygon.
This design minimises cold-start index size and in-memory footprint (~43 MB for the index structures) at the cost of at most one extra Range request per query on the short-circuit path (single unambiguous candidate, interior point) and for the country preindex path.
func NewRemoteFinder ¶ added in v0.2.0
func NewRemoteFinder(indexBytes []byte, fetcher SlabFetcher, cacheSize int) (*RemoteFinder, error)
NewRemoteFinder constructs a RemoteFinder from a raw (uncompressed) compact index (XSCI format) and a SlabFetcher for the .xs-poly slab. cacheSize is the number of slab chunks kept in an LRU cache (0 = disabled).
func NewRemoteFinderFromGzip ¶ added in v0.2.0
func NewRemoteFinderFromGzip(gzipBytes []byte, fetcher SlabFetcher, cacheSize int) (*RemoteFinder, error)
NewRemoteFinderFromGzip accepts a gzip-compressed index produced by xs-remote-split --compress.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
xs-query
command
|
|
|
xs-serve
command
|
|
|
generated
|
|
|
internal
|
|
|
cmd/xs-compress
command
|
|
|
cmd/xs-encode
command
|
|
|
cmd/xs-remote-split
command
xs-remote-split splits a .cf.bin compressed divisions file into two files:
|
xs-remote-split splits a .cf.bin compressed divisions file into two files: |
|
cmd/xs-simplify
command
|
|
|
cmd/xs-topo-simplify
command
|
|
|
compactidx
Package compactidx provides a compact binary format for the remote finder index.
|
Package compactidx provides a compact binary format for the remote finder index. |
|
geom
Package geom provides zero-dependency 2-D geometry primitives and a YStripes-indexed point-in-polygon query.
|
Package geom provides zero-dependency 2-D geometry primitives and a YStripes-indexed point-in-polygon query. |
|
topology
Package topology provides topology-aware polygon simplification and deduplication for division boundary data.
|
Package topology provides topology-aware polygon simplification and deduplication for division boundary data. |