import { type Bbox, type RawMember, type RawOsm, type Tags } from './raw'; interface BlobRef { type: string; offset: number; size: number; } export declare class PbfFile { private readonly handle; readonly blobs: BlobRef[]; readonly header: { bbox?: Bbox; replicationTimestamp?: string; program?: string; }; private constructor(); static open(path: string): Promise; close(): Promise; readBlob(blob: BlobRef): Promise; sha256(): Promise; /** Decodes every OSMData blob and hands the block to `visit`. */ eachBlock(visit: (block: Block) => void): Promise; } declare class Block { readonly buf: Buffer; private strings; private groups; private cache; private granularity; private latOffset; private lonOffset; constructor(buf: Buffer); str(index: number): string; private tagsFrom; private lonOf; private latOf; /** Calls `visit(id, lon, lat, tags)`; tags are built only if `wantTags(id)`-free: callers read `tagsOf` lazily via the 5th arg. */ eachNode(visit: (id: number, lon: number, lat: number, tags: () => Tags | null) => void): void; private plainNode; private denseNodes; eachWay(visit: (id: number, refs: number[], tags: Tags) => void): void; eachRelation(visit: (id: number, tags: Tags, members: RawMember[]) => void): void; } export interface PbfReadOptions { /** Keep elements touching this box. Omitted, the PBF header's bbox (or everything it holds) is used. */ bbox?: Bbox; log?: (message: string) => void; } /** Reads a PBF into the common shape, keeping what touches `bbox`. */ export declare function readPbf(path: string, options?: PbfReadOptions): Promise<{ raw: RawOsm; bbox: Bbox | null; }>; export {};