I've got a 3 arc second digital terrain model represented as a 32-bit GeoTIFF that looks like this:
$ gdal_info gom03_v1_0.tif
Driver: GTiff/GeoTIFF
Files: gom03_v1_0.tif
Size is 10200, 7800
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (-71.499580383300781,45.999583333330001)
Pixel Size = (0.000833333333333,-0.000833333333332)
Metadata:
TIFFTAG_SOFTWARE=nc2geotiff
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( -71.4995804, 45.9995833) ( 71d29'58.49"W, 45d59'58.50"N)
Lower Left ( -71.4995804, 39.4995833) ( 71d29'58.49"W, 39d29'58.50"N)
Upper Right ( -62.9995804, 45.9995833) ( 62d59'58.49"W, 45d59'58.50"N)
Lower Right ( -62.9995804, 39.4995833) ( 62d59'58.49"W, 39d29'58.50"N)
Center ( -67.2495804, 42.7495833) ( 67d14'58.49"W, 42d44'58.50"N)
Band 1 Block=10200x1 Type=Float32, ColorInterp=Gray
Note that the AREA_OR_POINT
attribute is set to AREA
.
When I convert this to ARC ASCII Grid format using GDAL:
gdal_translate gom03_v1_0.tif -of AAIGrid test.asc
and look at the top of the resulting ASCII file, I see:
$ more test.asc
ncols 10200
nrows 7800
xllcorner -71.499580383301
yllcorner 39.499583333335
cellsize 0.000833333333
315.814208984375 314.712371826171875 ...
These xllcorner
,yllcorner
values are the same as the GeoTIFF Lower Left
values above. From the official description of the ESRI ASCII Raster Format, however, either xllcorner
,yllcorner
or xllcenter
,yllcenter
can be specified. Since the GeoTIFF values represented AREA (not POINT), isn't the specification of xllcorner
and yllcorner
incorrect?
Shouldn't the ASCII file in this case really read as below?
$ more test.asc
ncols 10200
nrows 7800
xllcenter -71.499580383301
yllcenter 39.499583333335
cellsize 0.000833333333
315.814208984375 314.712371826171875 ...
Answer
No, the xllcorner
and yllcorner
specification is correct, because the GeoTIFF specifies Corner Coordinates
(not center coordinates).
No comments:
Post a Comment