PostGIS
2.5.7dev-r@@SVN_REVISION@@
geobuf.h
Go to the documentation of this file.
1
/**********************************************************************
2
*
3
* PostGIS - Spatial Types for PostgreSQL
4
* http://postgis.net
5
*
6
* PostGIS is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* PostGIS is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with PostGIS. If not, see <http://www.gnu.org/licenses/>.
18
*
19
**********************************************************************
20
*
21
* Copyright (C) 2016-2017 Björn Harrtell <bjorn@wololo.org>
22
*
23
**********************************************************************/
24
25
#ifndef GEOBUF_H_
26
#define GEOBUF_H_ 1
27
28
#include <stdlib.h>
29
#include "postgres.h"
30
#include "utils/builtins.h"
31
#include "utils/array.h"
32
#include "utils/typcache.h"
33
#include "utils/lsyscache.h"
34
#include "catalog/pg_type.h"
35
#include "catalog/namespace.h"
36
#include "executor/spi.h"
37
#include "executor/executor.h"
38
#include "access/htup_details.h"
39
#include "access/htup.h"
40
#include "../postgis_config.h"
41
#include "
liblwgeom.h
"
42
#include "lwgeom_pg.h"
43
#include "
lwgeom_log.h
"
44
45
#if defined HAVE_LIBPROTOBUF && defined HAVE_GEOBUF
46
47
#include "geobuf.pb-c.h"
48
49
struct
geobuf_agg_context
{
50
char
*
geom_name
;
51
uint32_t
geom_index
;
52
HeapTupleHeader
row
;
53
LWGEOM
**
lwgeoms
;
54
Data *
data
;
55
Data__Feature *
feature
;
56
size_t
features_capacity
;
57
uint32_t
e
;
58
protobuf_c_boolean
has_precision
;
59
uint32_t
precision
;
60
protobuf_c_boolean
has_dimensions
;
61
uint32_t
dimensions
;
62
};
63
64
void
geobuf_agg_init_context
(
struct
geobuf_agg_context
*ctx);
65
void
geobuf_agg_transfn
(
struct
geobuf_agg_context
*ctx);
66
uint8_t
*
geobuf_agg_finalfn
(
struct
geobuf_agg_context
*ctx);
67
68
#endif
/* HAVE_LIBPROTOBUF */
69
70
#endif
geobuf_agg_finalfn
uint8_t * geobuf_agg_finalfn(struct geobuf_agg_context *ctx)
Finalize aggregation.
Definition:
geobuf.c:607
geobuf_agg_init_context
void geobuf_agg_init_context(struct geobuf_agg_context *ctx)
Initialize aggregation context.
Definition:
geobuf.c:524
geobuf_agg_transfn
void geobuf_agg_transfn(struct geobuf_agg_context *ctx)
Aggregation step.
Definition:
geobuf.c:561
liblwgeom.h
This library is the generic geometry handling section of PostGIS.
lwgeom_log.h
LWGEOM
Definition:
liblwgeom.h:398
geobuf_agg_context::precision
uint32_t precision
Definition:
geobuf.h:59
geobuf_agg_context::row
HeapTupleHeader row
Definition:
geobuf.h:52
geobuf_agg_context::data
Data * data
Definition:
geobuf.h:54
geobuf_agg_context::geom_index
uint32_t geom_index
Definition:
geobuf.h:51
geobuf_agg_context::has_precision
protobuf_c_boolean has_precision
Definition:
geobuf.h:58
geobuf_agg_context::e
uint32_t e
Definition:
geobuf.h:57
geobuf_agg_context::has_dimensions
protobuf_c_boolean has_dimensions
Definition:
geobuf.h:60
geobuf_agg_context::geom_name
char * geom_name
Definition:
geobuf.h:50
geobuf_agg_context::features_capacity
size_t features_capacity
Definition:
geobuf.h:56
geobuf_agg_context::lwgeoms
LWGEOM ** lwgeoms
Definition:
geobuf.h:53
geobuf_agg_context::feature
Data__Feature * feature
Definition:
geobuf.h:55
geobuf_agg_context::dimensions
uint32_t dimensions
Definition:
geobuf.h:61
geobuf_agg_context
Definition:
geobuf.h:49
uint32_t
unsigned int uint32_t
Definition:
uthash.h:78
uint8_t
unsigned char uint8_t
Definition:
uthash.h:79
postgis
geobuf.h
Generated by
1.9.1