PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ twkb_parse_state_double()

static double twkb_parse_state_double ( twkb_parse_state s,
double  factor 

Definition at line 95 of file lwin_twkb.c.

References twkb_parse_state::pos, twkb_parse_state::twkb_end, twkb_parse_state_advance(), and varint_s64_decode().

Referenced by lwgeom_from_twkb_state().

96 {
97  size_t size;
98  int64_t val = varint_s64_decode(s->pos, s->twkb_end, &size);
99  twkb_parse_state_advance(s, size);
100  return val / factor;
101 }
uint8_t * pos
Definition: lwin_twkb.c:27
uint8_t * twkb_end
Definition: lwin_twkb.c:26
int64_t varint_s64_decode(const uint8_t *the_start, const uint8_t *the_end, size_t *size)
Definition: varint.c:94
static void twkb_parse_state_advance(twkb_parse_state *s, size_t next)
Check that we are not about to read off the end of the WKB array.
Definition: lwin_twkb.c:68
Here is the call graph for this function:
Here is the caller graph for this function: