UNPKG

@npm9912/s-gml

Version:

TypeScript library for parsing, converting, and validating GML 2.1.2/3.0/3.2

47 lines (46 loc) 1.76 kB
import { Builder, GmlConvertOptions, GmlFeature, GmlFeatureCollection, GmlGeometry, Feature, FeatureCollection, Geometry } from './types.js'; export declare class GmlParser { private builder; constructor(targetFormat?: string | Builder); parse(xml: string): Promise<Geometry | Feature | FeatureCollection>; parseFromUrl(url: string): Promise<Geometry | Feature | FeatureCollection>; convert(xml: string, options: GmlConvertOptions): Promise<string>; convertFromUrl(url: string, options: GmlConvertOptions): Promise<string>; private fetchXml; convertGeometry(gmlObject: GmlGeometry | GmlFeature | GmlFeatureCollection, options: Pick<GmlConvertOptions, 'outputVersion' | 'prettyPrint'>): Promise<string>; private parseGml; private parseElement; private parsePoint; private parseLineString; private parsePolygon; private parseLinearRing; private parseEnvelope; private parseBox; private parseCurve; private parseSurface; private parseMultiSurface; private parseMultiPoint; private parseMultiLineString; private parseMultiPolygon; private parseFeatureCollection; private parseFeatureMember; private parseFeatureElement; private extractPolygonCoordinates; private toGeoJson; private toGeoJsonFeature; private geometryToGeoJson; private findFirstGmlEntry; private findFeatureCollectionNode; private findGeometryNode; private searchGeometry; private extractFeatureProperties; private normalizePropertyValue; private getText; private parseDimension; private ensureArray; private toCoordinateTuples; private normalizeElement; private getLocalName; private isFeatureCollection; private isFeature; }