[GRASS-dev] [GRASS GIS] #3048: r.out.gdal does not write EPSG code of the projection
GRASS GIS
trac at osgeo.org
Fri May 27 23:46:12 PDT 2016
#3048: r.out.gdal does not write EPSG code of the projection
--------------------------+-------------------------
Reporter: sbl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.5
Component: Raster | Version: svn-trunk
Resolution: | Keywords: r.out.gdal
CPU: Unspecified | Platform: All
--------------------------+-------------------------
Comment (by neteler):
I just tried with the NC dataset on my system, no such issue:
{{{
GRASS 7.0.5svn (nc_spm_08_grass7):~ > r.out.gdal elevation
output=elevation.tif
Checking GDAL data type and nodata value...
100%
Using GDAL data type <Float32>
Exporting raster data to GTiff format...
ERROR 6: SetColorTable() only supported for Byte or UInt16 bands in TIFF
format.
100%
r.out.gdal complete. File <elevation.tif> created.
GRASS 7.0.5svn (nc_spm_08_grass7):~ > gdalinfo elevation.tif
Driver: GTiff/GeoTIFF
Files: elevation.tif
Size is 1500, 1350
Coordinate System is:
PROJCS["Lambert Conformal Conic",
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.2572221010042,
AUTHORITY["EPSG","7019"]],
AUTHORITY["EPSG","6269"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4269"]],
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["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (630000.000000000000000,228500.000000000000000)
Pixel Size = (10.000000000000000,-10.000000000000000)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 630000.000, 228500.000) ( 78d46'27.41"W, 35d48'34.59"N)
Lower Left ( 630000.000, 215000.000) ( 78d46'28.63"W, 35d41'16.54"N)
Upper Right ( 645000.000, 228500.000) ( 78d36'29.89"W, 35d48'33.08"N)
Lower Right ( 645000.000, 215000.000) ( 78d36'32.01"W, 35d41'15.03"N)
Center ( 637500.000, 221750.000) ( 78d41'29.49"W, 35d44'54.91"N)
Band 1 Block=1500x1 Type=Float32, ColorInterp=Gray
Metadata:
COLOR_TABLE_RULES_COUNT=5
COLOR_TABLE_RULE_RGB_0=5.557880e+01 7.572900e+01 0 191 191 0 255 0
COLOR_TABLE_RULE_RGB_1=7.572900e+01 9.587920e+01 0 255 0 255 255 0
COLOR_TABLE_RULE_RGB_2=9.587920e+01 1.160290e+02 255 255 0 255 127 0
COLOR_TABLE_RULE_RGB_3=1.160290e+02 1.361800e+02 255 127 0 191 127 63
COLOR_TABLE_RULE_RGB_4=1.361800e+02 1.563300e+02 191 127 63 200 200
200
Generated_with=GRASS GIS 7.0.5svn
GRASS 7.0.5svn (nc_spm_08_grass7):~ > gdal-config --version
2.0.2
}}}
But doing the same in a UTM32N location, the AUTHORITY is missing:
{{{
GRASS 7.0.5svn (utm32n):~ > g.proj -w
PROJCS["UTM Zone 32, Northern Hemisphere",
GEOGCS["wgs84",
DATUM["WGS_1984",
SPHEROID["WGS_1984",6378137,298.257223563]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["Meter",1]]
# pure GDAL:
epsg_tr.py 32632
PROJCS["WGS 84 / UTM zone 32N",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4326"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AXIS["Easting",EAST],
AXIS["Northing",NORTH],
AUTHORITY["EPSG","32632"]]
}}}
I see differences in the PROJCS, perhaps the text "warping" partially
fails?
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3048#comment:1>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list