import type { AppliedDataSemantic } from '../Semantics.js';
import { SemanticType } from '../Semantics.js';
/**
 * Supported coordinate formats for geospatial data.
 */
export declare enum GeospatialCoordinateFormat {
    /**
     * Latitude, Longitude format: "40.7128,-74.0060"
     */
    LatLon = "lat,lon",
    /**
     * Longitude, Latitude format: "-74.0060,40.7128"
     */
    LonLat = "lon,lat",
    /**
     * PostGIS POINT format: "POINT(-74.0060 40.7128)"
     */
    PostGIS = "postgis",
    /**
     * Degree format with cardinal directions: "40.7128°N, 74.0060°W"
     */
    Degree = "degree",
    /**
     * Well-Known Text (WKT) format: "POINT(-74.0060 40.7128)"
     */
    WKT = "wkt",
    /**
     * GeoJSON format: {"type": "Point", "coordinates": [-74.0060, 40.7128]}
     */
    GeoJSON = "geojson"
}
/**
 * Supported distance units for spatial queries.
 */
export declare enum GeospatialDistanceUnit {
    /**
     * Meters (SI unit)
     */
    Meters = "meters",
    /**
     * Kilometers
     */
    Kilometers = "kilometers",
    /**
     * Miles (imperial)
     */
    Miles = "miles",
    /**
     * Feet (imperial)
     */
    Feet = "feet",
    /**
     * Yards (imperial)
     */
    Yards = "yards",
    /**
     * Nautical miles
     */
    NauticalMiles = "nautical_miles"
}
/**
 * Supported spatial reference systems.
 */
export declare enum GeospatialSpatialReferenceSystem {
    /**
     * WGS84 (World Geodetic System 1984) - Most common for GPS coordinates
     */
    WGS84 = "EPSG:4326",
    /**
     * Web Mercator - Common for web mapping
     */
    WebMercator = "EPSG:3857",
    /**
     * NAD83 (North American Datum 1983)
     */
    NAD83 = "EPSG:4269",
    /**
     * NAD27 (North American Datum 1927)
     */
    NAD27 = "EPSG:4267"
}
/**
 * Configuration options for the GeospatialCoordinates semantic.
 * These options control how the runtime handles geospatial data and queries.
 */
