SRTM_Mask
Back to Tutorials | Back to SRTM Image Processing | Next Page
Results of the Threshold procedure of the previous page.
Zoom in using the "Navigation" floating tool window shown in the image below in the lower right corner and highlighted in red.
There is a slider for zoom control, you can also press "CTRL +" for zoom in and "CTRL -" for zoom out. See image "Figure a" for an estimate of how much further to zoom in.
Click on the image for a larger view.
Select the "Pencil Tool" from the floating toolbar.
If it only shows a "Paint Brush" then click and hold the button down. You will get a selector option to choose between the "Pencil Tool" and the "Paint Brush" tool.
Set the primary color to pure "White" by clicking in the top pallet selector. See section on changing the colors for more info.

Note: clicking on the color box in the back will let you set the background color, not the foreground color. You can also swap them by clicking on the little two-headed arrows between them in the upper right of that portion of the floating toolbar.
Figure a. Click on the image for a larger view.
After zooming in, you can pan by clicking and dragging in the "Navigator" floating tool window shown in the image above, lower right corner.
You can also navigate the image after zoomed in, by clicking and dragging the scroll-bars to the right and bottom of the image pane. The image will scroll like a web-page. When you are zoomed in, I find this to be slightly more effective method of image navigation.
Again we are isolating the boarder between land and water. You can see the boarder clearly just by looking at it. But the noise makes it not well defined.
We need to change that. by painting pure white along that boarder. You selected the "Pencil Tool" because it gives a perfectly sharp edge of color. The "Paint Brush" does an anti-aliasing procedure (You can see that if you look closely at the red paint I have used to draw on the image, look carefully at the edges of my stroke.) on the adjacent pixels causing them to transition more smoothly from pure white to black with some pixels in between being grey. We can't have that here. It must be crystal sharp at the per pixel level.
Below you can see in the highlighted region that I have started to isolate that boarder by painting white along it.
This is an extremely delicate procedure and you must be very careful of the pixels near this boarder. If you cut into them, you could be cutting into mountains.
Since we are building a mask in this step of the tutorial, that mask will later be draped over our data to mask out the noise from the water. Since you are defining the boarder of that mask right now, if you slip or tweak the pixels to far inland it will cause the elevation data to be marked, or destroyed later when you apply this mask over top of that elevation data.
Click on the image for a larger view.
Below you can see this procedure continues along the coast line.
Click on the image for a larger view.
You will have to be exceptionally careful with bays inlets and peninsulas.
Note: To much black in an area will mean cleaning up more noise later. To much white into the land areas and you could destroy the elevation data. This is especially true for areas with costal cliffs, bluffs, or sharply rising mountain areas adjacent to the shoreline.
Being aware of where those cliffs, bluffs, and mountain areas are right at the shore line can play a big role as you will see later. Because it has a lesser effect for low lying areas that have very little or no measurable elevation. The difference between no elevation and measurable elevation is a fine line to cross that isn't always apparent, again as you will see later when the mask is done. So again knowing where those areas of elevation are can play a key role, and the types of elevation I'm talking about are not rocky outcrops that are only 10 ft above the beach. By measurable I mean more than 50-80 feet above sea level. You will see and gain a greater level of understanding when you reach the next step in this tutorial.
For this reason I'm going to recommend that you run through this tutorial twice. You will get a greater understanding of the relationship between this mask image, and the elevation data, as well, and more importantly of the relationship between costal areas that are sharply rising elevation, VS low lying areas that remain at sea level and rise slowly over larger distances.
Again, do your best to clean up the bays and inlets as seen below. Remember there is an intimate relationship between the ocean (white) areas and the land (black) areas.
For these reasons it is better to error on the side of the land, then the ocean. In other words it's better to black out a bay, or extend the shoreline outwards than inwards. The draw back of making this mistake is more cleanup work when you apply the mask to the elevation data.
This is because it's better to be forced to clean up the noise a second time, then it is to remove or corrupt valuable elevation data.
As you work to clean up smaller and smaller areas, you will need to adjust the size of your brush.
Click on the little down arrow to the left of the "Brush" button with the icon and radius number. You'll get a floating popup selector for adjusting the size of your brush. Drag the "Master Diameter" slider to the left, or input a new radius into the input box above the slider.
The smaller radius will give you greater accuracy in removing or cleaning up smaller blocks of pixels.
Click on the image for a larger view.
Once you have cleaned up the bays, you'll need to finish them off by cleaning up the floating pixels of white. It's best for you to just make a judgment call about whither to extend the ocean inland and risk loosing more elevation data or black out those inlets and take the risk of cleaning them up again after the mask is applied.
Again each map is different and as you do more maps you will also gain a better understanding of the above decisions required, and the risks involved in making a wrong decision. You will also get a better feel for how to make such decisions in different situations with different imagery.
You will need to resize your brush again to work with even smaller bays/inlets.
Click on the image for a larger view.
Continue to work your way into the San-Francisco bay. Do the best you can to identify the boundary between ocean and land.
When you are done encircling a region switch to a larger brush and paint white over the noise in the bay.
Click on the image for a larger view.
I've found it really helps to do the whole process in phases.
Phase 1: define the boundary on the side of the ocean. See image.
Click on the image for a larger view.
Phase 2: widen that boundary defined in Phase 1, and clean up additional noise around the perimeter.
Click on the image for a larger view.
Phase 3: Paint over the junk in the middle
Click on the image for a larger view.
See now the water area is perfectly well defined.
Click on the image for a larger view.
Phase 4: Go back over the boundary with a smaller brush and paint black over the floating pixels for the land portion of our mask image.
Click on the image for a larger view.
See now this region is done. Move on to the next region.
Click on the image for a larger view.
The boundary between land and water is not always easy to spot at all, in fact some times it can be down right impossible.
Remember what I said earlier that there are also regions where that boundary does not need to be as well defined. Because the area around the ground that is rising above the sea level does so slowly over a larger space, that it is not a completely measurable effect. Below you can see one of those areas, and as we move further east it will become more apparent. In such areas it matters less, how accurately you represent that boundary. So it actually becomes easier to simply give it your best guess. Again it's better to error on the side of land then ocean, since the worst is you get to go back over it again and clean it up a second time. Believe it or not, I've made those mistakes before. That's how I learned this.
You can see in the following image that I'm just giving it my best guess.
Click on the image for a larger view.
Now it's time to clear out those areas in the middle and extend that border farther inland to the east.
Click on the image for a larger view.
Here you can see better what I have done.
Click on the image for a larger view.
Go back over it with a smaller brush swap your primary and secondary colors from black to white, and clean up that noise that is inland from the shore you've defined.
Click on the image for a larger view.
Everything is done, except the deep ocean. There is a special procedure we have for that continue to the next page.
Click on the image for a larger view.
Back to Tutorials | Back to SRTM Image Processing | Next Page