c += 2 + lwmline->geoms[i]->points->npoints * 2;
feature->geometry = palloc(sizeof(*feature->geometry) * c);
for (i = 0; i < lwmline->ngeoms; i++)
- offset += encode_ptarray(ctx, MVT_LINE,
+ offset += encode_ptarray(ctx, MVT_LINE,
lwmline->geoms[i]->points,
feature->geometry + offset, &px, &py);
feature->n_geometry = offset;
ctx->layer->n_values = ctx->values_hash_i;
ctx->layer->values = values;
+
+ HASH_CLEAR(hh, ctx->string_values_hash);
+ HASH_CLEAR(hh, ctx->float_values_hash);
+ HASH_CLEAR(hh, ctx->double_values_hash);
+ HASH_CLEAR(hh, ctx->uint_values_hash);
+ HASH_CLEAR(hh, ctx->sint_values_hash);
+ HASH_CLEAR(hh, ctx->bool_values_hash);
}
#define MVT_PARSE_VALUE(value, kvtype, hash, valuefield, size) \
* Makes best effort to keep validity. Might collapse geometry into lower
* dimension.
*/
-LWGEOM *mvt_geom(LWGEOM *lwgeom, GBOX *gbox, uint32_t extent, uint32_t buffer,
+LWGEOM *mvt_geom(LWGEOM *lwgeom, GBOX *gbox, uint32_t extent, uint32_t buffer,
bool clip_geom)
{
double width = gbox->xmax - gbox->xmin;
/**
* Initialize aggregation context.
*/
-void mvt_agg_init_context(struct mvt_agg_context *ctx)
+void mvt_agg_init_context(struct mvt_agg_context *ctx)
{
VectorTile__Tile__Layer *layer;
ctx->string_values_hash = NULL;
ctx->float_values_hash = NULL;
ctx->double_values_hash = NULL;
- ctx->int_values_hash = NULL;
ctx->uint_values_hash = NULL;
ctx->sint_values_hash = NULL;
ctx->bool_values_hash = NULL;
return buf;
}
-#endif
\ No newline at end of file
+#endif
#include "utils/array.h"
#include "utils/typcache.h"
#include "utils/lsyscache.h"
-#include "catalog/pg_type.h"
+#include "catalog/pg_type.h"
#include "executor/executor.h"
#include "access/htup_details.h"
#include "access/htup.h"
struct mvt_kv_string_value *string_values_hash;
struct mvt_kv_float_value *float_values_hash;
struct mvt_kv_double_value *double_values_hash;
- struct mvt_kv_int_value *int_values_hash;
struct mvt_kv_uint_value *uint_values_hash;
struct mvt_kv_sint_value *sint_values_hash;
struct mvt_kv_bool_value *bool_values_hash;
#endif /* HAVE_LIBPROTOBUF */
-#endif
\ No newline at end of file
+#endif