export interface GeospatialCoordinatesConfig {
    /**
     * The coordinate format expected for input/output.
     * Defaults to 'lat,lon' if not specified.
     */
    format?: GeospatialCoordinateFormat;
    /**
     * The spatial reference system (SRS) for the coordinates.
     * Defaults to WGS84 (EPSG:4326) if not specified.
     *
     * Note: If `format` is set to `GeoJSON`, this value is automatically locked to `WGS84`
     * as per the GeoJSON specification (RFC 7946).
     */
    spatialReferenceSystem?: GeospatialSpatialReferenceSystem;
    /**
     * The default distance unit for spatial queries.
     * Defaults to 'meters' if not specified.
     * Only applicable when `enableDistanceQueries` is true.
     */
    defaultDistanceUnit?: GeospatialDistanceUnit;
    /**
     * Whether to enable automatic spatial indexing.
     * Defaults to true if not specified.
     */
    enableSpatialIndexing?: boolean;
    /**
     * Whether to enable automatic coordinate validation.
     * Defaults to true if not specified.
     */
    enableValidation?: boolean;
    /**
     * Custom validation rules for coordinate bounds.
     * Values are in decimal degrees.
     * If not specified, uses standard latitude (-90.0 to 90.0) and longitude (-180.0 to 180.0) bounds.
     */
    validationBounds?: {
        /**
         * Minimum latitude value
         */
        minLatitude?: number;
        /**
         * Maximum latitude value
         */
        maxLatitude?: number;
        /**
         * Minimum longitude value
         */
        minLongitude?: number;
        /**
         * Maximum longitude value
         */
        maxLongitude?: number;
    };
    /**
     * Whether to enable automatic PostGIS integration when using PostgreSQL.
     * Defaults to true if not specified.
     *
     * This is an advanced setting. For UIs targeting non-technical users,
     * it is safe to hide this option and keep it enabled. The backend should
     * gracefully handle cases where the database is not PostgreSQL.
     */
    enablePostGISIntegration?: boolean;
    /**
     * The PostGIS geometry type to use for storage.
     * Defaults to 'POINT' if not specified.
     * This choice fundamentally defines the shape of the data and the types of queries that can be performed.
     *
     * - **POINT**: For single locations (e.g., a store, a user's location).
     * - **LINESTRING**: For paths or routes (e.g., a delivery route, a hiking trail).
     * - **POLYGON**: For defined areas (e.g., a delivery zone, a sales territory, a city boundary).
     * - **MULTI***: For collections of the above types (e.g., all stores in a chain as a MULTIPOINT).
     */
    postGISGeometryType?: 'POINT' | 'LINESTRING' | 'POLYGON' | 'MULTIPOINT' | 'MULTILINESTRING' | 'MULTIPOLYGON';
    /**
     * Whether to enable distance-based query endpoints.
     * This is not mutually exclusive with other query types and is useful for all geometry types.
     * Defaults to true if not specified.
     *
     * - For **POINT**: Finds points within a certain radius.
     * - For **POLYGON**: Finds polygons that are within a certain distance of a point
     *   (e.g., "find all parks within 5 miles").
     * - For **LINESTRING**: Finds paths/routes within a certain distance of a point
     *   (e.g., "find all subway lines near me").
     */
    enableDistanceQueries?: boolean;
    /**
     * Maximum distance allowed in distance queries (in the default distance unit).
     * Defaults to 100000 (100km) if not specified.
     * Only applicable when `enableDistanceQueries` is true.
     */
    maxQueryDistance?: number;
    /**
     * Whether to enable bounding box query endpoints.
     * This is not mutually exclusive with other query types.
     * Defaults to true if not specified.
     */
    enableBoundingBoxQueries?: boolean;
    /**
     * Whether to enable polygon intersection query endpoints.
     * This is not mutually exclusive with other query types.
     * Defaults to false if not specified.
     */
    enablePolygonQueries?: boolean;
    /**
     * Custom API endpoint prefix for geospatial queries.
     * Defaults to '/nearby' if not specified.
     * Only applicable if `enableDistanceQueries`, `enableBoundingBoxQueries`,
     * or `enablePolygonQueries` is true.
     *
     * The generated endpoints would be:
     * - **Distance Query**: `GET {apiEndpointPrefix}`
     * - **Bounding Box Query**: `GET {apiEndpointPrefix}/bbox`
     * - **Polygon Query**: `POST {apiEndpointPrefix}/polygon`
     */
    apiEndpointPrefix?: string;
    /**
     * Whether to include elevation data in coordinates (3D coordinates).
     * Defaults to false if not specified.
     * When true, a third value for elevation is expected in the coordinate data.
     *
     * - **LatLon**: `"40.7128,-74.0060,10"` (latitude, longitude, elevation)
     * - **PostGIS/WKT**: `"POINT Z (-74.0060 40.7128 10)"`
     * - **GeoJSON**: `{"type": "Point", "coordinates": [-74.0060, 40.7128, 10]}`
     *
     * The unit for elevation is determined by `defaultDistanceUnit`.
     */
    includeElevation?: boolean;
    /**
     * Precision for coordinate storage (number of decimal places).
     * Defaults to 6 if not specified.
     */
    coordinatePrecision?: number;
    /**
     * Whether to enable reverse geocoding capabilities.
     * Defaults to false if not specified.
     *
     * When enabled, the system can convert geographic coordinates (e.g., `40.7128, -74.0060`)
     * into a human-readable address (e.g., "New York, NY, USA").
     *
     * This often requires integration with an external geocoding service and may have
     * associated costs or usage limits.
     */
    enableReverseGeocoding?: boolean;
    /**
     * Custom metadata for the geospatial field.
     */
    metadata?: Record<string, unknown>;
    /**
     * Index signature to allow additional properties.
     */
    [key: string]: unknown;
}
/**
 * Type-safe configuration for GeospatialCoordinates semantic.
 */
export interface AppliedGeospatialCoordinatesSemantic extends AppliedDataSemantic {
    id: SemanticType.GeospatialCoordinates;
    config?: GeospatialCoordinatesConfig;
}
/**
 * Type guard to check if a semantic is a GeospatialCoordinates semantic.
 */
export declare const isGeospatialCoordinatesSemantic: (semantic: AppliedDataSemantic) => semantic is AppliedGeospatialCoordinatesSemantic;
/**
 * Helper function to create a GeospatialCoordinates semantic with configuration.
 */
export declare const createGeospatialCoordinatesSemantic: (config?: GeospatialCoordinatesConfig) => AppliedGeospatialCoordinatesSemantic;
/**
 * Default configuration for GeospatialCoordinates semantic.
 */
export declare const DEFAULT_GEOSPATIAL_CONFIG: GeospatialCoordinatesConfig;
//# sourceMappingURL=GeospatialCoordinates.d.ts.map