PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ encode_mpoint()

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

Definition at line 212 of file mvt.c.

213{
214 size_t c;
215 // NOTE: inefficient shortcut LWMPOINT->LWLINE
216 LWLINE *lwline = lwline_from_lwmpoint(mpoint->srid, mpoint);
217 feature->type = VECTOR_TILE__TILE__GEOM_TYPE__POINT;
218 c = 1 + lwline->points->npoints * 2;
219 feature->geometry = palloc(sizeof(*feature->geometry) * c);
221 lwline->points, feature->geometry);
222}
LWLINE * lwline_from_lwmpoint(int32_t srid, const LWMPOINT *mpoint)
Definition lwline.c:285
static uint32_t encode_ptarray_initial(enum mvt_type type, POINTARRAY *pa, uint32_t *buffer)
Definition mvt.c:198
@ MVT_POINT
Definition mvt.c:57
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:92
size_t n_geometry
Definition mvt.c:93
uint32_t * geometry
Definition mvt.c:94

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: