wind_limits.c

Go to the documentation of this file.
00001 #include <grass/gis.h>
00002 
00003 /* If the projection has absolute limits (like lat/lon), then
00004  * these routines modify the input coordinate to be within the
00005  * limit
00006  *
00007  * return 1 no change, 0 changed
00008  */
00009 
00010 int G_limit_east ( double *east, int proj)
00011 {
00012     return 1;
00013 }
00014 
00015 int G_limit_west (double *west, int proj)
00016 {
00017     return 1;
00018 }
00019 
00020 int G_limit_north (double *north, int proj)
00021 {
00022     if (proj == PROJECTION_LL)
00023     {
00024         if(*north > 90.0)
00025         {
00026             *north = 90.0;
00027             return 0;
00028         }
00029         if (*north < -90)
00030         {
00031             *north = -90;
00032             return 0;
00033         }
00034     }
00035     return 1;
00036 }
00037 
00038 int G_limit_south (double *south, int proj)
00039 {
00040     if (proj == PROJECTION_LL)
00041     {
00042         if(*south > 90.0)
00043         {
00044             *south = 90.0;
00045             return 0;
00046         }
00047         if (*south < -90)
00048         {
00049             *south = -90;
00050             return 0;
00051         }
00052     }
00053     return 1;
00054 }

Generated on Wed Dec 19 14:59:06 2007 for GRASS by  doxygen 1.5.4