PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches
rtpostgis.h
Go to the documentation of this file.
1/*
2 *
3 * WKTRaster - Raster Types for PostGIS
4 * http://trac.osgeo.org/postgis/wiki/WKTRaster
5 *
6 * Copyright (C) 2010-2011 Jorge Arevalo <jorge.arevalo@deimos-space.com>
7 * Copyright (C) 2010-2011 David Zwarg <dzwarg@azavea.com>
8 * Copyright (C) 2009-2011 Pierre Racine <pierre.racine@sbf.ulaval.ca>
9 * Copyright (C) 2009-2011 Mateusz Loskot <mateusz@loskot.net>
10 * Copyright (C) 2008-2009 Sandro Santilli <strk@kbt.io>
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software Foundation,
24 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 *
26 */
27
28#ifndef RTPOSTGIS_H_INCLUDED
29#define RTPOSTGIS_H_INCLUDED
30
31/* Quiet build noise by stripping duplicate MACRO defns */
32/* coming from include files */
33#undef PACKAGE_BUGREPORT
34#undef PACKAGE_NAME
35#undef PACKAGE_STRING
36#undef PACKAGE_TARNAME
37#undef PACKAGE_VERSION
38
39#include "librtcore.h"
40
41#if POSTGIS_PGSQL_VERSION > 150
42#include "varatt.h"
43#endif
44
45/* Debugging macros */
46#if POSTGIS_DEBUG_LEVEL > 0
47
48/* Display a simple message at NOTICE level */
49#define POSTGIS_RT_DEBUG(level, msg) \
50 do { \
51 if (POSTGIS_DEBUG_LEVEL >= level) \
52 ereport((level < 1 || level > 5) ? DEBUG5 : (LOG - level), (errmsg_internal("[%s:%s:%d] " msg, __FILE__, __func__, __LINE__))); \
53 } while (0);
54
55/* Display a formatted message at NOTICE level (like printf, with variadic arguments) */
56#define POSTGIS_RT_DEBUGF(level, msg, ...) \
57 do { \
58 if (POSTGIS_DEBUG_LEVEL >= level) \
59 ereport((level < 1 || level > 5) ? DEBUG5 : (LOG - level), (errmsg_internal("[%s:%s:%d] " msg, __FILE__, __func__, __LINE__, __VA_ARGS__))); \
60 } while (0);
61
62#else
63
64/* Empty prototype that can be optimised away by the compiler for non-debug builds */
65#define POSTGIS_RT_DEBUG(level, msg) \
66 ((void) 0)
67
68/* Empty prototype that can be optimised away by the compiler for non-debug builds */
69#define POSTGIS_RT_DEBUGF(level, msg, ...) \
70 ((void) 0)
71
72#endif
73
74/* Header of PostgreSQL-stored RASTER value,
75 * and binary representation of it */
77
78/* maximum char length required to hold any double or long long value */
79#define MAX_DBL_CHARLEN (3 + DBL_MANT_DIG - DBL_MIN_EXP)
80#define MAX_INT_CHARLEN 32
81
82/* postgis.gdal_cpl_debug on/off callback */
83void rtpg_gdal_set_cpl_debug(bool value, void *extra);
84
85#endif /* RTPOSTGIS_H_INCLUDED */
This library is the generic raster handling section of PostGIS.
void rtpg_gdal_set_cpl_debug(bool value, void *extra)
Definition rtpg_gdal.c:1147
Struct definitions.
Definition librtcore.h:2452