import { xLuceneTypeConfig, ClientMetadata } from '@terascope/types'; import BaseType from '../base-type.js'; import { GraphQLType, TypeESMapping, DuckDBTypeConfig } from '../../interfaces.js'; /** * A GeoJSON geometry (point, polygon, or multi-polygon) stored as an * Elasticsearch/OpenSearch `geo_shape`, enabling shape-relation queries * (intersects, within, contains, disjoint). * * - **ES/OpenSearch mapping:** `{ type: 'geo_shape' }`. Unlike most types this * cannot be excluded from indexing — `GeoJSON` is in `indexedRequiredFieldTypes`, * so `indexed: false` will throw. * - **GraphQL:** a `GeoJSON` custom scalar (the `scalar GeoJSON` definition is * emitted alongside the field). * - **xLucene:** `GeoJSON`. * * @example * const config: DataTypeConfig = { * version: 1, * fields: { region: { type: 'GeoJSON' } } * }; */ export default class GeoJSON extends BaseType { toESMapping(_clientMetaData: ClientMetadata): TypeESMapping; toGraphQL(): GraphQLType; toXlucene(): xLuceneTypeConfig; /** * The DuckDB column type for this field: GEOMETRY. * * Storing the shape as GEOMETRY rather than JSON text means it is parsed once at ingest * instead of on every spatial query, and it is written to Parquet as GeoParquet (WKB). * GEOMETRY is a core DuckDB type, so storing it needs no extension; the spatial * functions that query it need the `spatial` extension. */ toDuckDB(): DuckDBTypeConfig; } //# sourceMappingURL=geo-json.d.ts.map