PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ flatgeobuf_check_magicbytes()

void flatgeobuf_check_magicbytes ( struct flatgeobuf_decode_ctx ctx)

Definition at line 269 of file flatgeobuf.c.

270 {
271  uint8_t *buf = ctx->ctx->buf + ctx->ctx->offset;
272  uint32_t i;
273 
274  for (i = 0; i < FLATGEOBUF_MAGICBYTES_SIZE / 2; i++)
275  if (buf[i] != flatgeobuf_magicbytes[i])
276  elog(ERROR, "Data is not FlatGeobuf");
277  ctx->ctx->offset += FLATGEOBUF_MAGICBYTES_SIZE;
278 }
flatgeobuf_ctx * ctx
Definition: flatgeobuf.h:62

References flatgeobuf_decode_ctx::ctx.

Referenced by pgis_fromflatgeobuf(), and pgis_tablefromflatgeobuf().

Here is the caller graph for this function: