PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ encode_mpoint()

static void encode_mpoint ( struct feature_builder feature,
LWMPOINT mpoint 
)
static

Definition at line 213 of file mvt.c.

214 {
215  size_t c;
216  // NOTE: inefficient shortcut LWMPOINT->LWLINE
217  LWLINE *lwline = lwline_from_lwmpoint(mpoint->srid, mpoint);
218  feature->type = VECTOR_TILE__TILE__GEOM_TYPE__POINT;
219  c = 1 + lwline->points->npoints * 2;
220  feature->geometry = palloc(sizeof(*feature->geometry) * c);
222  lwline->points, feature->geometry);
223 }
LWLINE * lwline_from_lwmpoint(int32_t srid, const LWMPOINT *mpoint)
Definition: lwline.c:275
static uint32_t encode_ptarray_initial(enum mvt_type type, POINTARRAY *pa, uint32_t *buffer)
Definition: mvt.c:199
@ MVT_POINT
Definition: mvt.c:58
POINTARRAY * points
Definition: liblwgeom.h:483
int32_t srid
Definition: liblwgeom.h:534
uint32_t npoints
Definition: liblwgeom.h:427
VectorTile__Tile__GeomType type
Definition: mvt.c:93
size_t n_geometry
Definition: mvt.c:94
uint32_t * geometry
Definition: mvt.c:95

References encode_ptarray_initial(), feature_builder::geometry, lwline_from_lwmpoint(), MVT_POINT, feature_builder::n_geometry, POINTARRAY::npoints, LWLINE::points, LWMPOINT::srid, and feature_builder::type.

Referenced by encode_feature_geometry().

Here is the call graph for this function:
Here is the caller graph for this function: