GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r73120
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pole_in_poly.c File Reference

GIS Library - Pole in polygon. More...

#include <grass/gis.h>
Include dependency graph for pole_in_poly.c:

Go to the source code of this file.

Functions

int G_pole_in_polygon (const double *x, const double *y, int n)
 Check if pole is in polygon. More...
 

Detailed Description

GIS Library - Pole in polygon.

(C) 2001-2009 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
CERL

Definition in file pole_in_poly.c.

Function Documentation

int G_pole_in_polygon ( const double *  x,
const double *  y,
int  n 
)

Check if pole is in polygon.

For latitude-longitude coordinates, this routine determines if the polygon defined by the n coordinate vertices x,y contains one of the poles.

Note: Use this routine only if the projection is PROJECTION_LL.

Parameters
xarray of x coordinates
yarray of y coordinates
nnumber of coordinates
Returns
-1 if it contains the south pole
1 if it contains the north pole
0 if it contains neither pole.

Definition at line 35 of file pole_in_poly.c.