220{
227 double ret;
228
230 {
231 elog(ERROR,"line_locate_point: 1st arg isn't a line");
232 PG_RETURN_NULL();
233 }
235 {
236 elog(ERROR,"line_locate_point: 2nd arg isn't a point");
237 PG_RETURN_NULL();
238 }
239
241
244
247
249
250 PG_RETURN_FLOAT8(ret);
251}
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.
uint32_t gserialized_get_type(const GSERIALIZED *g)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
int lwpoint_getPoint4d_p(const LWPOINT *point, POINT4D *out)
double ptarray_locate_point(const POINTARRAY *pa, const POINT4D *pt, double *dist, POINT4D *p_located)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
LWLINE * lwgeom_as_lwline(const LWGEOM *lwgeom)
static LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)