Parcourir la source

g.proj: enhancement to try opening a geofile as wkt definition, see also gdalsrsinfo

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74072 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz il y a 6 ans
Parent
commit
ec71f1f607
1 fichiers modifiés avec 6 ajouts et 3 suppressions
  1. 6 3
      general/g.proj/input.c

+ 6 - 3
general/g.proj/input.c

@@ -280,9 +280,12 @@ int input_georef(char *geofile)
 	    set_gdal_region(gdal_ds);
 	    hSRS = OSRNewSpatialReference(wktstring);
 	}
-	else
-	    G_fatal_error(_("Unable to read georeferenced file <%s> using "
-			    "GDAL library"), geofile);
+	else {
+	    G_warning(_("Unable to read georeferenced file <%s> using "
+			"GDAL library, trying to open it as ESRI WKT"), geofile);
+
+	    return input_wkt(geofile);
+	}
     }
 
     if (cellhd.proj == PROJECTION_XY)