PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches
flatgeobuf.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) 2021 Björn Harrtell <bjorn@wololo.org>
22 *
23 **********************************************************************/
24
25#ifndef FLATGEOBUF_H_
26#define FLATGEOBUF_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#include "flatgeobuf_c.h"
45
46typedef struct flatgeobuf_agg_ctx
47{
48 flatgeobuf_ctx *ctx;
49 const char *geom_name;
50 uint32_t geom_index;
51 TupleDesc tupdesc;
52 HeapTupleHeader row;
54
55
56flatgeobuf_agg_ctx *flatgeobuf_agg_ctx_init(const char *geom_name, const bool create_index);
59
61{
62 flatgeobuf_ctx *ctx;
63 TupleDesc tupdesc;
64 Datum result;
65 Datum geom;
66 int fid;
67 bool done;
69
72
73#endif
void flatgeobuf_check_magicbytes(struct flatgeobuf_decode_ctx *ctx)
Definition flatgeobuf.c:268
void flatgeobuf_agg_transfn(flatgeobuf_agg_ctx *ctx)
Aggregation step.
Definition flatgeobuf.c:526
uint8_t * flatgeobuf_agg_finalfn(flatgeobuf_agg_ctx *ctx)
Finalize aggregation.
Definition flatgeobuf.c:557
flatgeobuf_agg_ctx * flatgeobuf_agg_ctx_init(const char *geom_name, const bool create_index)
Initialize aggregation context.
Definition flatgeobuf.c:502
void flatgeobuf_decode_row(struct flatgeobuf_decode_ctx *ctx)
Definition flatgeobuf.c:464
This library is the generic geometry handling section of PostGIS.
static int create_index(const char *schema, const char *table, const char *column, const char *tablespace, STRINGBUFFER *buffer)
HeapTupleHeader row
Definition flatgeobuf.h:52
const char * geom_name
Definition flatgeobuf.h:49
flatgeobuf_ctx * ctx
Definition flatgeobuf.h:48
uint32_t geom_index
Definition flatgeobuf.h:50
TupleDesc tupdesc
Definition flatgeobuf.h:51
flatgeobuf_ctx * ctx
Definition flatgeobuf.h:62