PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ box2df_to_string()

static char* box2df_to_string ( const BOX2DF *  a)
static

Definition at line 118 of file gserialized_gist_2d.c.

119 {
120  static const int precision = 12;
121  char tmp[13 + 4 * OUT_MAX_BYTES_DOUBLE] = {'B', 'O', 'X', '2', 'D', 'F', '(', 0};
122  int len = 7;
123 
124  if (a == NULL)
125  return pstrdup("<NULLPTR>");
126 
127  len += lwprint_double(a->xmin, precision, &tmp[len]);
128  tmp[len++] = ' ';
129  len += lwprint_double(a->ymin, precision, &tmp[len]);
130  tmp[len++] = ',';
131  tmp[len++] = ' ';
132  len += lwprint_double(a->xmax, precision, &tmp[len]);
133  tmp[len++] = ' ';
134  len += lwprint_double(a->ymax, precision, &tmp[len]);
135  tmp[len++] = ')';
136 
137  return pstrdup(tmp);
138 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define OUT_MAX_BYTES_DOUBLE
int lwprint_double(double d, int maxdd, char *buf)
Definition: lwprint.c:463

References lwprint_double(), OUT_MAX_BYTES_DOUBLE, and precision.

Referenced by box2df_merge(), box2df_out(), gserialized_datum_predicate_2d(), gserialized_datum_predicate_box2df_geom_2d(), gserialized_distance_box_2d(), gserialized_distance_centroid_2d(), gserialized_gist_compress_2d(), gserialized_gist_consistent_internal_2d(), gserialized_gist_picksplit_2d(), and gserialized_gist_union_2d().

Here is the call graph for this function:
Here is the caller graph for this function: