PostGIS  2.2.7dev-r@@SVN_REVISION@@
Datum box2d_from_geohash ( PG_FUNCTION_ARGS  )

Definition at line 62 of file lwgeom_in_geohash.c.

References parse_geohash(), precision, and text2cstring().

63 {
64  GBOX *box = NULL;
65  text *geohash_input = NULL;
66  char *geohash = NULL;
67  int precision = -1;
68 
69  if (PG_ARGISNULL(0))
70  {
71  PG_RETURN_NULL();
72  }
73 
74  if (!PG_ARGISNULL(1))
75  {
76  precision = PG_GETARG_INT32(1);
77  }
78 
79  geohash_input = PG_GETARG_TEXT_P(0);
80  geohash = text2cstring(geohash_input);
81 
82  box = parse_geohash(geohash, precision);
83 
84  PG_RETURN_POINTER(box);
85 }
char * text2cstring(const text *textptr)
uint8_t precision
Definition: cu_in_twkb.c:25
static GBOX * parse_geohash(char *geohash, int precision)

Here is the call graph for this function: