PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lwpoint_project()

LWPOINT * lwpoint_project ( const LWPOINT lwpoint1,
double  distance,
double  azimuth 
)
extern

Definition at line 290 of file lwpoint.c.

291{
292 POINT4D p1, p2;
293 int srid = lwgeom_get_srid((const LWGEOM*)lwpoint1);
294 int hasz = lwgeom_has_z((const LWGEOM*)lwpoint1);
295 int hasm = lwgeom_has_m((const LWGEOM*)lwpoint1);
296 lwpoint_getPoint4d_p(lwpoint1, &p1);
297 lwpoint_getPoint4d_p(lwpoint1, &p2);
298 project_pt((POINT2D*)&p1, distance, azimuth, (POINT2D*)&p2);
299 return lwpoint_make(srid, hasz, hasm, &p2);
300}
int32_t lwgeom_get_srid(const LWGEOM *geom)
Return SRID number.
Definition lwgeom.c:955
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
Definition lwgeom.c:962
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
Definition lwgeom.c:969
int project_pt(const POINT2D *P, double distance, double azimuth, POINT2D *R)
Azimuth is angle in radians from vertical axis.
Definition measures.c:2421
int lwpoint_getPoint4d_p(const LWPOINT *point, POINT4D *out)
Definition lwpoint.c:57
LWPOINT * lwpoint_make(int32_t srid, int hasz, int hasm, const POINT4D *p)
Definition lwpoint.c:206
static double distance(double x1, double y1, double x2, double y2)
Definition lwtree.c:1032

References distance(), lwgeom_get_srid(), lwgeom_has_m(), lwgeom_has_z(), lwpoint_getPoint4d_p(), lwpoint_make(), and project_pt().

Referenced by geometry_project_direction().

Here is the call graph for this function:
Here is the caller graph for this function: