PostGIS  2.4.9dev-r@@SVN_REVISION@@
mvt.c File Reference
#include "mvt.h"
#include "utils/jsonb.h"
#include "uthash.h"
Include dependency graph for mvt.c:

Go to the source code of this file.

Data Structures

struct  mvt_kv_key
 
struct  mvt_kv_string_value
 
struct  mvt_kv_float_value
 
struct  mvt_kv_double_value
 
struct  mvt_kv_uint_value
 
struct  mvt_kv_sint_value
 
struct  mvt_kv_bool_value
 

Macros

#define DatumGetJsonbP   DatumGetJsonb
 
#define FEATURES_CAPACITY_INITIAL   50
 
#define MVT_CREATE_VALUES(kvtype, hash, hasfield, valuefield)
 
#define MVT_PARSE_VALUE(value, kvtype, hash, valuefield, size)
 
#define MVT_PARSE_INT_VALUE(value)
 
#define MVT_PARSE_DATUM(type, kvtype, hash, valuefield, datumfunc, size)
 
#define MVT_PARSE_INT_DATUM(type, datumfunc)
 

Enumerations

enum  mvt_cmd_id { CMD_MOVE_TO = 1, CMD_LINE_TO = 2, CMD_CLOSE_PATH = 7 }
 
enum  mvt_type { MVT_POINT = 1, MVT_LINE = 2, MVT_RING = 3 }
 

Functions

static uint32_t c_int (enum mvt_cmd_id id, uint32_t count)
 
static uint32_t p_int (int32_t value)
 
static uint32_t encode_ptarray (struct mvt_agg_context *ctx, enum mvt_type type, POINTARRAY *pa, uint32_t *buffer, int32_t *px, int32_t *py)
 
static uint32_t encode_ptarray_initial (struct mvt_agg_context *ctx, enum mvt_type type, POINTARRAY *pa, uint32_t *buffer)
 
static void encode_point (struct mvt_agg_context *ctx, LWPOINT *point)
 
static void encode_mpoint (struct mvt_agg_context *ctx, LWMPOINT *mpoint)
 
static void encode_line (struct mvt_agg_context *ctx, LWLINE *lwline)
 
static void encode_mline (struct mvt_agg_context *ctx, LWMLINE *lwmline)
 
static void encode_poly (struct mvt_agg_context *ctx, LWPOLY *lwpoly)
 
static void encode_mpoly (struct mvt_agg_context *ctx, LWMPOLY *lwmpoly)
 
static void encode_geometry (struct mvt_agg_context *ctx, LWGEOM *lwgeom)
 
static TupleDesc get_tuple_desc (struct mvt_agg_context *ctx)
 
static uint32_t get_key_index (struct mvt_agg_context *ctx, char *name)
 
static uint32_t add_key (struct mvt_agg_context *ctx, char *name)
 
static void parse_column_keys (struct mvt_agg_context *ctx)
 
static void encode_keys (struct mvt_agg_context *ctx)
 
static VectorTile__Tile__Value * create_value ()
 
static void encode_values (struct mvt_agg_context *ctx)
 
static void add_value_as_string (struct mvt_agg_context *ctx, char *value, uint32_t *tags, uint32_t k)
 
static void parse_datum_as_string (struct mvt_agg_context *ctx, Oid typoid, Datum datum, uint32_t *tags, uint32_t k)
 
static uint32_tparse_jsonb (struct mvt_agg_context *ctx, Jsonb *jb, uint32_t *tags)
 
static void parse_values (struct mvt_agg_context *ctx)
 
static uint8 lwgeom_get_basic_type (LWGEOM *geom)
 
static LWGEOMlwgeom_to_basic_type (LWGEOM *geom, uint8 original_type)
 In place process a collection to find a concrete geometry object and expose that as the actual object. More...
 
LWGEOMmvt_geom (const LWGEOM *lwgeom, const GBOX *gbox, uint32_t extent, uint32_t buffer, bool clip_geom)
 Transform a geometry into vector tile coordinate space. More...
 
void mvt_agg_init_context (struct mvt_agg_context *ctx)
 Initialize aggregation context. More...
 
void mvt_agg_transfn (struct mvt_agg_context *ctx)
 Aggregation step. More...
 
uint8_tmvt_agg_finalfn (struct mvt_agg_context *ctx)
 Finalize aggregation. More...