Loading...
Searching...
No Matches
wind_limits.c
Go to the documentation of this file.
/*!
* \file lib/gis/wind_limits.c
*
* \brief GIS Library - Projection limit functions.
*
* (C) 2001-2014 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 GRASS Development Team
*
* \date 1999-2014
*/
#include <grass/gis.h>
/**
* \brief Function not yet implemented...
*
* If the projection has absolute limits (like lat/lon), then
* this routine modifies the input coordinate to be within the
* limit.<br>
*
* <b>Note:</b> Function not yet implemented.
*
* \param[in] east
* \param[in] proj
* \return 1 no change
* \return 0 changed
*/
int G_limit_east(double *east G_UNUSED, int proj G_UNUSED)
{
return 1;
}
/**
* \brief Function not yet implemented...
*
* If the projection has absolute limits (like lat/lon), then
* this routine modifies the input coordinate to be within the
* limit.<br>
*
* <b>Note:</b> Function not yet implemented.
*
* \param[in] west
* \param[in] proj
* \return 1 no change
* \return 0 changed
*/
int G_limit_west(double *west G_UNUSED, int proj G_UNUSED)
{
return 1;
}
/**
* \brief Limit north (y) coordinate
*
* If the projection has absolute limits (like lat/lon), then
* this routine modifies the input coordinate to be within the
* limit.<br>
*
* \param[in,out] north north coordinate
* \param[in] proj projection id
* \return 1 no change
* \return 0 changed
*/
int G_limit_north(double *north, int proj)
{
if (proj == PROJECTION_LL) {
if (*north > 90.0) {
*north = 90.0;
return 0;
}
if (*north < -90) {
*north = -90;
return 0;
}
}
return 1;
}
/**
* \brief Limit south (y) coordinate
*
* If the projection has absolute limits (like lat/lon), then
* this routine modifies the input coordinate to be within the
* limit.<br>
*
* \param[in] south south coordinate
* \param[in] proj projection id
* \return 1 no change
* \return 0 changed
*/
int G_limit_south(double *south, int proj)
{
if (proj == PROJECTION_LL) {
if (*south > 90.0) {
*south = 90.0;
return 0;
}
if (*south < -90) {
*south = -90;
return 0;
}
}
return 1;
}
G_limit_east
int G_limit_east(double *east, int proj)
Function not yet implemented...
Definition wind_limits.c:32
G_limit_north
int G_limit_north(double *north, int proj)
Limit north (y) coordinate.
Definition wind_limits.c:68
G_limit_south
int G_limit_south(double *south, int proj)
Limit south (y) coordinate.
Definition wind_limits.c:96
G_limit_west
int G_limit_west(double *west, int proj)
Function not yet implemented...
Definition wind_limits.c:51