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

PolyLineM. More...

#include <shp-polylinem.h>

Public Member Functions

size_t shp_polylinem_points (const shp_polylinem_t *polylinem, size_t part_num, size_t *start, size_t *end)
 Get the points that form a part. More...
 
void shp_polylinem_pointm (const shp_polylinem_t *polylinem, size_t point_num, shp_pointm_t *pointm)
 Get a PointM. 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 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 PolyLineM 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_polylinem_points()

size_t shp_polylinem_points ( const shp_polylinem_t polylinem,
size_t  part_num,
size_t *  start,
size_t *  end 
)

Gets the indices for the points specified by part_num.

Parameters
polylinema PolyLineM.
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_polylinem_pointm

◆ shp_polylinem_pointm()

void shp_polylinem_pointm ( const shp_polylinem_t polylinem,
size_t  point_num,
shp_pointm_t pointm 
)

Gets a PointM that belongs to a PolyLineM.

Example

// Iterate over all parts and points
size_t part_num, i, n;
shp_pointm_t pointm;
for (part_num = 0; part_num < polylinem->num_parts; ++part_num) {
shp_polylinem_points(polylinem, part_num, &i, &n);
while (i < n) {
shp_polylinem_pointm(polylinem, i, &pointm);
++i;
}
}
PointM.
Definition: shp-pointm.h:25
size_t shp_polylinem_points(const shp_polylinem_t *polylinem, size_t part_num, size_t *start, size_t *end)
Get the points that form a part.
Definition: shp-polylinem.c:17
void shp_polylinem_pointm(const shp_polylinem_t *polylinem, size_t point_num, shp_pointm_t *pointm)
Get a PointM.
Definition: shp-polylinem.c:52
Parameters
polylinema PolyLineM.
point_numa zero-based point number.
[out]pointma shp_pointm_t structure.
See also
shp_polylinem_points

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