shapereader
Read ESRI shapefiles
Public Member Functions | Data Fields
shp_polylinez_t Struct Reference

PolyLineZ. More...

#include <shp-polylinez.h>

Public Member Functions

size_t shp_polylinez_points (const shp_polylinez_t *polylinez, size_t part_num, size_t *start, size_t *end)
 Get the points that form a part. More...
 
void shp_polylinez_pointz (const shp_polylinez_t *polylinez, size_t point_num, shp_pointz_t *pointz)
 Get a PointZ. More...
 

Data Fields

double x_min
 X minimum value.
 
double x_max
 X maximum value.
 
double y_min
 Y minimum value.
 
double y_max
 Y maximum value.
 
double z_min
 Z minimum value.
 
double z_max
 Z maximum value.
 
double m_min
 M minimum value.
 
double m_max
 M maximum value.
 
size_t num_parts
 Number of parts.
 
size_t num_points
 Total number of points.
 

Detailed Description

A PolyLineZ consists of one or more parts. A part is a connected sequence of of two or more points. Each point is associated with a measure, for example a temperature.

Member Function Documentation

◆ shp_polylinez_points()

size_t shp_polylinez_points ( const shp_polylinez_t polylinez,
size_t  part_num,
size_t *  start,
size_t *  end 
)

Gets the indices for the points specified by part_num.

Parameters
polylineza PolyLineZ.
part_numa zero-based part number.
[out]startthe range start.
[out]endthe range end (exclusive).
Returns
the number of points in the part. At least 2 if the part is valid.
See also
shp_polylinez_pointz

◆ shp_polylinez_pointz()

void shp_polylinez_pointz ( const shp_polylinez_t polylinez,
size_t  point_num,
shp_pointz_t pointz 
)

Gets a PointZ that belongs to a PolyLineZ.

Example

// Iterate over all parts and points
size_t part_num, i, n;
shp_pointz_t pointz;
for (part_num = 0; part_num < polylinez->num_parts; ++part_num) {
shp_polylinez_points(polylinez, part_num, &i, &n);
while (i < n) {
shp_polylinez_pointz(polylinez, i, &pointz);
++i;
}
}
PointZ.
Definition: shp-pointz.h:25
size_t shp_polylinez_points(const shp_polylinez_t *polylinez, size_t part_num, size_t *start, size_t *end)
Get the points that form a part.
Definition: shp-polylinez.c:17
void shp_polylinez_pointz(const shp_polylinez_t *polylinez, size_t point_num, shp_pointz_t *pointz)
Get a PointZ.
Definition: shp-polylinez.c:52
Parameters
polylineza PolyLineZ.
point_numa zero-based point number.
[out]pointza shp_pointz_t structure.
See also
shp_polylinez_points

The documentation for this struct was generated from the following file: