In this example, we consider a hypothetical case of a 10 meter rise in sea level in the San Francisco Bay area, and we find what highways and major roads would be flooded by such a rise. The example uses both raster and vector data sets, combines a number of techniques and uses the Contour, Buffer, Merge, and Clip transform templates.
We visit the earthexplorer.usgs.gov web site to download four SRTM terrain elevation data sets that cover the San Francisco Bay area. Using the Merge Images dialog, we merge them into a single terrain elevation raster image we call BayElevations. See the Example: Merge Images topic for a step by step example of the process.
Next, we visit the Natural Earth web site and we download the North American Roads supplement from their 1:10m Cultural Vectors collection. We open the Roads drawing, zoom into the Bay area, select a reasonable rectangle's worth of roads to cover the Bay area, press Ctrl-I to invert the selection, and then press Delete to delete all other roads except those in the Bay area.
We create a map showing the BayElevations layer and, above it, the roads layer. We have styled the BayElevations layer using a thematic format so regions with a height of 0 or less are in blue, and those regions with a height greater than zero are in various terrain elevation shades of color using the Altitude palette.
The roads layer has been styled using white color line with a slight black halo.
We first will create contour areas that cover all regions with heights from 0 to 10 meters, as computed from the BayElevations raster layer.
With the focus on the open map window, in the Transform pane we choose the BayElevations layer and the Tile field in that layer. We double-click the Contour template to launch it.
In the Contour template, for the Channel we choose channel 0. For the Output type we choose area.
For the Start we enter 0 and for the End we enter 10. For a Step we enter 10. SRTM data uses meters for height values, so entering 10 means ten meters.
We check the Split into shapes and Round start and end to step boxes, although the latter box does not matter since we have specified integer values for the start and end that align with the value of the step chosen.
For the Result destination we choose New Table and we enter Contours10 as the name of the New drawing, with a corresponding name for the name of the New table. We can specify whatever names we like, but it makes sense to specify names that remind us of what they are.
A new Contours10 drawing and table appear in the project pane. We drag and drop the Contours10 drawing into the map window.
The Contours10 drawing actually shows contour areas that cover three ranges: less than 0, between 0 and 10, and greater than 10. We would like to keep only contour areas covering between 0 and 10, so we will select and delete the others.
Opening the Contours10 Table, we can see that each contour area has appropriate values in the ValueMin and ValueMax attribute fields. We want to select and delete all records, that is, all areas, where the ValueMax is NULL, which are those areas that cover regions with heights greater than 10.
With the focus on the Contours10 Table, (or, if we prefer, on the Contours10 layer in the map window), in the Select pane we choose the ValueMax field. We double-click the Null template to launch it.
In the Null template we choose null for the Condition.
Instantly, in both the table and the map window, records/objects that have NULL in their ValueMax attribute field are selected.
Press Edit - Delete to delete those objects.
Next, we will select those area objects which cover regions with heights less than 0.
Looking at the Contours10 Table again, we can see that each such contour area has a ValueMin of NULL and a ValueMax of 0. We can select for either, but since in the prior step we selected for NULL, for a change we will select for a ValueMax of 0.
With the focus on the Contours10 Table, (or, if we prefer, on the Contours10 layer in the map window), in the Select pane we choose the ValueMax field. We double-click the Search template to launch it.
In the Search template we choose equal (=) as the Condition and 0 as the Value.
Instantly, in both the table and the map window, records/objects that have 0 in their ValueMax attribute field are selected.
Press Edit - Delete to delete those objects.
The result is that the Contours10 layer now has only area objects that cover heights from 0 to 10 meters. We have styled the Contours10 layer to use bright blue for a fill color.
Zooming into the Contours10 layer, into a region bordering the Sacramento River delta, we can see the very complex set of areas created as contour areas to cover regions with heights from 0 to 10 meters. That is a small range given the low resolution of SRTM data, so the results are nearly 27,000 area objects, many of which are small.
We could use Clip to clip the roads using the many objects in the Contours10 layer, and that would produce a result of only those roads within the increased water level regions. But that would result in very many small fragments of roads. We can minimize such fragmentation by combining the many small contour areas into a smaller number of contour areas.
One way to do that is to first create buffer areas from the contour areas, setting the buffer size so that there are overlaps between the smaller fragments of contour areas.
Buffers are measured using whatever units of measure are the base unit of measurement for the drawing in use. The Contours10 layer was created from the BayElevations raster image, which in turn was created from SRTM data downloaded from the Earth Explorer site. The SRTM data provided by that site is in Latitude / Longitude projection, which was inherited by the BayElevations raster image and then by the Contours10 drawing in turn.
Latitude / Longitude projection uses degrees as units of measure, which is uncool for buffer use, where we would prefer linear units of measure like meters. We will take a moment to re-project the Contours10 drawing from Latitude / Longitude projection into a meter-based projection.
With the focus on the Contours10 layer in the map, in the Info pane we click the coordinate picker button and then choose Pseudo-Mercator as the projection. We choose Pseudo-Mercator because it is a meter based projection and because it is one of the default Favorites, so we can pick it with a single click.
Pseudo-Mercator is not a particularly super projection for measurements, but it is not terrible for a fundamentally low accuracy project like we are doing. If we wanted to be obsessive about high measurement accuracy, we could reproject the Contours10 layer into an Orthographic projection centered on the Bay area or some other higher accuracy, very local projection. But given the low accuracy of SRTM data and all the other estimation we are doing in our workflow, Pseudo-Mercator is OK.
We now create buffers. With the focus on the map window, in the Transform pane we choose the Contours10 layer and then we choose the Geom field in that layer. We double-click the Buffer template to launch it.
In the Buffer template we enter 200 for the Distance, which means 200 meters, given the default choice of Meter as a unit of measurement.
For a Result destination we choose New table and then we enter Buffers10 as the name of the New drawing, with a corresponding name for the New table.
A new Buffers10 drawing and table appear in the project pane. We drag and drop the Buffers10 drawing into the map window.
We can see that a buffer area extending 200 meters from each area in the Contours10 layer has been created.
Zooming out a bit, we can see how there are many overlaps.
If we merge the buffer areas together, we will have a simpler situation than 27000 separate area objects.
With the focus on the map window, in the Transform pane we choose the Buffers10 layer and the Geom field in that layer. We double-click the Merge template to launch it.
In the Merge template, we choose area (dissolve) as the Merge into option.
For the Result destination we choose New table, and we enter Level_10 as the name of the New drawing, with a corresponding name for the New table.
A new Level_10 drawing and table appear in the Project pane. We drag and drop the Level_10 drawing into the map.
In the illustration above, we have styled the Level_10 drawing to use bright blue fill color, just like the Contours10 drawing used. We are looking at a single, complex, multibranched area object that covers all regions of the former buffer zones, which in turn covered all regions within 200 meters of places that have a height between 0 and 200. As a practical matter, the Level_10 object is a reasonable start at estimating regions which would be flooded if sea level increased by 10 meters (about 33 feet).
To find all roads that would be flooded, we simply Clip the roads layer with the Level_10 layer.
With the focus on the map, in the Transform pane we choose the roads layer and then the Geom field within that layer. We double-click the Clip template to launch it.
In the Clip template, we choose Level_10 as the Clip with layer.
We check the Keep inner part box.
For the Result destination, we choose New table, and we enter Clipped_roads_10 as the name of the New drawing, with a corresponding name for the New table.
The task is complex, so on an average desktop machine Manifold can take ten minutes for the computation. A new drawing called Clipped_roads_10 and table appear in the Project pane. We drag and drop the Clipped_roads_10 drawing into the map.
In the illustration above, the Clipped_roads_10 layer has been styled to use red color for the lines with a black halo.
Zooming in, we can see the complexity of the Clip operation. We do not normally like to use red color for objects, since red is also the color used to indicate selection in Manifold, but in this case it works well.
Zooming out, we can see that very many roads in the Bay area would be flooded if sea level rose by 10 meters (about 33 feet). This illustration also shows some of the limitations of the "quick and dirty" analysis we have done. For example, if sea level rose that would not flood isolated regions such as those in the lower right corner of the display, where isolated islands of the Level_10 zone intersect roads.
Zooming into the region seen above, with the Golden Gate bridge in the upper left running from San Francisco to Marin County, and the Bay Bridge in the upper middle running from San Francisco to Treasure Island and then to Oakland, we can see other limitations of the analysis done.
The analysis did not consider the heights of roads, and the road data we used from Natural Earth had no height attribute, that is, no Z value, for any of the road objects. In every case where a road line falls within the Level_10 flooded zone, it is clipped as though it would be flooded. In reality, many roads are elevated and above the flood zone. For example, the roads approaching the Golden Gate ridge are all elevated far above the land below, well above any 10 meter heights.
But despite such limitations, a quick analysis as we have done shows that increasing sea levels by 33 feet would have a catastrophic impact on the Bay area.
Five Minutes for Contours
Contour a 300MB DEM in Five Seconds
Transform - Tiles: Contour
Transform - Geometry: Buffer
Transform - Geometry: Merge
Transform - Geometry: Clip
Example: Merge Images - A step-by-step example using the Merge Images command showing how to merge dozens of images showing SRTM terrain elevation data into one image, with various tricks for faster workflow as an experienced Manifold user would do the job. After creating the new image we style it with a palette and use hill shading to better show terrain elevation.
Example: Contour Areas and Contour Lines - In this example we use the Contour : area transform template in the Transform pane for images to create a drawing with vector areas showing height contours at desired altitude steps. We color the areas using the attribute fields automatically created by the template. Next, we apply a similar procedure using the Contour : line transform template to create a drawing with vector lines showing height contours at the desired intervals.
SQL Example: Custom Contour Intervals - This example builds on the Example: Contour Areas and Contour Lines topic, using the Edit Query button in the Transform pane for images to learn how to slightly alter the generated SQL to create contour areas or lines on whatever intervals we like, and not just evenly spaced intervals like the default transform creates. It's incredibly easy.
Example: Merge : areas (dissolve) - In this example we combine multiple area objects into a single area object by using the Merge template in the Transform pane, using the areas (dissolve) option. A drawing of French regions shows some regions as more than one area. We would like each region to be one area so the table of regions has one record per region.