Browse Source

v.external: suppress warnings for projection check

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54573 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 năm trước cách đây
mục cha
commit
65f2fae4a1
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      vector/v.external/list.c

+ 2 - 1
vector/v.external/list.c

@@ -285,6 +285,7 @@ int list_layers_ogr(FILE *fd, const char *dsn, const char *layer, int print_type
 		/* projection check */
 		/* projection check */
 		Ogr_projection = OGR_L_GetSpatialRef(Ogr_layer);
 		Ogr_projection = OGR_L_GetSpatialRef(Ogr_layer);
 		proj_same = 0;
 		proj_same = 0;
+		G_suppress_warnings(TRUE);
 		if (GPJ_osr_to_grass(&loc_wind, &proj_info,
 		if (GPJ_osr_to_grass(&loc_wind, &proj_info,
 				     &proj_units, Ogr_projection, 0) < 0) {
 				     &proj_units, Ogr_projection, 0) < 0) {
 		    G_warning(_("Unable to convert input map projection to GRASS "
 		    G_warning(_("Unable to convert input map projection to GRASS "
@@ -298,7 +299,7 @@ int list_layers_ogr(FILE *fd, const char *dsn, const char *layer, int print_type
 		    else
 		    else
 			proj_same = 0;
 			proj_same = 0;
 		}
 		}
-		
+		G_suppress_warnings(FALSE);
 		fprintf(fd, "%s,%s,%d\n", layer_name,
 		fprintf(fd, "%s,%s,%d\n", layer_name,
 			feature_type(OGRGeometryTypeToName(Ogr_geom_type)),
 			feature_type(OGRGeometryTypeToName(Ogr_geom_type)),
 			proj_same);
 			proj_same);