Definition at line 464 of file flatgeobuf.c.
467 uint32_t natts = ctx->
tupdesc->natts;
469 Datum *values = palloc0(natts *
sizeof(Datum *));
470 bool *isnull = palloc0(natts *
sizeof(
bool *));
472 values[0] = Int32GetDatum(ctx->
fid);
474 if (flatgeobuf_decode_feature(ctx->
ctx))
475 elog(ERROR,
"flatgeobuf_decode_feature: unsuccessful");
477 if (ctx->
ctx->lwgeom != NULL) {
478 values[1] = PointerGetDatum(geometry_serialize(ctx->
ctx->lwgeom));
480 POSTGIS_DEBUG(3,
"geometry is null");
484 if (natts > 2 && ctx->
ctx->properties_len > 0)
487 heapTuple = heap_form_tuple(ctx->
tupdesc, values, isnull);
488 ctx->
result = HeapTupleGetDatum(heapTuple);
491 POSTGIS_DEBUGF(3,
"fid now %d", ctx->
fid);
493 if (ctx->
ctx->offset == ctx->
ctx->size) {
494 POSTGIS_DEBUGF(3,
"reached end at %lld", 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().