/** * S-52 Lookup Table: maps S-57 object class codes (OBJL) to rendering instructions. * * This is a simplified version of the full S-52 Presentation Library. * Real S-52 uses conditional symbology procedures (CSP) for objects * like DEPARE, SOUNDG, LIGHTS. Here we use direct lookup with * depth-based coloring for DEPARE. */ export type SymbolType = 'area' | 'line' | 'point' | 'text'; export interface RenderInstruction { type: SymbolType; /** Fill color token (for areas) */ fill?: string; /** Fill opacity 0..1 */ fillAlpha?: number; /** Stroke color token */ stroke?: string; /** Stroke width in pixels */ strokeWidth?: number; /** Dash pattern (array of [dash, gap] lengths) */ dashPattern?: number[]; /** Point radius in pixels */ radius?: number; /** Point shape */ shape?: 'circle' | 'triangle' | 'square' | 'diamond'; /** Display priority (0=bottom, 9=top). S-52 uses 0-9. */ priority: number; /** Human-readable name */ description?: string; /** ATTL code to use as text label (e.g. 174=VALSOU for soundings) */ textAttl?: number; /** Color token for text */ textColor?: string; /** Font size in pixels */ textSize?: number; /** Text alignment */ textAlign?: CanvasTextAlign; /** Text vertical offset in pixels (positive = down) */ textOffsetY?: number; /** Format function name for text value ('depth'|'depthContour'|'lightChar') */ textFormat?: 'depth' | 'depthContour' | 'lightChar'; /** Whether this object can render sector arcs */ sectorLight?: boolean; /** Arc radius for sector lights */ sectorRadius?: number; /** Pattern type for area fill */ pattern?: 'hatch' | 'cross-hatch' | 'stipple'; /** Pattern spacing in pixels */ patternSpacing?: number; /** Pattern color token */ patternColor?: string; } /** * S-57 OBJL codes for the most common navigational objects. * Full catalogue has 200+ codes; these cover ~90% of typical chart content. */ export declare const OBJL: { readonly ADMARE: 1; readonly ACHBRT: 2; readonly ACHARE: 3; readonly BCNCAR: 5; readonly BCNLAT: 8; readonly BERTHS: 11; readonly BRIDGE: 12; readonly BUISGL: 13; readonly BUAARE: 14; readonly BOYCAR: 15; readonly BOYLAT: 17; readonly BOYSAW: 19; readonly BOYSPP: 20; readonly CBLOHD: 21; readonly CBLSUB: 22; readonly CANALS: 23; readonly COALNE: 30; readonly CONZNE: 31; readonly DEPARE: 42; readonly DEPCNT: 43; readonly DMPGRD: 46; readonly DWRTCL: 48; readonly FAIRWY: 49; readonly FERYRT: 51; readonly FSHZNE: 54; readonly FOGSIG: 55; readonly GATCON: 57; readonly LNDARE: 71; readonly LNDELV: 72; readonly LIGHTS: 75; readonly LITFLT: 76; readonly LNDMRK: 77; readonly LOKBSN: 78; readonly MAGVAR: 79; readonly MARCUL: 81; readonly MIPARE: 83; readonly MORFAC: 84; readonly OBSTRN: 86; readonly OFSPLF: 87; readonly OSPARE: 89; readonly PILBOP: 90; readonly PILPNT: 91; readonly PIPOHD: 92; readonly PIPSOL: 93; readonly PRDARE: 95; readonly RAILWY: 97; readonly RECTRC: 98; readonly RESARE: 112; readonly RIVERS: 114; readonly ROADWY: 116; readonly RUNWAY: 117; readonly SBDARE: 119; readonly SLCONS: 122; readonly SLOGRD: 123; readonly SOUNDG: 129; readonly SPRING: 131; readonly SWPARE: 134; readonly TOPMAR: 144; readonly TSELNE: 148; readonly TSEZNE: 149; readonly TSSBND: 150; readonly TSSCRS: 151; readonly TSSRON: 152; readonly TWRTPT: 153; readonly UWTROC: 154; readonly WATTUR: 155; readonly WRECKS: 159; readonly M_COVR: 302; readonly M_CSCL: 303; readonly M_HOPA: 304; readonly M_NPUB: 305; readonly M_NSYS: 306; readonly M_QUAL: 308; readonly M_SDAT: 309; readonly M_SREL: 310; readonly M_VDAT: 312; }; /** * Default lookup table for S-52 rendering. * Maps OBJL code to rendering instructions. */ export declare const LOOKUP_TABLE: Map; /** Default fallback rendering for unknown OBJL codes */ export declare const DEFAULT_INSTRUCTION: RenderInstruction; export { ATTL } from '@s57-parser/s57'; /** Map S-57 COLOUR code to light color token */ export declare function lightColorToken(colourCode: string | undefined): string; /** * Format a depth value for chart display (S-52 style). * Whole meters: "12". Decimeters: "12₃" (subscript last digit). */ export declare function formatDepth(value: string | number): string; /** * Format light characteristic label (S-52 style). * Example: "Fl(3) 10s" for flashing, group of 3, period 10s. */ export declare function formatLightChar(attrs: Map): string; /** * Get the depth-dependent fill color for a DEPARE feature. * Uses DRVAL1 (minimum depth) and DRVAL2 (maximum depth) attributes. */ export declare function depareColor(drval1: number, drval2: number): string; /** * Look up rendering instruction for an S-57 feature. * Handles conditional symbology for DEPARE and LIGHTS. */ export declare function lookupInstruction(objl: number, attributes?: Map): RenderInstruction; //# sourceMappingURL=lookup.d.ts.map