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; }
108 if ( !strcmp(lwgeom_backends[i].
name, newvalue) ) {
109 lwgeom_backend = &lwgeom_backends[i];
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')",
146 (
char *)lwgeom_backends[0].
name,
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)
189 return (*lwgeom_backend->
union_fn)( fcinfo );
195 return (*lwgeom_backend->
area_fn)( fcinfo );
234 PG_FREE_IF_COPY(geom1, 0);
235 PG_FREE_IF_COPY(geom2, 1);
238 PG_RETURN_BOOL(0.0 == mindist);
double lwgeom_mindistance3d_tolerance(const LWGEOM *lw1, const LWGEOM *lw2, double tolerance)
Function handling 3d min distance calculations and dwithin calculations.
Datum(* distance_fn)(PG_FUNCTION_ARGS)
Datum geomunion(PG_FUNCTION_ARGS)
PG_FUNCTION_INFO_V1(intersects)
Datum distance3d(PG_FUNCTION_ARGS)
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Datum(* difference_fn)(PG_FUNCTION_ARGS)
Datum area(PG_FUNCTION_ARGS)
Datum intersects3d_dwithin(PG_FUNCTION_ARGS)
Datum LWGEOM_mindistance3d(PG_FUNCTION_ARGS)
char * lwgeom_backend_name
Datum sfcgal_distance3D(PG_FUNCTION_ARGS)
void error_if_srid_mismatch(int srid1, int srid2)
Datum(* union_fn)(PG_FUNCTION_ARGS)
Datum intersection(PG_FUNCTION_ARGS)
Datum geos_geomunion(PG_FUNCTION_ARGS)
void lwgeom_init_backend()
Datum(* distance3d_fn)(PG_FUNCTION_ARGS)
Datum intersects(PG_FUNCTION_ARGS)
Datum sfcgal_intersects3D(PG_FUNCTION_ARGS)
Datum(* intersects3d_fn)(PG_FUNCTION_ARGS)
struct lwgeom_backend_definition * lwgeom_backend
Datum intersects3d(PG_FUNCTION_ARGS)
Datum(* area_fn)(PG_FUNCTION_ARGS)
Datum distance(PG_FUNCTION_ARGS)
Datum sfcgal_union(PG_FUNCTION_ARGS)
Datum sfcgal_intersects(PG_FUNCTION_ARGS)
Datum LWGEOM_area_polygon(PG_FUNCTION_ARGS)
#define LWGEOM_NUM_BACKENDS
Datum geos_intersects(PG_FUNCTION_ARGS)
static void lwgeom_backend_switch(const char *newvalue, void *extra)
Datum LWGEOM_mindistance2d(PG_FUNCTION_ARGS)
Datum sfcgal_distance(PG_FUNCTION_ARGS)
Datum geos_difference(PG_FUNCTION_ARGS)
Datum sfcgal_intersection(PG_FUNCTION_ARGS)
Datum sfcgal_area(PG_FUNCTION_ARGS)
Datum(* intersection_fn)(PG_FUNCTION_ARGS)
Datum sfcgal_difference(PG_FUNCTION_ARGS)
Datum(* intersects_fn)(PG_FUNCTION_ARGS)
Datum geos_intersection(PG_FUNCTION_ARGS)
struct lwgeom_backend_definition lwgeom_backends[LWGEOM_NUM_BACKENDS]
This library is the generic geometry handling section of PostGIS.
Datum difference(PG_FUNCTION_ARGS)