150{
152 SHARED_GSERIALIZED *shared_geom1 = ToastCacheGetGeometry(fcinfo, 0);
153 SHARED_GSERIALIZED *shared_geom2 = ToastCacheGetGeometry(fcinfo, 1);
154 const GSERIALIZED *g1 = shared_gserialized_get(shared_geom1);
155 const GSERIALIZED *g2 = shared_gserialized_get(shared_geom2);
156
157
159 {
160 PG_RETURN_NULL();
161 }
162
163
165 {
169 }
170
171
173
174 if (tree_cache && tree_cache->
gcache.argnum)
175 {
178 if (tree_cache->
gcache.argnum == 1)
179 {
182 }
183 else if (tree_cache->
gcache.argnum == 2)
184 {
187 }
188 else
189 {
190 elog(ERROR, "reached unreachable block in %s", __func__);
191 }
193 }
194 else
195 {
199 }
200
201 PG_RETURN_NULL();
202}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
uint32_t gserialized_get_type(const GSERIALIZED *g)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
double lwgeom_mindistance2d(const LWGEOM *lw1, const LWGEOM *lw2)
Function initializing min distance calculation.
static RectTreeGeomCache * GetRectTreeGeomCache(FunctionCallInfo fcinfo, SHARED_GSERIALIZED *g1, SHARED_GSERIALIZED *g2)
RECT_NODE * rect_tree_from_lwgeom(const LWGEOM *lwgeom)
Create a tree index on top an LWGEOM.
double rect_tree_distance_tree(RECT_NODE *n1, RECT_NODE *n2, double threshold)
Return the distance between two RECT_NODE trees.