Georeferențierea Imaginilor Aeriene (QGIS3)¶
În tutorialul Georeferențierea Foilor Topografice și a Hărților Scanate (QGIS3) s-a discutat despre procesul de bază al georeferențierii în QGIS. Această metodă implică citirea coordonatelor hărții scanate și introducerea lor manuală ca puncte de control. De multe ori, coordonatele nu sunt imprimate pe hartă, sau pe imaginea pe care încercați să o georeferențiați. În acest caz, puteți utiliza ca intrare o altă sursă de date georeferențiate. În acest tutorial, veți învăța cum să folosiți în procesul de georeferențiere sursele de date aflate în domeniul public.
Privire de ansamblu asupra activității¶
We will georeference a high resolution balloon-imagery using reference coordinates from OpenStreetMap.
Alte competențe pe care le veți dobândi¶
Using XYZ Tile Layers as a Basemap in QGIS.
Using Built-in Nominatim Geocoder.
Setting a user-defined No-Data value for a layer.
Obținerea datelor¶
In this tutorial, we will be using kite and balloon imagery collected by The Public Laboratory. They make the georeferenced versions of the images also available, but we will download a non-georeferenced JPG image and go through the process of georeferencing it in QGIS.
Download the JPG image of Washington Square Park, New York. You can right-click the JPG button and choose Save link as….
Pentru comoditate, puteți descărca o copie a datelor, făcând clic pe link-ul următor:
Procedure¶
We will use a basemap from OpenStreetMap to capture the coordinates for georeferencing. QGIS3 comes with built-in support for tile layers. These are commonly known as «XYZ» layers since they are made using individual map tiles for each zoom level (z) on a x,y coordinate grid. You can find the
OpenStreetMap
layer under XYZ Tiles in the Browser Panel. Drag the layer to the main canvas. Once loaded, note the Coordinate Reference System (CRS) for this layer in the bottom-right corder. It is set asEPSG 3857 Pseudo Mercator
. This is important because the coordinates we infer from this layer during georeferencing will be in this CRS.
Notă
See this page for more details on XYZ layers and how to add other basemaps in QGIS.
The image we are georeferencing is for
Washington Square Park, New York
. You can zoom/pan to locate this park on the map. But that is cumbersome and not practical. From QGIS version 3.20 onwards, there is built-in support for the OpenStreetMap based Nominatim Geocoder. Click the search bar in the bottom left of the QGIS window. To use this as a geocoder prefix, the search place with>
. Searching for> Washington Square Park
will pop up a list of addresses to choose from. Click the first address.
The map canvas will be centered to the Square Park. Now let’s start georeferencing. Launch the Georeferencer from
.
Notă
From QGIS versions 3.26 onwards, the Georeferencer can be launched from
.
For georeferencing an aerial image, we have to choose coordinate points from the OpenStreetMap, so let’s first dock the Georeferencer tool into to main QGIS window. Select Configure Georeference from
.
Check Show georeferencer window docked and click OK.
The Georeferencer window will be docked at the bottom of the main QGIS window. Let us load the image file by clicking the Open Raster icon in the Georeferencer window and navigating to the downloaded JPG file. Click Open.
Before adding Ground Control Points (GCP), we need to define the Transformation Settings. Click on the Transformation Settings icon to open the Transformation Settings dialog. Choose the Transformation type as
Polynomial 2
. See QGIS Documentation to learn about different transformation types and their uses. As noted earlier, our base map is inEPSG 3857 Pseudo Mercator
CRS, so set that as the Target CRS. You can leave the Output raster name to the default and chooseLZW
as the Compression. Check the Use 0 for transparency when needed. Check the Save GCP points to store the points as a separate file for future purposes. Make sure the Load in QGIS when done option is checked. Click OK.
Now click on the Add Point button on the toolbar and select an easily identifiable location on the image. Corners, intersections, poles etc., make good control points. Once you click on the image at a control point location, you will see a pop-up asking you to enter map coordinates. Click the button From map canvas.
In the
OpenStreetMap
layer, click on the exact location in the reference layer. The coordinates will be auto-populated from your click on the map canvas. Click Ok.
Notă
Tip: When selecting a GCP on a building, always choose the bottom of the building. Most aerial and satellite imagery have leaning buildings, so picking a point on the rooftop will introduce errors.
Similarly, choose at least 6 points on the image and add their coordinates from the reference layer. Once you have added the minimum number of points required for the transform, you will notice that the GCPs now have non-zero
dX
,dY
, andResidual
error values. If a particular GCP has unusually high error values, that usually means a human error in entering the coordinate values. So you can delete that GCP and capture it again.
Once you are satisfied with the GCPs, click Start georeferencing. This will start the process of warping the image using the GCPs and creating the target raster. Once the process is finished, you will see the layer loaded in QGIS. Close the Georeferencer window.
Now click on the Open layer styling panel icon and Switch to the Transparency tab. Add
255
as the Additional no data value. This will remove the white border around the image. Now you will see your georeferenced image nicely overlaid on the base layer.
Notă
8-bit images have pixel values in the range 0-255. 0 is black and 255 is white.
If you want to give feedback or share your experience with this tutorial, please comment below. (requires GitHub account)