|
H3C HEALPix library for PostgreSQL
(version 1.2)
|
other function to deal with polygon More...
Include dependency graph for h3c_poly_more.c:Go to the source code of this file.
Functions | |
| void | h3c_poly_center (int n, h3c_coord_t *in_ra, h3c_coord_t *in_dec, h3c_coord_t *b) |
| get the polgon center More... | |
| int | h3c_check_sphere_point_in_poly_convex (int n, h3c_coord_t *in_ra, h3c_coord_t *in_dec, h3c_coord_t ra0, h3c_coord_t dec0) |
| verify if a point is inside a convex polygon More... | |
| int | h3c_poly_is_convex (int n, h3c_coord_t *in_ra, h3c_coord_t *in_dec) |
| verify if the polygon is convex More... | |
| int | h3c_check_sphere_circle_intersect_poly (int n, h3c_coord_t in_ra[], h3c_coord_t in_dec[], h3c_coord_t ra0, h3c_coord_t dec0, h3c_coord_t radius) |
| check if a circle intersects a vertex of a polygon More... | |
| h3c_ipix_t * | h3c_polygon_ipix (h3c_coord_t *in_ra, h3c_coord_t *in_dec, int n, int nside, int *count) |
| retrieve the ipix list for a polygon More... | |
| int | h3c_check_poly_intersect_poly (int n1, h3c_coord_t in_ra1[], h3c_coord_t in_dec1[], int n2, h3c_coord_t in_ra2[], h3c_coord_t in_dec2[]) |
| check if a polygon intersects a vertex of an other polygon More... | |
| h3c_coord_t | h3c_polygon_area (h3c_coord_t *in_ra, h3c_coord_t *in_dec, int n) |
| calculate the area of a polygon More... | |
| int h3c_check_poly_intersect_poly | ( | int | n1, |
| h3c_coord_t | in_ra1[], | ||
| h3c_coord_t | in_dec1[], | ||
| int | n2, | ||
| h3c_coord_t | in_ra2[], | ||
| h3c_coord_t | in_dec2[] | ||
| ) |
check if a polygon intersects a vertex of an other polygon
| n1 | number of vertex of the 1st polygon |
| in_ra1 | right ascention of the point of the 1st polygon |
| in_dec1 | declination of the point of the 1st polygon |
| n2 | number of vertex of the 1st polygon |
| in_ra2 | right ascention of the point of the 1st polygon |
| in_dec2 | declination of the point of the 1st polygon |
Definition at line 575 of file h3c_poly_more.c.
| int h3c_check_sphere_circle_intersect_poly | ( | int | n, |
| h3c_coord_t | in_ra[], | ||
| h3c_coord_t | in_dec[], | ||
| h3c_coord_t | ra0, | ||
| h3c_coord_t | dec0, | ||
| h3c_coord_t | radius | ||
| ) |
check if a circle intersects a vertex of a polygon
| n | number of vertex |
| in_ra | polygon right ascention |
| in_dec | polygon declination |
| ra0 | right ascension of the circle |
| dec0 | declination of the circle |
| radius | radius of the circle |
Definition at line 320 of file h3c_poly_more.c.
| int h3c_check_sphere_point_in_poly_convex | ( | int | n, |
| h3c_coord_t * | in_ra, | ||
| h3c_coord_t * | in_dec, | ||
| h3c_coord_t | ra0, | ||
| h3c_coord_t | dec0 | ||
| ) |
verify if a point is inside a convex polygon
| n | number of points |
| in_ra | right ascention of the polygon points |
| in_dec | declination of the polygon points |
| ra0 | right ascention of the point to test |
| dec0 | declination of the point to test |
@warn the convex polygons are just a particular case of this ensemble
This function can be applied for polygon more large than convex. (see h3c_poly_is_convex)
Definition at line 185 of file h3c_poly_more.c.
| void h3c_poly_center | ( | int | n, |
| h3c_coord_t * | in_ra, | ||
| h3c_coord_t * | in_dec, | ||
| h3c_coord_t * | b | ||
| ) |
get the polgon center
| n | number of points |
| in_ra | right ascention of the polygon points |
| in_dec | declination ot the polygon points |
| b | (OUT) the center |
Definition at line 86 of file h3c_poly_more.c.
| int h3c_poly_is_convex | ( | int | n, |
| h3c_coord_t * | in_ra, | ||
| h3c_coord_t * | in_dec | ||
| ) |
verify if the polygon is convex
| n | number of points |
| in_ra | right ascension of the polygon points |
| in_dec | declination of the polygon points |
@warn the convex polygons are just a particular case of this ensemble
In reality the function return true if the function h3c_check_sphere_point_in_poly_convex can be applied to verify if a point is inside the polygon.
Definition at line 220 of file h3c_poly_more.c.
References h3c_check_sphere_point_in_poly_convex(), and h3c_poly_center().
Here is the call graph for this function:| h3c_coord_t h3c_polygon_area | ( | h3c_coord_t * | in_ra, |
| h3c_coord_t * | in_dec, | ||
| int | n | ||
| ) |
calculate the area of a polygon
| in_ra | right ascentions of the points of the polygon |
| in_dec | declinations of the points of the polygon |
| nnumber | of vertex of the polygon |
Definition at line 649 of file h3c_poly_more.c.
| h3c_ipix_t* h3c_polygon_ipix | ( | h3c_coord_t * | in_ra, |
| h3c_coord_t * | in_dec, | ||
| int | n, | ||
| int | nside, | ||
| int * | count | ||
| ) |
retrieve the ipix list for a polygon
| ra | right ascention of the points |
| dec | declination of the points |
| n | number of points |
| nside | nside level |
get the ipix where center is inside the polygon
P: the center of ipix vect(OQ) = normalized (vect(OA) ^ vect(OB)) dist = pi/2 - acos(vect(OP).vect(OQ))
Definition at line 426 of file h3c_poly_more.c.
References h3c_log().
Here is the call graph for this function: