osm2geojson-lite
Version:
a lightweight yet faster osm (either in xml or in json formats) to geojson convertor - 4x faster than xmldom + osmtogeojson in most situations - implemented in pure JavaScript without any 3rd party dependency
26 lines (25 loc) • 699 B
TypeScript
import type { RefElements } from './ref-elements';
import type { Feature } from 'geojson';
export declare abstract class OsmObject {
refCount: number;
hasTag: boolean;
protected refElems: RefElements;
private type;
private id;
private tags;
private props;
constructor(type: string, id: string, refElems: RefElements);
addTags(tags: {
[k: string]: string;
}): void;
addTag(k: string, v: string): void;
addProp(k: string, v: any): void;
addProps(props: {
[k: string]: string;
}): void;
getCompositeId(): string;
getProps(): {
[k: string]: string;
};
abstract toFeatureArray(): Array<Feature<any, any>>;
}