Definition at line 465 of file flatgeobuf.c.
468 uint32_t natts = ctx->
tupdesc->natts;
470 Datum *values = palloc0(natts *
sizeof(Datum *));
471 bool *isnull = palloc0(natts *
sizeof(
bool *));
473 values[0] = Int32GetDatum(ctx->
fid);
475 if (flatgeobuf_decode_feature(ctx->
ctx))
476 elog(ERROR,
"flatgeobuf_decode_feature: unsuccessful");
478 if (ctx->
ctx->lwgeom != NULL) {
479 values[1] = PointerGetDatum(geometry_serialize(ctx->
ctx->lwgeom));
481 POSTGIS_DEBUG(3,
"geometry is null");
485 if (natts > 2 && ctx->
ctx->properties_len > 0)
488 heapTuple = heap_form_tuple(ctx->
tupdesc, values, isnull);
489 ctx->
result = HeapTupleGetDatum(heapTuple);
492 POSTGIS_DEBUGF(3,
"fid now %d", ctx->
fid);
494 if (ctx->
ctx->offset == ctx->
ctx->size) {
495 POSTGIS_DEBUGF(3,
"reached end at %ld", ctx->
ctx->offset);
static void decode_properties(struct flatgeobuf_decode_ctx *ctx, Datum *values, bool *isnull)
References flatgeobuf_decode_ctx::ctx, decode_properties(), flatgeobuf_decode_ctx::done, flatgeobuf_decode_ctx::fid, flatgeobuf_decode_ctx::result, and flatgeobuf_decode_ctx::tupdesc.
Referenced by pgis_fromflatgeobuf().