Driver: AIG/Arc/Info Binary Grid Size is 504, 361 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AXIS["Lat",NORTH], AXIS["Long",EAST], AUTHORITY["EPSG","4326"]] Origin = (-75.628333,40.095833) Pixel Size = (0.00083333,-0.00083333) Corner Coordinates: Upper Left ( -75.6283333, 40.0958333) ( 75d37'42.00"W, 40d 5'45.00"N) Lower Left ( -75.6283333, 39.7950000) ( 75d37'42.00"W, 39d47'42.00"N) Upper Right ( -75.2083333, 40.0958333) ( 75d12'30.00"W, 40d 5'45.00"N) Lower Right ( -75.2083333, 39.7950000) ( 75d12'30.00"W, 39d47'42.00"N) Center ( -75.4183333, 39.9454167) ( 75d25'6.00"W, 39d56'43.50"N) Band 1 Block=504x4 Type=Float32, ColorInterp=Undefined Min=-61.000 Max=227.000 NoData Value=-3.40282e+38A couple of things to point out... Size is given in columns, rows, so this is a 504 columns x 361 rows data set. The Driver field tells you what kind of raster format this is. Arc/Info Binary grid is pretty common. seamless.usgs.gov gives you only these file formats. The Coordinate system data you can ignore temporarily. Eventually, we will need to project or transform some data sets from one projection to another, and this coordinate system info is useful for that. Note however that UNIT is set to degree meaning this data is unprojected and pixel coordinates represent lat/long coordinates. The Pixel Size is 0.0008333 degrees or 3 arc-seconds. This roughly corresponds to 90 meter pixels. The corner coordinates of the data are also given in projected and lat/long coordinates. Since the projection for this data is lat/long, the numbers are the same. The min and max elevations are also given. This elevation is stated in meters. How do I know? Because the USGS site tells me. It really should be included in the data file somewhere, perhaps as an additional readme, but it isn't.
A word about nodata:
Raster formats are rectangular arrays of data, but sometimes we don't have a measured value for every cell in the array, or we have irregularly shaped data that doesn't fill up a rectangular bounding box. In these cases, we can write a special NoData value for that pixel. Some data formats will report the nodata value through gdalinfo, while some do not. Conceptually if you are working with data that has nodata values, you should ignore them. They are not real data, so don't try to do things like average a real data value with a no data value. You can pollute you real data this way. When designing your own tools, you should decide if nodata will be a problem, and if you need to know the nodata value, your programs should have a way to ask the user what the nodata value is if you can not infer it directly from your data.
Note the dark spot slightly southwest of the center of the image. Can you find this feature in google maps? Can you find Springton Lake in the image above? At 90 meter resolution and a greyscale png, it will be hard to find any discernible Swarthmore feature besides Crum creek in this image.
A more useful format for you as a programmer, might be to convert the data to an ASCII grid. Gdal_translate can do that too.
gdal_translate -ot Float32 -of AAIGrid delco/delco delco.txt
This generates and ASCII file that you can open in an editor (for small files like this) or write a simple driver to read in ASCII input. The file has a six line header as follows:
head -6 delco.txt
ncols 504 nrows 361 xllcorner -75.628333345281 yllcorner 39.795000003346 cellsize 0.000833333333 NODATA_value -3.4028234663852885981e+38Followed by the pixel values in row major order from left to right.
gdalwarp -tps -rcs -t_srs "+proj=utm +zone=18" delco/delco delco_utm.gtiff
By default, gdalwarp converts the data to a GeoTIFF output format. You can convert the output to a PNG or ASCII grid using gdal_translate
gdal_translate -ot Byte -of PNG delco_utm.gtiff delco_utm.png
Note that the data is more square because degrees of longitude up at 40 North are noticeably smaller in raw meters than a degree of longitude. You can measure distances on the UTM map using Euclidean distance, but on a lat/long map, you need to use spherical distance formulas. Yecch, math is hard.
I said the pixel size in the unprojected data was roughly 90 meters.
With the projected data, you can find out the real pixel size in meters
using gdalinfo. What is it?