Tutorial: Introduction to GDAL
完成条件
2. Retrieving information from GIS data
2.1. Retrieve information from raster data
One of the easiest and most useful commands in GDAL is gdalinfo. When given an image as an argument, it retrieves and prints all relevant information that is known about the file. This is especially useful if the image contains additional tag data, as is the case with TIF files. When working with satellite imagery, this is an extremely useful way of keeping track of the images location in long/lat coordinates as well as the image projection.
1. Open the prompt where you have GDAL configured. If you have QGIS installed you can use the OSGeo4W Shell
2. With the command prompt go to the directory where you have saved the exercise data, e.g. Z:\gdal_exercises
gdalinfo srtm_37_02.tif <ENTER>
4. Try to answer these questions, based on the info printed on the screen:
- What is the size of the image?
- What is the coordinate system?
- What is the EPSG code?
- What are the minimum and maximum values?
More info on using the gdalinfo command can be found at https://gdal.org/programs/gdalinfo.html
EPSG codes are used to define projections. More info in the video below.