shapereader
Read ESRI shapefiles
shp-polyline.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_POLYLINE_H
17#define _SHAPEREADER_SHP_POLYLINE_H
18
19#include "shp-point.h"
20#include <stddef.h>
21
29typedef struct shp_polyline_t {
30 double x_min;
31 double x_max;
32 double y_min;
33 double y_max;
34 size_t num_parts;
35 size_t num_points;
36 const char *parts; /* Index to first point in part */
37 const char *points; /* X and Y coordinates */
39
54extern size_t shp_polyline_points(const shp_polyline_t *polyline,
55 size_t part_num, size_t *start,
56 size_t *end);
57
86extern void shp_polyline_point(const shp_polyline_t *polyline,
87 size_t point_num, shp_point_t *point);
88
89#endif
Point.
Definition: shp-point.h:24
PolyLine.
Definition: shp-polyline.h:29
double x_min
X minimum value.
Definition: shp-polyline.h:30
double y_max
Y maximum value.
Definition: shp-polyline.h:33
size_t shp_polyline_points(const shp_polyline_t *polyline, size_t part_num, size_t *start, size_t *end)
Get the points that form a part.
Definition: shp-polyline.c:17
size_t num_parts
Number of parts.
Definition: shp-polyline.h:34
double x_max
X maximum value.
Definition: shp-polyline.h:31
double y_min
Y minimum value.
Definition: shp-polyline.h:32
void shp_polyline_point(const shp_polyline_t *polyline, size_t point_num, shp_point_t *point)
Get a Point.
Definition: shp-polyline.c:52
size_t num_points
Total number of points.
Definition: shp-polyline.h:35