PostGIS  2.1.10dev-r@@SVN_REVISION@@
int getPoint2d_p ( const POINTARRAY pa,
int  n,
POINT2D point 
)

Definition at line 434 of file lwgeom_api.c.

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

Referenced by assvg_point_buf(), geometry_to_path(), geometry_to_polygon(), line2pts(), LWGEOM_azimuth(), lwgeom_covers_lwgeom_sphere(), lwgeom_distance_spheroid(), LWGEOM_x_point(), LWGEOM_y_point(), lwline_crossing_direction(), lwpoint_getPoint2d_p(), lwpoint_inside_circle(), lwpoint_to_latlon(), lwpoly_grid(), 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(), ptarray_distance_spheroid(), RASTER_nearestValue(), and RASTER_setPixelValuesGeomval().

435 {
436 #if PARANOIA_LEVEL > 0
437  if ( ! pa ) return 0;
438 
439  if ( (n<0) || (n>=pa->npoints))
440  {
441  lwerror("getPoint2d_p: point offset out of range");
442  return 0; /*error */
443  }
444 #endif
445 
446  /* this does x,y */
447  memcpy(point, getPoint_internal(pa, n), sizeof(POINT2D));
448  return 1;
449 }
int npoints
Definition: liblwgeom.h:327
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:67
uint8_t * getPoint_internal(const POINTARRAY *pa, int n)
Definition: ptarray.c:1645

Here is the call graph for this function:

Here is the caller graph for this function: