GRASS 8 Programmer's Manual 8.6.0dev(2026)-4bb960b182
Loading...
Searching...
No Matches
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.
 

Detailed Description

GIS Library - Pole in polygon.

SPDX-FileCopyrightText: 2001-2009 GRASS Development Team SPDX-License-Identifier: GPL-2.0-or-later

Author
CERL

Definition in file pole_in_poly.c.

Function Documentation

◆ G_pole_in_polygon()

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 33 of file pole_in_poly.c.

References x.