Definition at line 490 of file lwin_twkb.c.
References byte_from_twkb_state(), twkb_parse_state::factor, twkb_parse_state::factor_m, twkb_parse_state::factor_z, twkb_parse_state::has_bbox, twkb_parse_state::has_idlist, twkb_parse_state::has_m, twkb_parse_state::has_size, twkb_parse_state::has_z, twkb_parse_state::is_empty, LWDEBUG, twkb_parse_state::lwtype, lwtype_from_twkb_type(), twkb_parse_state::ndims, precision, twkb_parse_state::size, twkb_parse_state_uvarint(), ovdump::type, and unzigzag8().
Referenced by lwgeom_from_twkb_state().
492 LWDEBUG(2,
"Entering magicbyte_from_twkb_state");
508 s->
factor = pow(10, (
double)precision);
512 s->
has_size = (metadata & 0x02) >> 1;
514 extended_dims = (metadata & 0x08) >> 3;
515 s->
is_empty = (metadata & 0x10) >> 4;
520 int8_t precision_z, precision_m;
525 s->
has_z = (extended_dims & 0x01);
526 s->
has_m = (extended_dims & 0x02) >> 1;
527 precision_z = (extended_dims & 0x1C) >> 2;
528 precision_m = (extended_dims & 0xE0) >> 5;
531 s->
factor_z = pow(10, (
double)precision_z);
532 s->
factor_m = pow(10, (
double)precision_m);
#define LWDEBUG(level, msg)
static uint32_t lwtype_from_twkb_type(uint8_t twkb_type)
static uint8_t byte_from_twkb_state(twkb_parse_state *s)
Byte Read a byte and advance the parse state forward.
static uint64_t twkb_parse_state_uvarint(twkb_parse_state *s)
int8_t unzigzag8(uint8_t val)