diff --git a/libs/ncm/geophysical/geophysical-response.model.ts b/libs/ncm/geophysical/geophysical-response.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..185f0aab41236701553adb66e4262eb46f84743a --- /dev/null +++ b/libs/ncm/geophysical/geophysical-response.model.ts @@ -0,0 +1,47 @@ +import {UsageParameter} from '../../erp/rtgm'; +import {Location} from '../../nshmp-lib/geo'; + +/** NCM geophysical service response. */ +export interface GeophysicalRequestData { + location: Location; + depths: DepthRequestData; +} + +export interface DepthRequestData { + depth_min: number; + depth_inc: number; + depth_max: number; + depth_vector: number[]; + units: string; +} + +export interface GeophysicalResponseData { + metadata: GeophysicalResponseMetadata; + results: GeophysicalResults[]; +} + +export interface GeophysicalResponseMetadata { + water_table_depth: UsageParameter; + temperature: UsageParameter; + porosity: UsageParameter; + vs: UsageParameter; + vp: UsageParameter; + density: UsageParameter; +} + +export interface GeophysicalResults { + location: LocationResults; + profile: Profiles; +} + +export interface LocationResults extends Location { + water_table_depth: number; +} + +export interface Profiles { + temperature: number[]; + porosity: number[]; + vs: number[]; + vp: number[]; + density: number[]; +} diff --git a/libs/ncm/geophysical/geophysical-usage.model.ts b/libs/ncm/geophysical/geophysical-usage.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..28f0b065e54662d68ade846021b9acef906a8b78 --- /dev/null +++ b/libs/ncm/geophysical/geophysical-usage.model.ts @@ -0,0 +1,32 @@ +import {UsageParameter} from '../../erp/rtgm'; +import {Response} from '../../nshmp-ws-utils'; + +/** NCM geophysical usage response */ +export type GeophysicalUsage = Response<string, GeophysicalUsageResponseData>; + +export interface GeophysicalUsageResponseData { + description: string; + syntax: string; + parameters: GeophysicalParameters; +} + +export interface GeophysicalParameters { + location: LocationParameter; + depths: DepthParameter; +} + +export interface LocationParameter { + latitude: NcmUsageParameter; + longitude: NcmUsageParameter; +} + +export interface DepthParameter { + depth_min: NcmUsageParameter; + depth_inc: NcmUsageParameter; + depth_max: NcmUsageParameter; +} + +export interface NcmUsageParameter extends UsageParameter { + min: number; + max: number; +} diff --git a/libs/ncm/geophysical/index.ts b/libs/ncm/geophysical/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..49e5ad78525561eea06da15d5b46b76974f8e898 --- /dev/null +++ b/libs/ncm/geophysical/index.ts @@ -0,0 +1,2 @@ +export * from './geophysical-response.model'; +export * from './geophysical-usage.model'; diff --git a/libs/ncm/index.ts b/libs/ncm/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..36c96fd723568077dc385476edc7f83b50df9a65 --- /dev/null +++ b/libs/ncm/index.ts @@ -0,0 +1 @@ +export * as geophysicalService from './geophysical/index';