PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ box2df_to_string()

static char * box2df_to_string ( const BOX2DF *  a)
static

Definition at line 120 of file gserialized_gist_2d.c.

121{
122 static const int precision = 12;
123 char tmp[13 + 4 * OUT_MAX_BYTES_DOUBLE] = {'B', 'O', 'X', '2', 'D', 'F', '(', 0};
124 int len = 7;
125
126 if (a == NULL)
127 return pstrdup("<NULLPTR>");
128
129 len += lwprint_double(a->xmin, precision, &tmp[len]);
130 tmp[len++] = ' ';
131 len += lwprint_double(a->ymin, precision, &tmp[len]);
132 tmp[len++] = ',';
133 tmp[len++] = ' ';
134 len += lwprint_double(a->xmax, precision, &tmp[len]);
135 tmp[len++] = ' ';
136 len += lwprint_double(a->ymax, precision, &tmp[len]);
137 tmp[len++] = ')';
138
139 return pstrdup(tmp);
140}
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: