PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwgeom_from_hexwkb()

LWGEOM* lwgeom_from_hexwkb ( const char *  hexwkb,
const char  check 
)
Parameters
checkparser check flags, see LW_PARSER_CHECK_* macros

Definition at line 797 of file lwin_wkb.c.

References bytes_from_hexbytes(), lwerror(), lwfree(), and lwgeom_from_wkb().

Referenced by cu_wkb_empty_point_check(), cu_wkb_from_hexwkb(), geography_in(), ShpLoaderGenerateShapeRow(), test_lwgeom_calculate_gbox(), test_lwgeom_distance_sphere(), test_lwgeom_force_clockwise(), test_lwgeom_make_valid(), test_misc_wkb(), test_ptarray_contains_point_sphere(), test_ptarray_isccw(), test_tree_circ_distance(), test_tree_circ_distance_threshold(), and test_tree_circ_pip2().

798 {
799  int hexwkb_len;
800  uint8_t *wkb;
801  LWGEOM *lwgeom;
802 
803  if ( ! hexwkb )
804  {
805  lwerror("lwgeom_from_hexwkb: null input");
806  return NULL;
807  }
808 
809  hexwkb_len = strlen(hexwkb);
810  wkb = bytes_from_hexbytes(hexwkb, hexwkb_len);
811  lwgeom = lwgeom_from_wkb(wkb, hexwkb_len/2, check);
812  lwfree(wkb);
813  return lwgeom;
814 }
void lwfree(void *mem)
Definition: lwutil.c:244
uint8_t * bytes_from_hexbytes(const char *hexbuf, size_t hexsize)
Definition: lwin_wkb.c:86
LWGEOM * lwgeom_from_wkb(const uint8_t *wkb, const size_t wkb_size, const char check)
WKB inputs must have a declared size, to prevent malformed WKB from reading off the end of the memory...
Definition: lwin_wkb.c:772
unsigned char uint8_t
Definition: uthash.h:79
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
Here is the call graph for this function:
Here is the caller graph for this function: