[GRASS-SVN] r37590 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri May 29 15:53:35 EDT 2009
Author: martinl
Date: 2009-05-29 15:53:35 -0400 (Fri, 29 May 2009)
New Revision: 37590
Modified:
grass/trunk/lib/gis/get_projinfo.c
grass/trunk/lib/gis/proj1.c
Log:
Suppress warnings for xy locations (trac #492)
Minor Doxygen updates
Modified: grass/trunk/lib/gis/get_projinfo.c
===================================================================
--- grass/trunk/lib/gis/get_projinfo.c 2009-05-29 16:17:12 UTC (rev 37589)
+++ grass/trunk/lib/gis/get_projinfo.c 2009-05-29 19:53:35 UTC (rev 37590)
@@ -30,8 +30,10 @@
G__file_name(path, "", UNIT_FILE, PERMANENT);
if (access(path, 0) != 0) {
- G_warning(_("<%s> file not found for location <%s>"),
- UNIT_FILE, G_location());
+ if (G_projection() != PROJECTION_XY) {
+ G_warning(_("<%s> file not found for location <%s>"),
+ UNIT_FILE, G_location());
+ }
return NULL;
}
in_units_keys = G_read_key_value_file(path, &stat);
@@ -57,8 +59,10 @@
G__file_name(path, "", PROJECTION_FILE, PERMANENT);
if (access(path, 0) != 0) {
- G_warning(_("<%s> file not found for location <%s>"),
- PROJECTION_FILE, G_location());
+ if (G_projection() != PROJECTION_XY) {
+ G_warning(_("<%s> file not found for location <%s>"),
+ PROJECTION_FILE, G_location());
+ }
return NULL;
}
in_proj_keys = G_read_key_value_file(path, &stat);
Modified: grass/trunk/lib/gis/proj1.c
===================================================================
--- grass/trunk/lib/gis/proj1.c 2009-05-29 16:17:12 UTC (rev 37589)
+++ grass/trunk/lib/gis/proj1.c 2009-05-29 19:53:35 UTC (rev 37590)
@@ -1,35 +1,33 @@
+/*!
+ \file proj1.c
-/**********************************************************************
- * G_projection()
- *
- * Returns the projection type of the currently set window.
- * (Note this is really the coordinate system, not the projection)
- * PROJECTION_XY 0 - x,y (Raw imagery)
- * PROJECTION_UTM 1 - UTM Universal Transverse Mercator
- * PROJECTION_SP 2 - State Plane (in feet)
- * PROJECTION_LL 3 - Latitude-Longitude
- *
- **********************************************************************/
+ \brief GIS Library - Get projection info
+
+ (C) 1999-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 Original author CERL
+*/
+
#include <grass/gis.h>
-
/*!
- * \brief query cartographic projection
- *
- * This routine returns a code indicating the projection for the active region. The current
- * values are:
- * 0 unreferenced x,y (imagery data)
- * 1 UTM
- * 2 State Plane
- * 3 Latitude-Longitude\remarks{Latitude-Longitude is not yet fully supported in
- * GRASS.}
- * Others may be added in the future. HINT GRASS 5: 121 projections!!
- *
- * \param void
- * \return int
- */
+ \brief Query cartographic projection
+
+ This routine returns a code indicating the projection for the active region. The current
+ values are:
+ - PROJECTION_XY 0 - x,y (Raw imagery)
+ - PROJECTION_UTM 1 - UTM Universal Transverse Mercator
+ - PROJECTION_SP 2 - State Plane (in feet)
+ - PROJECTION_LL 3 - Latitude-Longitude
+
+ Others may be added in the future.
+
+ \return projection code (see above)
+*/
int G_projection(void)
{
struct Cell_head window;
More information about the grass-commit
mailing list