Geomatica Focus features Smart GeoFill which allows you to copy a specified area of an image layer, make changes to it and then paste the selection to another layer of the image. You can also adjust settings for blend width, color balance, contrast, and brightness of the selected area to enhance or adjust its appearance in the destination layer.
Smart GeoFill can be accessed through the Focus toolbar under the Tools dropdown menu. It has also been integrated into the DEM Editing toolbar accessed through the Layer dropdown menu in Focus.
The following tutorial shows 3 different examples of using the Smart GeoFill toolbar in Focus. These examples include how to copy and paste values from one DEM to another, how to replace values in a single image and how to copy and paste values into all channels of a destination file.
DEM Edit – Replacing Values Using Two Digital Elevation Models
1. Load two DEM’s into Focus by dragging and dropping the file into the Maps tab or by clicking File Open. You will notice in the example below that one of the DEM’s has errors in it due to clouds. This is the area we will be replacing.
NOTE: The projection and pixel size of the digital elevation models do not have to be the same in order for the Smart GeoFill to work.
2. In the Focus menu bar, click on the Tools dropdown menu and select Smart GeoFill…
3. In the Smart GeoFill window that opens, uncheck the Source checkbox.
4. Make sure that the Source layer is set to the DEM you will be copying information from.
5. In the Maps tab right click on New Area > New Vector Layer…
6. Select Whole Polygon and Use Area Georeferencing.
7. Click OK. A new vector layer is created.
8. In the Maps tab select the vector layer. You will notice a pencil icon is now located besides it.
9. In the Focus toolbar, click on the New Shapes tool.
10. Draw a polygon around the area you want to replace. In the example below, a polygon has been drawn around the clouds in the second DEM.
NOTE: A vector layer can have more than one polygon; however, you can use only one selected polygon at a time. The pixels located within each closed polygon are pixels to be copied.
11. In the Smart GeoFill window, click on the Copy button
12. Click the Paste button
13. The DEM information from the DEM without clouds is now copied into the DEM that previously had clouds.
14. Zoom into the edge of the polygon and toggle the polygon layer on to see how well the changes match.
15. Note that you can use the Undo button to undo the last edit
16. You can repeat the steps above for other areas of the DEM.
17. Right click on the destination files on the MAPS tab and save the image once the edits are complete.
Hiding objects – Replacing Values in a single image
1. Load a single image into Focus by dragging and dropping the file into the Maps tab or by clicking File > Open.
2. Select a location on the image that you wish to hide.
3. In the Maps tab right click on New Area > New Vector Layer…
4. Select Whole Polygon and Use Layer Georeferencing.
5. In the Maps tab select the vector layer. You will notice a pencil icon is now located besides it.
6. In the Focus toolbar, click on the New Shapes tool
7. Using the new shapes tool draw a polygon around the area you will be replacing.
8. In the Focus menu bar, click on the Tools dropdown menu and select Smart GeoFill…
9. Using the selection tool highlight the polygon
10. Drag and drop the polygon to the desired location in the image. This section of the image will be used to replace the original image under this polygon. In the example below, an empty field will be used to replace a house.
11. In the Smart GeoFill toolbar ensure the Source and Destination checkboxes are both checked, the blend width is set to 20 and the Color balancing method is set to None.
12. Click on Copy
13. Using the selection tool drag and drop the polygon to the new location, in this case around the house property.
14. Click Paste
15. The house will now be replaced by a field and should blend with its surroundings quite well.
Using Smart GeoFill on all channels of your data
The Smart GeoFill tool can be used on all channels in a file rather than just the three loaded true color channels seen in the Maps tab. The images below are 2 files taken on separate days over Ottawa, Ontario.
1. Create a destination .PIX file. The destination .PIX file will allow us to copy and paste the area without any clouds into the image with clouds and haze.
2. From the Focus toolbar select File > Utility Translate
3. In the Translate (Export) File window select the image containing clouds and haze.
4. Browse to an output folder name and location. Create a new .PIX file.
5. Select all of the channels in the Source Layers list.
6. Click > Add to move the channels to the Destination Layers.
7. Click Translate.
8. Open the .PIX file in Focus. Notice bands 4,3,2 are loaded into the viewer.
9. Click on the Files tab.
10. Load all of the missing bands into the Maps tab. In the Files tab right-click on bands 1,5,6,7 and 8 and select View As Grayscale.
11. All layers are then loaded into the Maps tab.
12. Right click on New Area.
13. Select Whole Polygon.
14. Use Layer Georeferencing.
15. Click OK.
16. Using the new shapes tool draw a polygon over an area with clouds in the image.
17. Click on Tools > Smart GeoFill
18. Select the image without any clouds to be the source layer.
19. Select the .PIX file to be the destination layer.
20. Check mark Paste all to loaded layers.
21. Adjust the Blend width.
22. Click Copy
23. Click Paste
You will notice that the image without the clouds has now been pasted into the destination .PIX layer. Click though each of the loaded layers in the Maps tab to see that the new area in the polygon has been copied to all of the loaded layers.
To save the changes made, simply right click on all of the layers in the maps tab and select Save.