185{
186 GSERIALIZED *gser_line = PG_GETARG_GSERIALIZED_P(0);
187 GSERIALIZED *gser_point = PG_GETARG_GSERIALIZED_P(1);
190
192 {
193 elog(ERROR,"ST_InterpolatePoint: 1st argument isn't a line");
194 PG_RETURN_NULL();
195 }
197 {
198 elog(ERROR,"ST_InterpolatePoint: 2nd argument isn't a point");
199 PG_RETURN_NULL();
200 }
201
203
205 {
206 elog(ERROR,"ST_InterpolatePoint only accepts geometries that have an M dimension");
207 PG_RETURN_NULL();
208 }
209
212
214}
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.
int gserialized_has_m(const GSERIALIZED *g)
Check if a GSERIALIZED has an M ordinate.
uint32_t gserialized_get_type(const GSERIALIZED *g)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
double lwgeom_interpolate_point(const LWGEOM *lwin, const LWPOINT *lwpt)
Find the measure value at the location on the line closest to the point.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
static LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)