PostGIS  3.0.0dev-r@@SVN_REVISION@@

◆ getPoint2d_p()

int getPoint2d_p ( const POINTARRAY pa,
uint32_t  n,
POINT2D point 
)

Definition at line 338 of file lwgeom_api.c.

References getPoint_internal(), lwerror(), lwnotice(), and POINTARRAY::npoints.

Referenced by _lwt_AddEdge(), _lwt_EdgeRingIterator_next(), _lwt_FindAdjacentEdges(), _lwt_FindFaceContainingRing(), _lwt_FindNextRingEdge(), _lwt_FirstDistinctVertex2D(), _lwt_GetInteriorEdgePoint(), assvg_point_buf(), line2pts(), LWGEOM_angle(), LWGEOM_azimuth(), lwgeom_covers_lwgeom_sphere(), LWGEOM_x_point(), LWGEOM_y_point(), lwpoint_getPoint2d_p(), lwt_AddIsoEdge(), lwt_ChangeEdgeGeom(), lwt_GetNodeByPoint(), lwtriangle_area(), point_in_multipolygon(), point_in_multipolygon_rtree(), point_in_polygon(), point_in_polygon_rtree(), pointArray_svg_abs(), ptarray_append_ptarray(), ptarray_area_spheroid(), ptarray_check_geodetic(), ptarray_contains_point_sphere(), ptarray_to_x3d3_sb(), RASTER_nearestValue(), RASTER_setPixelValuesGeomval(), spheroid_big_b(), and test_lwgeom_split().

339 {
340  if ( ! pa )
341  {
342  lwerror("%s [%d] NULL POINTARRAY input", __FILE__, __LINE__);
343  return 0;
344  }
345 
346  if ( n>=pa->npoints )
347  {
348  lwnotice("%s [%d] called with n=%d and npoints=%d", __FILE__, __LINE__, n, pa->npoints);
349  return 0;
350  }
351 
352  /* this does x,y */
353  memcpy(point, getPoint_internal(pa, n), sizeof(POINT2D));
354  return 1;
355 }
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
Definition: lwutil.c:177
uint8_t * getPoint_internal(const POINTARRAY *pa, uint32_t n)
Definition: ptarray.c:1743
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
uint32_t npoints
Definition: liblwgeom.h:373
Here is the call graph for this function:
Here is the caller graph for this function: