3184{
3186 LWGEOM *lwgeom_in, *lwblade_in, *lwgeom_out;
3187
3188 in = PG_GETARG_GSERIALIZED_P(0);
3189 blade_in = PG_GETARG_GSERIALIZED_P(1);
3191
3194
3196 {
3197 lwpgerror("Input Geometry contains invalid coordinates");
3198 PG_RETURN_NULL();
3199 }
3200
3202 {
3203 lwpgerror("Blade Geometry contains invalid coordinates");
3204 PG_RETURN_NULL();
3205 }
3206
3207
3211
3212 if ( ! lwgeom_out )
3213 {
3214 PG_FREE_IF_COPY(in, 0);
3215 PG_FREE_IF_COPY(blade_in, 1);
3216 PG_RETURN_NULL();
3217 }
3218
3221 PG_FREE_IF_COPY(in, 0);
3222 PG_FREE_IF_COPY(blade_in, 1);
3223
3224 PG_RETURN_POINTER(out);
3225}
void gserialized_error_if_srid_mismatch(const GSERIALIZED *g1, const GSERIALIZED *g2, const char *funcname)
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
LWGEOM * lwgeom_split(const LWGEOM *lwgeom_in, const LWGEOM *blade_in)
void lwgeom_free(LWGEOM *geom)
int lwgeom_isfinite(const LWGEOM *lwgeom)
Check if a LWGEOM has any non-finite (NaN or Inf) coordinates.
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)