Browse Source

r.external.out: write CRS (https://trac.osgeo.org/grass/ticket/3059)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@72098 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 7 years ago
parent
commit
207b3c5f0d
3 changed files with 4 additions and 7 deletions
  1. 1 1
      include/Make/Grass.make
  2. 1 1
      lib/Makefile
  3. 2 5
      lib/raster/gdal.c

+ 1 - 1
include/Make/Grass.make

@@ -213,7 +213,7 @@ NVIZDEPS         = $(OGSFLIB) $(GISLIB) $(OPENGLLIB)
 OGSFDEPS         = $(BITMAPLIB) $(RASTER3DLIB) $(VECTORLIB) $(DBMILIB) $(RASTERLIB) $(GISLIB) $(TIFFLIBPATH) $(TIFFLIB) $(OPENGLLIB) $(OPENGLULIB) $(MATHLIB)
 PNGDRIVERDEPS    = $(DRIVERLIB) $(GISLIB) $(PNGLIB) $(MATHLIB)
 PSDRIVERDEPS     = $(DRIVERLIB) $(GISLIB) $(MATHLIB)
-RASTERDEPS       = $(GISLIB) $(MATHLIB)
+RASTERDEPS       = $(GISLIB) $(GPROJLIB) $(MATHLIB)
 RLIDEPS          = $(RASTERLIB) $(GISLIB) $(MATHLIB)
 ROWIODEPS        = $(GISLIB)
 RTREEDEPS        = $(GISLIB) $(MATHLIB)

+ 1 - 1
lib/Makefile

@@ -6,6 +6,7 @@ include $(MODULE_TOPDIR)/include/Make/Vars.make
 SUBDIRS = \
 	datetime \
 	gis \
+	proj \
 	raster \
 	external \
 	gmath \
@@ -21,7 +22,6 @@ SUBDIRS = \
 	display \
 	db \
 	fonts \
-	proj \
 	vector \
 	imagery \
 	cluster \

+ 2 - 5
lib/raster/gdal.c

@@ -18,6 +18,7 @@
 #include <grass/config.h>
 #include <grass/gis.h>
 #include <grass/raster.h>
+#include <grass/gprojects.h>
 #include <grass/glocale.h>
 
 #include "R.h"
@@ -431,12 +432,8 @@ struct GDAL_link *Rast_create_gdal_link(const char *name,
 	read_gdal_options();
 	st->projinfo = G_get_projinfo();
 	st->projunits = G_get_projunits();
-#if 0
-	/* We cannot use GPJ_grass_to_wkt() here because that would create a
-	   circular dependency between libgis and libgproj */
 	if (st->projinfo && st->projunits)
-	    st->srswkt = GPJ_grass_to_wkt(st->projinfo, st->projunits);
-#endif
+	    st->srswkt = GPJ_grass_to_wkt(st->projinfo, st->projunits, 0, 0);
 	G_initialize_done(&st->initialized);
     }