Returns a hash code for the srid/type/geometry information in the GSERIALIZED.
Ignores metadata like flags and optional boxes, etc.
Definition at line 269 of file gserialized2.c.
272 int32_t pb = 0, pc = 0;
275 uint8_t *b1 = (uint8_t *)g1 + hsz1;
278 size_t bsz1 = sz1 - hsz1;
281 size_t bsz2 = bsz1 +
sizeof(int);
284 memcpy(b2, &srid,
sizeof(
int));
286 memcpy(b2+
sizeof(
int), b1, bsz1);
288 hashlittle2(b2, bsz2, (uint32_t *)&pb, (uint32_t *)&pc);
static size_t gserialized2_header_size(const GSERIALIZED *g)
int32_t gserialized2_get_srid(const GSERIALIZED *g)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
void hashlittle2(const void *key, size_t length, uint32_t *pc, uint32_t *pb)
#define LWSIZE_GET(varsize)
Macro for reading the size from the GSERIALIZED size attribute.
void * lwalloc(size_t size)
References gserialized2_get_srid(), gserialized2_header_size(), hashlittle2(), lwalloc(), lwfree(), LWSIZE_GET, and GSERIALIZED::size.
Referenced by gserialized_hash().