28 #include "utils/guc.h"
30 #include "../postgis_config.h"
31 #include "lwgeom_pg.h"
37 #include "lwgeom_sfcgal.h"
45 Datum
area(PG_FUNCTION_ARGS);
66 #define LWGEOM_NUM_BACKENDS 2
68 #define LWGEOM_NUM_BACKENDS 1
105 if (!newvalue) {
return; }
113 lwpgerror(
"Can't find %s geometry backend", newvalue );
123 static const char *guc_name =
"postgis.backend";
131 if ( postgis_guc_find_option(guc_name) )
136 elog(WARNING,
"'%s' is already set and cannot be changed until you reconnect", guc_name);
142 DefineCustomStringVariable( guc_name,
143 "Sets the PostGIS Geometry Backend.",
144 "Sets the PostGIS Geometry Backend (allowed values are 'geos' or 'sfcgal')",
157 backend/utils/misc/guc.h
158 int GetNumConfigOptions(
void) returns num_guc_variables
160 backend/utils/misc/guc_tables.h
161 struct config_generic ** get_guc_variables(
void)
234 PG_FREE_IF_COPY(geom1, 0);
235 PG_FREE_IF_COPY(geom2, 1);
238 PG_RETURN_BOOL(0.0 == mindist);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
double lwgeom_mindistance3d_tolerance(const LWGEOM *lw1, const LWGEOM *lw2, double tolerance)
Function handling 3d min distance calculations and dwithin calculations.
void error_if_srid_mismatch(int srid1, int srid2)
This library is the generic geometry handling section of PostGIS.
Datum distance3d(PG_FUNCTION_ARGS)
void lwgeom_init_backend()
Datum distance(PG_FUNCTION_ARGS)
Datum intersection(PG_FUNCTION_ARGS)
Datum intersects3d_dwithin(PG_FUNCTION_ARGS)
PG_FUNCTION_INFO_V1(intersects)
struct lwgeom_backend_definition lwgeom_backends[LWGEOM_NUM_BACKENDS]
Datum intersects(PG_FUNCTION_ARGS)
#define LWGEOM_NUM_BACKENDS
Datum intersects3d(PG_FUNCTION_ARGS)
struct lwgeom_backend_definition * lwgeom_backend
char * lwgeom_backend_name
Datum area(PG_FUNCTION_ARGS)
static void lwgeom_backend_switch(const char *newvalue, __attribute__((__unused__)) void *extra)
Datum geomunion(PG_FUNCTION_ARGS)
Datum difference(PG_FUNCTION_ARGS)
Datum LWGEOM_mindistance2d(PG_FUNCTION_ARGS)
Datum LWGEOM_area_polygon(PG_FUNCTION_ARGS)
Datum LWGEOM_mindistance3d(PG_FUNCTION_ARGS)
Datum geos_geomunion(PG_FUNCTION_ARGS)
Datum geos_intersects(PG_FUNCTION_ARGS)
Datum geos_difference(PG_FUNCTION_ARGS)
Datum geos_intersection(PG_FUNCTION_ARGS)
Datum sfcgal_difference(PG_FUNCTION_ARGS)
Datum sfcgal_distance(PG_FUNCTION_ARGS)
Datum sfcgal_intersects3D(PG_FUNCTION_ARGS)
Datum sfcgal_intersects(PG_FUNCTION_ARGS)
Datum sfcgal_area(PG_FUNCTION_ARGS)
Datum sfcgal_intersection(PG_FUNCTION_ARGS)
Datum sfcgal_distance3D(PG_FUNCTION_ARGS)
Datum sfcgal_union(PG_FUNCTION_ARGS)
Datum(* intersection_fn)(PG_FUNCTION_ARGS)
Datum(* intersects_fn)(PG_FUNCTION_ARGS)
Datum(* union_fn)(PG_FUNCTION_ARGS)
Datum(* difference_fn)(PG_FUNCTION_ARGS)
Datum(* distance_fn)(PG_FUNCTION_ARGS)
Datum(* intersects3d_fn)(PG_FUNCTION_ARGS)
Datum(* distance3d_fn)(PG_FUNCTION_ARGS)
Datum(* area_fn)(PG_FUNCTION_ARGS)