[GRASS-dev] [GRASS GIS] #3059: r.external.out does not write CRS information

GRASS GIS trac at osgeo.org
Fri Jun 10 08:25:35 PDT 2016


#3059: r.external.out does not write CRS information
--------------------------+----------------------------
  Reporter:  sbl          |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  major        |  Milestone:  7.0.5
 Component:  Raster       |    Version:  7.0.4
Resolution:               |   Keywords:  r.external.out
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+----------------------------
Changes (by neteler):

 * priority:  normal => major
 * component:  Default => Raster


Comment:

 I can reproduce it with the NC location:

 {{{
 # NC Location
 g.region raster=elevation -p

 g.proj -w
 PROJCS["Lambert Conformal Conic",
     GEOGCS["grs80",
         DATUM["North_American_Datum_1983",
 SPHEROID["Geodetic_Reference_System_1980",6378137,298.257222101]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433]],
     PROJECTION["Lambert_Conformal_Conic_2SP"],
     PARAMETER["standard_parallel_1",36.16666666666666],
     PARAMETER["standard_parallel_2",34.33333333333334],
     PARAMETER["latitude_of_origin",33.75],
     PARAMETER["central_meridian",-79],
     PARAMETER["false_easting",609601.22],
     PARAMETER["false_northing",0],
     UNIT["Meter",1]]

 mkdir -p $HOME/tmp
 r.external.out directory=$HOME/tmp extension=.tif format=GTiff
 options="COMPRESS=LZW,PREDICTOR=2"

 r.mapcalc expression="test = 1"

 gdalinfo $HOME/tmp/test.tif
 Driver: GTiff/GeoTIFF
 Files: test.tif
 Size is 1500, 1350
 Coordinate System is `'
 Origin = (630000.000000000000000,228500.000000000000000)
 Pixel Size = (10.000000000000000,-10.000000000000000)
 Image Structure Metadata:
   COMPRESSION=LZW
   INTERLEAVE=BAND
 Corner Coordinates:
 ...
 }}}

 Apparently some GDAL part is not initialized completely. I see in

 https://trac.osgeo.org/grass/browser/grass/trunk/lib/raster/gdal.c#L431

 that the use of GPJ_grass_to_wkt() is commented. Maybe that part needs to
 be updated/completed?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3059#comment:2>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list