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

MultiPatch. More...

#include <shp-multipatch.h>

Public Member Functions

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. More...
 
void shp_multipatch_pointz (const shp_multipatch_t *multipatch, 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 MultiPatch consists of a number of surface patches. Each surface patch describes a surface. The surface patches of a MultiPatch are referred to as its parts, and the type of part controls how the order of vertices of an MultiPatch part is interpreted. See the "ESRI Shapefile Technical Description" [2] for more information.

Member Function Documentation

◆ shp_multipatch_points()

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 
)

Gets the indices for the points specified by part_num.

Parameters
multipatcha MultiPatch.
part_numa zero-based part number.
[out]part_typethe part type.
[out]startthe range start.
[out]endthe range end (exclusive).
Returns
the number of points in the part.
See also
shp_multipatch_pointz

◆ shp_multipatch_pointz()

void shp_multipatch_pointz ( const shp_multipatch_t multipatch,
size_t  point_num,
shp_pointz_t pointz 
)

Gets a PointZ that belongs to the edges of a MultiPatch.

Example

// Iterate over all parts and points
size_t part_num, i, n;
shp_part_type_t part_type;
shp_pointz_t pointz;
for (part_num = 0; part_num < multipatch->num_parts; ++part_num) {
shp_multipatch_points(multipatch, part_num, &part_type, &i, &n);
while (i < n) {
shp_multipatch_pointz(multipatch, i, &pointz);
++i;
}
}
shp_part_type_t
Part types.
Definition: shp-multipatch.h:25
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
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
PointZ.
Definition: shp-pointz.h:25
Parameters
multipatcha MultiPatch.
point_numa zero-based point number.
[out]pointza shp_pointz_t structure.
See also
shp_multipatch_points

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