PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ box2d_from_geohash()

Datum box2d_from_geohash ( PG_FUNCTION_ARGS  )

Definition at line 78 of file lwgeom_in_geohash.c.

79 {
80  GBOX *box = NULL;
81  text *geohash_input = NULL;
82  char *geohash = NULL;
83  int precision = -1;
84 
85  if (PG_ARGISNULL(0))
86  {
87  PG_RETURN_NULL();
88  }
89 
90  if (!PG_ARGISNULL(1))
91  {
92  precision = PG_GETARG_INT32(1);
93  }
94 
95  geohash_input = PG_GETARG_TEXT_P(0);
96  geohash = text_to_cstring(geohash_input);
97 
98  box = parse_geohash(geohash, precision);
99 
100  PG_RETURN_POINTER(box);
101 }
static uint8_t precision
Definition: cu_in_twkb.c:25
static GBOX * parse_geohash(char *geohash, int precision)
char * text_to_cstring(const text *textptr)

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

Here is the call graph for this function: