shapereader
Read ESRI shapefiles
shp-multipatch.h
Go to the documentation of this file.
1/*
2 * Read ESRI shapefiles
3 *
4 * Copyright (C) 2023 Andreas Vögele
5 *
6 * This library is free software; you can redistribute it and/or modify it
7 * under either the terms of the ISC License or the same terms as Perl.
8 */
9
10/* SPDX-License-Identifier: ISC OR Artistic-1.0-Perl OR GPL-1.0-or-later */
11
16#ifndef _SHAPEREADER_SHP_MULTIPATCH_H
17#define _SHAPEREADER_SHP_MULTIPATCH_H
18
19#include "shp-pointz.h"
20#include <stddef.h>
21
25typedef enum shp_part_type_t {
56
66typedef struct shp_multipatch_t {
67 double x_min;
68 double x_max;
69 double y_min;
70 double y_max;
71 double z_min;
72 double z_max;
73 double m_min;
74 double m_max;
75 size_t num_parts;
76 size_t num_points;
77 const char *parts; /* Index to first point in part */
78 const char *types; /* Part types */
79 const char *points; /* X and Y coordinates */
80 const char *z_array; /* Z coordinates */
81 const char *m_array; /* Measures */
83
99extern size_t shp_multipatch_points(const shp_multipatch_t *multipatch,
100 size_t part_num,
101 shp_part_type_t *part_type, size_t *start,
102 size_t *end);
103
133extern void shp_multipatch_pointz(const shp_multipatch_t *multipatch,
134 size_t point_num, shp_pointz_t *pointz);
135
136#endif
shp_part_type_t
Part types.
Definition: shp-multipatch.h:25
@ SHP_PART_TYPE_TRIANGLE_STRIP
A linked strip of triangles, where every vertex (after the first two) completes a new triangle.
Definition: shp-multipatch.h:31
@ SHP_PART_TYPE_INNER_RING
A hole of a polygon.
Definition: shp-multipatch.h:46
@ SHP_PART_TYPE_FIRST_RING
The first ring of a polygon of an unspecified type.
Definition: shp-multipatch.h:50
@ SHP_PART_TYPE_TRIANGLE_FAN
A linked fan of triangles, where every vertex (after the first two) completes a new triangle.
Definition: shp-multipatch.h:38
@ SHP_PART_TYPE_RING
A ring of a polygon of an unspecified type.
Definition: shp-multipatch.h:54
@ SHP_PART_TYPE_OUTER_RING
The outer ring of a polygon.
Definition: shp-multipatch.h:42
MultiPatch.
Definition: shp-multipatch.h:66
double x_min
X minimum value.
Definition: shp-multipatch.h:67
double z_max
Z maximum value.
Definition: shp-multipatch.h:72
double m_max
M maximum value.
Definition: shp-multipatch.h:74
size_t num_points
Total number of points.
Definition: shp-multipatch.h:76
size_t num_parts
Number of parts.
Definition: shp-multipatch.h:75
double y_min
Y minimum value.
Definition: shp-multipatch.h:69
size_t shp_multipatch_points(const shp_multipatch_t *multipatch, size_t part_num, shp_part_type_t *part_type, size_t *start, size_t *end)
Get the points that form a part.
Definition: shp-multipatch.c:17
double x_max
X maximum value.
Definition: shp-multipatch.h:68
double y_max
Y maximum value.
Definition: shp-multipatch.h:70
double z_min
Z minimum value.
Definition: shp-multipatch.h:71
void shp_multipatch_pointz(const shp_multipatch_t *multipatch, size_t point_num, shp_pointz_t *pointz)
Get a PointZ.
Definition: shp-multipatch.c:56
double m_min
M minimum value.
Definition: shp-multipatch.h:73
PointZ.
Definition: shp-pointz.h:25