[GRASS-dev] [GRASS GIS] #3193: r.out.gdal: add AUTHORITY node to the srs info of the exported raster

GRASS GIS trac at osgeo.org
Fri Jan 26 03:30:12 PST 2018


#3193: r.out.gdal: add AUTHORITY node to the srs info of the exported raster
--------------------------+---------------------------------------
  Reporter:  hellik       |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  major        |  Milestone:  7.4.0
 Component:  Raster       |    Version:  svn-trunk
Resolution:               |   Keywords:  r.out.gdal,r.external.out
       CPU:  All          |   Platform:  All
--------------------------+---------------------------------------

Comment (by hellik):

 Replying to [comment:6 mmetz]:
 > Replying to [comment:5 martinl]:
 > > This functionality was recently implemented in trunk, right? Reference
 is missing here.
 >
 > It was implemented by martinl with r71303

 tested with the example above:

 {{{
 g.proj -p
 -PROJ_INFO-------------------------------------------------
 name       : MGI / Austria GK Central
 datum      : hermannskogel
 ellps      : bessel
 proj       : tmerc
 lat_0      : 0
 lon_0      : 13.33333333333333
 k          : 1
 x_0        : 0
 y_0        : -5000000
 no_defs    : defined
 towgs84    : 577.326,90.129,463.919,5.1366,1.4742,5.2970,2.4232
 -PROJ_EPSG-------------------------------------------------
 epsg       : 31255
 -PROJ_UNITS------------------------------------------------
 unit       : meter
 units      : meters
 meters     : 1
 }}}

 {{{
 r.out.gdal input=test1 at test output=J:\test\test_write_auth.tif
 format=GTiff createopt=COMPRESS=LZW,PREDICTOR=2,TILED=YES
 }}}

 {{{
 gdalinfo test_write_auth.tif
 Driver: GTiff/GeoTIFF
 Files: test_write_auth.tif
 Size is 7201, 7001
 Coordinate System is:
 PROJCS["MGI / Austria GK Central",
     GEOGCS["bessel",
         DATUM["Militar_Geographische_Institute",
             SPHEROID["Bessel_1841",6377397.155,299.1528128],
             TOWGS84[577.326,90.129,463.919,5.1366,1.4742,5.297,2.4232]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433]],
     PROJECTION["Transverse_Mercator"],
     PARAMETER["latitude_of_origin",0],
     PARAMETER["central_meridian",13.33333333333333],
     PARAMETER["scale_factor",1],
     PARAMETER["false_easting",0],
     PARAMETER["false_northing",-5000000],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]]]
 Origin = (-96005.000000000000000,230005.000000000000000)
 Pixel Size = (10.000000000000000,-10.000000000000000)
 Metadata:
   AREA_OR_POINT=Area
   TIFFTAG_SOFTWARE=GRASS GIS 7.5.svn with GDAL 2.2.3
 Image Structure Metadata:
   COMPRESSION=LZW
   INTERLEAVE=BAND
 Corner Coordinates:
 Upper Left  (  -96005.000,  230005.000) ( 12d 3'57.90"E, 47d12' 8.96"N)
 Lower Left  (  -96005.000,  159995.000) ( 12d 4'50.98"E, 46d34'22.11"N)
 Upper Right (  -23995.000,  230005.000) ( 13d 0'59.64"E, 47d12'32.62"N)
 Lower Right (  -23995.000,  159995.000) ( 13d 1'12.91"E, 46d34'45.25"N)
 Center      (  -60000.000,  195000.000) ( 12d32'45.35"E, 46d53'30.77"N)
 }}}

 {{{
 gdal_translate -a_srs EPSG:31255 test_write_auth.tif
 test_write_auth_assign_by_gdal.tif
 }}}

 {{{
 Driver: GTiff/GeoTIFF
 Files: test_write_auth_assign_by_gdal.tif
 Size is 7201, 7001
 Coordinate System is:
 PROJCS["MGI / Austria GK Central",
     GEOGCS["MGI",
         DATUM["Militar_Geographische_Institute",
             SPHEROID["Bessel 1841",6377397.155,299.1528128,
                 AUTHORITY["EPSG","7004"]],
             TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],
             AUTHORITY["EPSG","6312"]],
         PRIMEM["Greenwich",0,
             AUTHORITY["EPSG","8901"]],
         UNIT["degree",0.0174532925199433,
             AUTHORITY["EPSG","9122"]],
         AUTHORITY["EPSG","4312"]],
     PROJECTION["Transverse_Mercator"],
     PARAMETER["latitude_of_origin",0],
     PARAMETER["central_meridian",13.33333333333333],
     PARAMETER["scale_factor",1],
     PARAMETER["false_easting",0],
     PARAMETER["false_northing",-5000000],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]],
     AUTHORITY["EPSG","31255"]] <==
 Origin = (-96005.000000000000000,230005.000000000000000)
 Pixel Size = (10.000000000000000,-10.000000000000000)
 Metadata:
   AREA_OR_POINT=Area
   TIFFTAG_SOFTWARE=GRASS GIS 7.5.svn with GDAL 2.2.3
 Image Structure Metadata:
   INTERLEAVE=BAND
 Corner Coordinates:
 Upper Left  (  -96005.000,  230005.000) ( 12d 3'57.90"E, 47d12' 8.96"N)
 Lower Left  (  -96005.000,  159995.000) ( 12d 4'50.98"E, 46d34'22.11"N)
 Upper Right (  -23995.000,  230005.000) ( 13d 0'59.64"E, 47d12'32.62"N)
 Lower Right (  -23995.000,  159995.000) ( 13d 1'12.91"E, 46d34'45.25"N)
 Center      (  -60000.000,  195000.000) ( 12d32'45.35"E, 46d53'30.77"N)
 }}}

 {{{
 System Info
 GRASS version: 7.5.svn
 GRASS SVN revision: r72120
 Build date: 2018-01-24
 Build platform: i386-w64-mingw32
 GDAL: 2.2.3
 PROJ.4: 4.9.3
 GEOS: 3.5.0
 SQLite: 3.17.0
 Python: 2.7.4
 wxPython: 2.8.12.1
 Platform: Windows-Vista-6.0.6002-SP2 (OSGeo4W)
 }}}

 comparing the gdalinfo of GRASS exported and GDAL assigned tif,

 {{{
 AUTHORITY["EPSG","31255"]
 }}}

 seems to be still missing

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



More information about the grass-dev mailing list