UNPKG

gis-tools-ts

Version:

A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.

41 lines 1.25 kB
import { OSMReader } from './index.js'; import type { OsmReaderOptions } from './index.js'; import type { FeatureIterator, OSMMetadata, OSMProperties, Properties } from '../../index.js'; /** * # OSM File Reader * * ## Description * Parses OSM PBF files * Implements the {@link FeatureIterator} interface * * ## Usage * ```ts * import { OSMFileReader } from 'gis-tools-ts/file'; * * const reader = new OSMFileReader('./data.osm.pbf'); * * // pull out the header * const header = reader.getHeader(); * * // read the features * for (const feature of reader) { * console.log(feature); * } * * // close the reader when done * reader.close(); * ``` * * ## Links * - https://wiki.openstreetmap.org/wiki/PBF_Format * - https://github.com/openstreetmap/pbf/blob/master/OSM-binary.md */ export declare class OSMFileReader extends OSMReader implements FeatureIterator<OSMMetadata, Properties, OSMProperties> { options?: OsmReaderOptions | undefined; /** * @param input - The input (may be a local memory filter or file reader) * @param options - User defined options to apply when reading the OSM file */ constructor(input: string, options?: OsmReaderOptions | undefined); } //# sourceMappingURL=file.d.ts.map