/**
 * Streaming GML Parser
 *
 * Parses large GML files in a streaming fashion without loading
 * the entire file into memory. Ideal for processing large WFS responses
 * or multi-GB GML datasets.
 *
 * Usage:
 * ```typescript
 * const parser = new StreamingGmlParser();
 *
 * parser.on('feature', (feature) => {
 *   console.log('Parsed feature:', feature);
 * });
 *
 * parser.on('end', () => {
 *   console.log('Parsing complete');
 * });
 *
 * await parser.parseStream(readableStream);
 * ```
 */
import { Builder, Feature } from './types.js';
export interface StreamingParserOptions {
    /**
     * Output format builder
     */
    builder?: Builder;
    /**
     * Batch size for processing features
     * Higher values = more memory but better performance
     * Default: 100
     */
    batchSize?: number;
    /**
     * Maximum buffer size in bytes before forcing a flush
     * Default: 10MB
     */
    maxBufferSize?: number;
}
export type FeatureCallback = (feature: Feature) => void | Promise<void>;
export type ErrorCallback = (error: Error) => void;
export type EndCallback = () => void;
export declare class StreamingGmlParser {
    private gmlParser;
    private batchSize;
    private maxBufferSize;
    private featureCallbacks;
    private errorCallbacks;
    private endCallbacks;
    private buffer;
    private featureBatch;
    private featureCount;
    constructor(options?: StreamingParserOptions);
    /**
     * Register a callback for each parsed feature
     */
    on(event: 'feature', callback: FeatureCallback): this;
    on(event: 'error', callback: ErrorCallback): this;
    on(event: 'end', callback: EndCallback): this;
    /**
     * Parse a ReadableStream (Node.js or Browser)
     */
    parseStream(stream: ReadableStream<Uint8Array> | NodeJS.ReadableStream): Promise<void>;
    /**
     * Parse from a file path (Node.js only)
     */
    parseFile(filePath: string): Promise<void>;
    /**
     * Parse from a URL
     */
    parseFromUrl(url: string): Promise<void>;
    private parseNodeStream;
    private parseWebStream;
    private processChunk;
    private extractFeatures;
    private parseFeatureXml;
    private flushBatch;
    private emitError;
    private isNodeStream;
    /**
     * Get the total number of features parsed
     */
    getFeatureCount(): number;
}
/**
 * Convenience function to parse a large GML stream
 */
export declare function parseGmlStream(stream: ReadableStream<Uint8Array> | NodeJS.ReadableStream | string, onFeature: FeatureCallback, options?: StreamingParserOptions): Promise<number>;
