[Gdal-dev] how is yllcorner determined and why
janeen at splash.princeton.edu
Wed Nov 22 11:03:33 EST 2006
I've just tried the gdal_translate utility on a NetCDF file, converting
it to the AAIGrid format. I'm new to the world of GIS and NetCDF also.
So in using the utility, I want to be sure that I understand how all the
data from the .nc file makes it over to the ascii file.
I can't quite figure out how the yllcorner value being reported is
calculated, and why it is transformed the way it is. I've looked at the
code and gotten as far as this line in aaigriddataset.cpp:
adfGeoTransform- nYSize * adfGeoTransform
I can't quite get what the variable adfGeoTransform represents from
the original .nc file. The part of the equation:
nYSize * adfGeoTransform
I understand where those values come from in my sample file (i.e. 180
* 0.994444444444 = 179 ). Given that yllcorner is being reported as
-269, that means that the value for adfGeoTransform would be -90.
But what does that value represent in my original netCDF file given the
If anyone can give me a description of what is going on here, I would
appreciate it. Below is header and gdalinfo.
Here is the gdal header info from my converted .nc file:
Here is (relevant) gdalinfo from my .nc file
Driver: netCDF/Network Common Data Format
Size is 360, 180
Coordinate System is `'
Origin = (0.500000,-89.500000)
Pixel Size = (0.99722222,0.99444444)
Upper Left ( 0.5000000, -89.5000000)
Lower Left ( 0.5000000, 89.5000000)
Upper Right ( 359.500, -89.500)
Lower Right ( 359.500, 89.500)
Center ( 180.0000000, 0.0000000)
More information about the Gdal-dev