libsdfio 1.0.0
Reader and writer for ISO 25178-71 SDF surface data files in C
Loading...
Searching...
No Matches
heights.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2026 Thomas Ascher <thomas.ascher@gmx.at>
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
33
34#ifndef SDFIO_HEIGHTS_H
35#define SDFIO_HEIGHTS_H
36
37#include <sdfio/header.h>
38#include <sdfio/layout.h>
39#include <sdfio/sdfio_export.h>
40#include <sdfio/types.h>
41
42#include <stddef.h>
43
44#ifdef __cplusplus
45extern "C"
46{
47#endif
48
66 const sdfio_layout *layout,
67 const void *data, size_t count,
68 void *heights);
69
89 const sdfio_layout *layout,
90 const void *heights, size_t count,
91 void *data);
92
103 double lowest, double highest);
104
120 const sdfio_layout *layout,
121 const void *heights, size_t rows,
122 size_t columns, double *z_scale);
123
124#ifdef __cplusplus
125}
126#endif
127
128#endif /* SDFIO_HEIGHTS_H */
Header of a file: size, scales, data type, dates and manufacturer.
struct sdfio_header sdfio_header
Header of a file, with the field names of the standard.
Definition header.h:42
sdfio_status sdfio_encode_heights(const sdfio_header *header, const sdfio_layout *layout, const void *heights, size_t count, void *data)
Converts heights in metres into values of the data area.
sdfio_status sdfio_decode_heights(const sdfio_header *header, const sdfio_layout *layout, const void *data, size_t count, void *heights)
Converts values of the data area into heights in metres.
sdfio_status sdfio_suggest_z_scale(sdfio_data_type type, const sdfio_layout *layout, const void *heights, size_t rows, size_t columns, double *z_scale)
Determines the z-scale for a matrix of heights in metres, as sdfio_write_heights() does: the range of...
double sdfio_suggest_z_scale_for_range(sdfio_data_type type, double lowest, double highest)
Returns the z-scale that uses the range of an integer data type best for heights between lowest and h...
Layout of a buffer in memory.
Description of a buffer of the caller for heights or for the values of the data area: the type of its...
Definition layout.h:45
Status codes, enumerations, constants, and the structures for allocator, stream and time zone.
sdfio_status
Result of a function call.
Definition types.h:31
sdfio_data_type
Type of the coded values of the data area of a file, and of the elements of a buffer of heights.
Definition types.h:112