Table of Contents

Class S101SoundingSampler

Namespace
EncDotNet.S100.Datasets.S101
Assembly
EncDotNet.S100.Datasets.S101.dll

Samples the nearest charted sounding (S-101 Sounding feature) depth to an arbitrary position.

public static class S101SoundingSampler
Inheritance
S101SoundingSampler
Inherited Members

Remarks

S-101 encodes soundings as multipoint spatial records (RCNM = 115) carrying many 3-D coordinate triples, one per sounding, rather than as one feature per depth. Ranking whole features by centroid therefore cannot surface the nearest individual sounding — the search has to descend to the per-point Z ordinates. This sampler performs that per-point nearest search across every Sounding feature in the document (S-101 Annex A; S-100 Part 10a §10a-6 spatial records).

Distances use the same fast equirectangular approximation (MetersPerDegreeLatitude scaled by the cosine of the mean latitude) used elsewhere in the codebase; over the span of a single ENC cell the error is a fraction of a percent, which never changes which sounding is nearest.

Fields

MetersPerDegreeLatitude

Metres per degree of latitude (WGS-84 mean).

public const double MetersPerDegreeLatitude = 111320

Field Value

double

SoundingFeatureType

The S-101 feature catalogue code (Annex A) of the Sounding feature, as resolved through FeatureTypeCatalogue.

public const string SoundingFeatureType = "Sounding"

Field Value

string

Methods

SampleNearest(S101Document, double, double)

Returns the nearest charted sounding to the given position, or null when the document carries no Sounding features with multipoint geometry.

public static S101SoundingSample? SampleNearest(S101Document document, double latitude, double longitude)

Parameters

document S101Document

The parsed S-101 dataset to search.

latitude double

Query latitude in decimal degrees (WGS-84).

longitude double

Query longitude in decimal degrees (WGS-84).

Returns

S101SoundingSample?

The nearest S101SoundingSample, or null when no sounding points are present.