import { SemanticType } from '../Semantics.js';
/**
 * Supported coordinate formats for geospatial data.
 */
export var GeospatialCoordinateFormat;
(function (GeospatialCoordinateFormat) {
    /**
     * Latitude, Longitude format: "40.7128,-74.0060"
     */
    GeospatialCoordinateFormat["LatLon"] = "lat,lon";
    /**
     * Longitude, Latitude format: "-74.0060,40.7128"
     */
    GeospatialCoordinateFormat["LonLat"] = "lon,lat";
    /**
     * PostGIS POINT format: "POINT(-74.0060 40.7128)"
     */
    GeospatialCoordinateFormat["PostGIS"] = "postgis";
    /**
     * Degree format with cardinal directions: "40.7128°N, 74.0060°W"
     */
    GeospatialCoordinateFormat["Degree"] = "degree";
    /**
     * Well-Known Text (WKT) format: "POINT(-74.0060 40.7128)"
     */
    GeospatialCoordinateFormat["WKT"] = "wkt";
    /**
     * GeoJSON format: {"type": "Point", "coordinates": [-74.0060, 40.7128]}
     */
    GeospatialCoordinateFormat["GeoJSON"] = "geojson";
})(GeospatialCoordinateFormat || (GeospatialCoordinateFormat = {}));
/**
 * Supported distance units for spatial queries.
 */
export var GeospatialDistanceUnit;
(function (GeospatialDistanceUnit) {
    /**
     * Meters (SI unit)
     */
    GeospatialDistanceUnit["Meters"] = "meters";
    /**
     * Kilometers
     */
    GeospatialDistanceUnit["Kilometers"] = "kilometers";
    /**
     * Miles (imperial)
     */
    GeospatialDistanceUnit["Miles"] = "miles";
    /**
     * Feet (imperial)
     */
    GeospatialDistanceUnit["Feet"] = "feet";
    /**
     * Yards (imperial)
     */
    GeospatialDistanceUnit["Yards"] = "yards";
    /**
     * Nautical miles
     */
    GeospatialDistanceUnit["NauticalMiles"] = "nautical_miles";
})(GeospatialDistanceUnit || (GeospatialDistanceUnit = {}));
/**
 * Supported spatial reference systems.
 */
export var GeospatialSpatialReferenceSystem;
(function (GeospatialSpatialReferenceSystem) {
    /**
     * WGS84 (World Geodetic System 1984) - Most common for GPS coordinates
     */
    GeospatialSpatialReferenceSystem["WGS84"] = "EPSG:4326";
    /**
     * Web Mercator - Common for web mapping
     */
    GeospatialSpatialReferenceSystem["WebMercator"] = "EPSG:3857";
    /**
     * NAD83 (North American Datum 1983)
     */
    GeospatialSpatialReferenceSystem["NAD83"] = "EPSG:4269";
    /**
     * NAD27 (North American Datum 1927)
     */
    GeospatialSpatialReferenceSystem["NAD27"] = "EPSG:4267";
})(GeospatialSpatialReferenceSystem || (GeospatialSpatialReferenceSystem = {}));
/**
 * Type guard to check if a semantic is a GeospatialCoordinates semantic.
 */
export const isGeospatialCoordinatesSemantic = (semantic) => {
    return semantic.id === SemanticType.GeospatialCoordinates;
};
/**
 * Helper function to create a GeospatialCoordinates semantic with configuration.
 */
export const createGeospatialCoordinatesSemantic = (config = {}) => {
    const mergedConfig = {
        ...DEFAULT_GEOSPATIAL_CONFIG,
        ...config,
    };
    if (config.metadata) {
        mergedConfig.metadata = { ...config.metadata };
    }
    if (config.validationBounds) {
        mergedConfig.validationBounds = { ...config.validationBounds };
    }
    return {
        id: SemanticType.GeospatialCoordinates,
        config: mergedConfig,
    };
};
/**
 * Default configuration for GeospatialCoordinates semantic.
 */
export const DEFAULT_GEOSPATIAL_CONFIG = {
    format: GeospatialCoordinateFormat.LatLon,
    spatialReferenceSystem: GeospatialSpatialReferenceSystem.WGS84,
    defaultDistanceUnit: GeospatialDistanceUnit.Meters,
    enableSpatialIndexing: true,
    enableValidation: true,
    enablePostGISIntegration: true,
    postGISGeometryType: 'POINT',
    enableDistanceQueries: true,
    maxQueryDistance: 100000,
    enableBoundingBoxQueries: true,
    enablePolygonQueries: false,
    apiEndpointPrefix: '/nearby',
    includeElevation: false,
    coordinatePrecision: 6,
    enableReverseGeocoding: false,
};
//# sourceMappingURL=GeospatialCoordinates.js.map