Fourni par Blogger.

Georeferencing Satellite Imagery from Google Earth using QGIS

Publié par elharrak mercredi 2 avril 2014

This intermediate level QGIS tutorial explains how you can obtain satellite imagery from Google Earth, export it and georeference the image.  Users will also learn how to use QGIS Gdaltools to effectively clip the raster image once it has been georeferenced as a geotiff.  To complete this tutorial you must have a copy of Google Earth desktop application (and QGIS 1.7.0 Wroclaw) installed on your computer.

google_earth_satellite_image

When making maps in GIS you often want to include a satellite image as the background layer where elements can be added.  This provides the map viewer with the real world top down perspective of the study area, and can be effective when producing cartographic maps.  When using Google Earth to provide satellite imagery, be warned that it will work best for very small areas that are relatively flat.  Google Earth uses a spherical projection and also provides terrain topography which will curve and distort the satellite imagery when viewing larger areas. For this tutorial we will be viewing the University of Victoria, BC in Google Earth, open up Google Earth and typeUniversity of Victoria in the Fly To text box.  Zoom out so that you can view the entire campus.

In order to georeference an image in QGIS you must set a few ground control points which have known coordinates.  For this tutorial will setup 4 basic ground control points (Lower Left, Lower Right, Upper Left and Upper Right corners of the satellite image).

Obtaining the Google Earth Satellite Imagery


In Google Earth click the Add placemark button, for Name enter “LL” which stands for lower left corner, click on the placemark icon button on the right hand side.  In the icon selection window, click the bullseye icon and then click OK.  In the Style, color tab set the Label opacity to 0% to hide the label.  Drag the placemark icon to the lower left hand corner of the University campus, wherever you would like to cutoff your satellite imagery.  Continue with this same process for the UL, LR and UR placemarks.  When you are finished you should have 4 ground control points setup at the corners of theUniversity of Victoria campus.

Now before we export the image, you want to make sure to turn off all the Google Earth features.  Uncheck the icon for the University of Victoria.  I even recommend unchecking borders and labels as well as roads as they tend to clutter up the satellite imagery.  Once all the desired feature check boxes have been turned off, press F11 to use full screen view.  Using the mouse click and pan the map until it is nicely centered on your screen.  In the top left hand corner, select File > Save > Save Image, call the image uvic.jpg.

Press F11 once again to return to the normal view.  At this point in time you should write down all the latitude and longitude values of your ground control points in a spreadsheet (such as Microsoft Excel).  On the left hand side of Google Earth, right click on LL and select properties. 

google_earth_placemark_properties

Copy the Longitude value and paste in into the X column of your spreadsheet document, then copy the Latitude value and paste it into the Y column of your spreadsheet (QGIS Georeferencing requires that locations be entered in X, Y pairs).  Continue this process until you have your X, Y pairs stored for your LL, LR, UL and URplacemarks.

google_earth_satellite_image

QGIS Georeferencer


Once you have all 4 pairs of X, Y coordinates written down, open up QGIS 1.7.0Wroclaw.  Select Plugins > Georeferencer > Georeferencer, then File > Open Raster.  Navigate to the directory that you saved your google earth screenshot and open uvic.jpg.  Now that your satellite imagery is loaded, we must start to georeference the image by adding ground control points.  Click on the zoom in tool and draw a box zoom around the lower left bullseye.  Once you are very close click the Add Point button and click in the exact center of the bullseye.  This will cause a window to popup allowing you to define the X and Y coordinate values for the point.  Using your spreadsheet as a guide, type the values for the lower left bullseye, following the degrees minutes seconds format.  Ex. X: -123 19 13.79 Y: 48 27 28.55.  Note the usage of a negative value to symbolize West and a positive value to symbolize North.  Once you finish adding the coordinate values you should see the record appear in the GCP table below your satellite imagery in the Georeferencer window.  Zoom back out and follow the same process for the remaining 3 ground control points.

Once you have added all 4 ground control points, select Settings > Transformation settings.  We will be keeping the default options of Linear transformation type, Nearest neighbour resampling method and no compression.  Feel free to adjust these values depending on your georeferencing needs.  Click on the output raster icon and navigate to the directory you saved your original satellite imagery, save the image as uvic_geo.tif.  For target SRS we will be using the EPSG: 4326 coordinate system which is the WGS 84 global lat/long projection.  Make sure that the checkbox is enabled to Load in QGIS when done, click OK so save the transformation settings.

We are now ready to start georeferencing, click on the play button in the top left hand corner of the Georeferencer window.  Once the process is complete you will see your satellite imagery load in the main QGIS mapping area.  To save your ground control points from the Georeferencer select File > Save GCP points as and save the GCP’s into a file called uvic.jpg.points.  Once it is saved you can close the Georeferencer window.  You should now have a georeferenced tiff image loaded into your QGIS.  Pan your cursor over different areas of the image and note the coordinate values in the bottom of QGIS changing as you pan.

Clipping the Raster


Now you probably want to get rid of the Google Earth controls and Google logo in the image, so we will have to clip the raster image using Gdaltools (make sure that the Gdaltools plugin is installed and enabled).  Select Raster > Clipper, then drag a box around the extent of the image where you want it to be clipped.  Set the Output file by clicking the Select button, save the output as uvic_clipped.tif.  Leave the rest of the default settings as is, click OK.  When the process is complete, add the new raster layer and disable uvic_geo.tif.  Your uvic_clipped.tif should now be a nice clean satellite image, that you can use as a background layer.

qgis_clipped_geotiff

0 commentaires

Enregistrer un commentaire