PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ getPoint2d_p()

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

Definition at line 448 of file lwgeom_api.c.

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

Referenced by _lwt_AddEdge(), _lwt_FindAdjacentEdges(), _lwt_FindNextRingEdge(), _lwt_FirstDistinctVertex2D(), _lwt_GetInteriorEdgePoint(), assvg_point_buf(), line2pts(), 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(), point_in_ring(), point_in_ring_rtree(), pointArray_svg_abs(), pointArray_toX3D3(), ptarray_append_ptarray(), ptarray_area_spheroid(), ptarray_check_geodetic(), ptarray_contains_point_sphere(), RASTER_nearestValue(), RASTER_setPixelValuesGeomval(), spheroid_big_b(), and test_lwgeom_split().

449 {
450 #if PARANOIA_LEVEL > 0
451  if ( ! pa ) return 0;
452 
453  if ( (n<0) || (n>=pa->npoints))
454  {
455  lwerror("getPoint2d_p: point offset out of range");
456  return 0; /*error */
457  }
458 #endif
459 
460  /* this does x,y */
461  memcpy(point, getPoint_internal(pa, n), sizeof(POINT2D));
462  return 1;
463 }
int npoints
Definition: liblwgeom.h:355
uint8_t * getPoint_internal(const POINTARRAY *pa, int n)
Definition: ptarray.c:1706
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:74
Here is the call graph for this function:
Here is the caller graph for this function: