1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! `io` — format readers/writers (IRAP, ZMAP, CSV, LAS, Excel, vector). Wraps
//! external crates behind petekIO's own types. Imports only from `foundation`.
/// Decode bytes as **ISO-8859-1 / Latin-1**: each byte maps to the Unicode code
/// point of the same value. Petrel exports are Latin-1/Windows-1252, so this
/// preserves Norwegian characters (`ø`/`å`/`æ`, `0xC0–0xFF`) that UTF-8 decoding
/// would replace with `�`. (Windows-1252 differs only in `0x80–0x9F` punctuation,
/// not letters, so this is exact for names.)
pub
/// The `1.0E+30`-family undefined-node sentinel: any `|z| ≥ this` is treated as
/// null regardless of the file's *declared* null value. Shared by the grid
/// readers (CPS-3, EarthVision) whose exports use this convention.
pub const NULL_THRESHOLD: f64 = 1e29;
/// The default `1.0E+30` undefined-node value assumed by the `1.0E+30`-family
/// grid readers (CPS-3, EarthVision) before a file *declares* its own null. One
/// home for the sentinel default the readers otherwise each spelled inline.
pub const DEFAULT_NULL_1E30: f64 = 1.0e30;
/// Whether `z` is an undefined-node sentinel — either in the `1.0E+30` null
/// family (`|z| ≥ [NULL_THRESHOLD]`) or within a relative epsilon of the file's
/// declared `null` value. One home for the CPS-3 / EarthVision null test.
pub
/// Convert a `csv::Error` to a [`GeoError`](crate::foundation::GeoError),
/// **preserving an underlying I/O failure as `GeoError::Io`** (so `source()`
/// chains reach the OS error) rather than stringifying it into `Parse`. A
/// genuine CSV *format* problem (bad UTF-8, ragged records, …) stays `Parse`,
/// prefixed with `context`.
pub