Friday, November 25, 2016

Map layout

Exercise 11
TASK: Prepare a map of the watershed ( from exercise 10)  which include 
The streams of the watershed 
Towns 
Classification of the watershed altitude based on the traditional Agro-ecological classification  (Berha, Kolla, Woynadega , dega and Wurch; if there is ) 
Include a graph of slope classification in degree (0-2, 2-5, 5-10, >10)
A photograph of a gauge in the out let 
10. CREATING A MAP LAYOUT IN ARCGIS
There are two primary map display panels in ArcMap: the data view and the layout view. In data view you can display and work with geographic information as a series of map layers. A single map document can contain several data frames, which are separate arrangements of map layers. Only one data frame can be displayed in data view at a time, but more than one data frame can be viewed in layout view.
When you're preparing your map's layout, you'll want to work with it in layout view. In layout
view, you will see a virtual page on which you can place and arrange map elements such as
maps [the data frame you see in the data view], a scale bar, a legend and a map title. You can
do almost the same things in Layout view that you can in Data view, plus design your map.

Changing layer names in the Table of Contents: 
For map layers to display with meaningful labels in your map layout, change the layer name in the Table of Contents.
1. In the Table of Contents, double click on the name of the layer that you want to
change.
2. In the Properties Window click the General tab.
3. Change the layer name to your desired name and click Close.
Opening the Layout View and arranging the data frame:
1. In the View menu click Layout View.
2. The layout displays the data frame. It is a selected element – you can tell by the hatched blue outline and the blue square anchors.
3. Use the anchors to click and drag the data frame to a smaller or larger size.
4. With your mouse in the centre of the map, click and drag to position the data
frame on the page.
Setting up a map layout
1. Before you start a map layout, it is important to think through 
a. What you want to do and how you want your map to look? 
b. What do you want to show? How large do you want your final map to be?
c. Portrait or landscape orientation? 
d. Do you need space for additional text or graphics? 
e. This tutorial example will assume a paper size (8x11 inch) map but often you are making map for publications where they must be smaller, or for Powerpoint where they need to be a certain size (e.g., 7.5x10 inches), or for posters where they may be much larger than 8x11.
2. In ArcMap, choose View   Layout View from the main menu.
3. The view changes to show your data frame on a page layout and a new toolbar appears – the Layout toolbar
4. The first thing you should do is to set up your Page properties. Choose File – Page and
Print Setup
5. In the Page Setup dialog box, make sure that the page size is set to Letter. Also check
either Portrait or Landscape (which would be better for the map you want to create?
The example map is in Landscape orientation). Press OK to return to the map. 
Moving around in the page and data frame 
It is very important to understand the difference between the Layout toolbar and the regular
(data frame) Tools toolbar. They share similar tools (zoom in and out, pan) but the layout tools
work on the layout as if you were zooming in and out of the paper itself, while the same tools on the Tools toolbar work on the data inside the data frame (e.g., zoom into Davis Square). You
will get confused occasionally, but once you get the hang of the two toolbars, you will be off and running. For now experiment with both to see what happens. 

Adding Other Map Elements
Adding a North Arrow
1. Click the Insert menu > North Arrow.
2. Select a north arrow and click OK. The north arrow will be added to a random location on the map, usually somewhere in the centre.
3. Click and drag the north arrow into place on your map. Resize the north arrow by
clicking and dragging a selection handle.
Adding a Scale Bar
1. Click the Insert menu > Scale Bar.
2. Select a scale bar.
3. Click Properties to modify the scale bar’s properties.
4. Click the Scale and Units tab.
5. Click the arrow buttons to set the number of divisions.
6. Click the arrow buttons to set the number of subdivisions.
7. Click the When resizing drop-down arrow and click how you want the scale bar to respond when the map scale changes:
• Adjust width – the width of the scale bar will vary with the map scale. The division value and number of divisions remain constant.
• Adjust division value – the division value will vary with the map scale. The number of divisions and the width of the scale bar remain constant.
• Adjust number of divisions – the number of divisions will vary with the map scale.
8. Choose the units for the scale bar.
9. Click Symbol and choose a test style for the scale bar labels.
10. Click OK and OK again to close the dialog box.
11. Click and drag the scale bar into place on your map.

Adding a Legend

1. Click the Insert menu > Legend. The Legend wizard appears.
2. By default, all the layers on the map will appear as legend items in the legend. To remove a legend item, select it, and click the left arrow button.
3. Use the Up and Down arrow buttons to order the legend items.
4. Click Next.
5. Type a title for the legend.
6. Set the text color, font, and size as desired, and click Next.
7. Select a border, background and/or drop shadow as desired by clicking their respective drop-down boxes.
8. Click Next.
9. Select a legend item in the list to modify the symbol patch.
10. Set the patch properties as desired and click Next.
11. Set the spacing between legend elements by typing a value in the appropriate box.
12. Click Finish.
13. Click and drag the legend into place on your map.
Add graticules and grids 
1. Select the layer 
2. Right click   Properties
3. Got to coordinate tab and select the appropriate coordinate system 
4. Go to  grid tab  New grid  measured grids  and use 500 meter interval for both easting and northing  next ………………. oK ………Apply 

Changing the Graticule 
Intervals Since you zoomed into Cuba, the intervals of the template graticule have become a little too wide to be truly useful for describing the locations of features in the map. Here you will reduce the interval size to better fit the extent chosen. 
1. In the Table of Contents, right-click on the “Central America & Caribbean” Data Frame and select “Properties.” Select the Grids Tab. 
2. Click on the Properties Button. Select the Intervals Tab. 
3. Replace the X & Y Axis Interval values 
4. Click OK twice. 
The graticule now has an interval that is more useful for describing the position of features in the map layout. 
Adding a Title to a Map
1. Click the Insert menu and click Title.
2. A box bearing the name of the map document (i.e. _____.mxd) will appear on your map layout, enclosed in a blue box. Double-click the box to open the Properties dialog box.
3. Delete the existing text in the large Text box and type in the desired title. Format the text as desired using the settings in the dialog box. Click OK.
4. Click and drag the title into place on your map.
5. The title can also be formatted using the Draw toolbar.
Create Graph Wizard
1. Calculate slope of the watershed  in degree 
2. Classify slope  as (0-2, 2-5, 5-10, >10)
3. Calculate area of each class 
4. Export the result in excel and save as “slope of watershed” 
5. In layout view  Insert   object (picture)
6. Microsoft graph chart  
7. copy Elements  from excel of  “slope of watershed”  edit the graph and close 
 Exporting Maps
File > Export Map
If you just need paper copies of your maps, you will probably have the best results printing them
from ArcGIS.  But if you need to insert maps into PowerPoint or word processing files, will need to
export your maps. You can export a map from ArcMap when you are in Data View or Layout View.
However, if you want your exported map to include titles, legends, scale bars, north arrows, and
anything else you added to the layout, you need to export from Layout View. There are many options for export formats in the “Save as type” drop down menu.
.PDF — The .pdf format allows you to open the map directly (without inserting it into PowerPoint or MS Word) as long as you have Acrobat Reader. This is probably the best option if you need to send someone a map or post a map on the Internet.
.JPG — The .jpg format will compromise the quality of your image, so be sure to click on the “options” button when you export and increase the resolution to at least 200 dpi. The .jpg format is good because it stores your map in a fairly small file and, unlike some other file types, your map will not be compromised if you open it on a computer that does not have ArcGIS installed.
.TIF and .EPS — The .tif and .eps formats work well if you are going to open your maps in a graphics software package, but they result in larger files.
Screen Capture — If all else fails, you can take a screen capture (print screen, or alt + print screen) and crop the image, but this will not result in a presentationȬquality map.
Working on multiple layers 
Adding layers 
1. In Layout View, choose Insert - Data Frame from the main menu – a new data frame box
appears in your layout. You’ll see the New Data Frame listed in the table of contents:
2. Activate the data layer 
3. Add files 
Creating Extent Rectangles (Inset Maps)
1. Activate a data layer which exceeds the other data layer in its spatial extent 
2. From the Table of Contents, right click the (receiving) data frame > Properties > “Extent Rectangles” tab

Thursday, November 24, 2016

Delineating the Watershed of your Stream Gage


Delineating the Watershed of your Stream Gage
1.      Create a folder mywatershedproject under D/drive and other folder under the created folder with the name processeddata
2.      Determine the out let point of your watershed (you can use google earth, GPS, or topomap) for this exercise use Google earth select a point  behind oda ya’a campus  as an outlet of Legedara river ( just After join with River Waleme) lat 60 2636’’  and long 380 16 48’’ save the point as  Station_01064500
3.      Initialize the necessary extension
·         Spatial Analyst Extension (Tools – Extensions – checkmark Spatial Analyst)
4.      Add dem data  ASTGTM_dem1.img
5.      Make sure your DEM  has a projected coordinate system :
·         Before proceeding with watershed delineation or any other kind of hydrological analysis, your data sets need to be in a projected coordinate system in which the horizontal units of the xy coordinates are the same as the vertical elevation units of your DEM
6.      Mask the DEM with the extent of your interest 
·         You can use  create feature / from previous exercises/ for this exercise use drawing tool
You can convert graphics you draw on your map into shapefiles or geodatabase feature classes. The Convert Graphics To Features command, which is available from the Drawing menu on the Draw toolbar or by right-clicking a data frame in the table of contents, supports all the graphic types you can draw with the tools in the graphics palette on the Draw toolbar, including circles, curved lines, and freehand lines. You can also convert graphic text into annotation feature classes.
Steps:
a)      Make sure you are in data view.
b)      Draw a graphic (rectangular) which circumscribe your watershed
c)       In the table of contents, right-click the data frame containing the graphics you want to convert to features and click Convert Graphics To Features.
a.       You can also click the Drawing menu on the Draw toolbar and click Convert Graphics To Features.
d)     Click the Convert drop-down arrow and click the type of graphic to convert.
e)      By default, only the selected graphics will be converted. Uncheck Selected graphics only if you want to convert all graphics.
f)       Click the option for the output coordinate system you want to use.
g)      If you want the graphics to be deleted once you've converted them to features, check Automatically delete graphics after conversion.
h)      Click the Browse button and navigate to a location to save the exported data mywatershedproject /processeddata.
i)        Type the name for the output data source as (Graphic).
j)        Click the Save as type drop-down arrow and choose the output type. The output can be either a shapefile or a geodatabase feature class (annotation can only be stored in a geodatabase).
k)      Click Save.
l)        Click OK.

7.      Extract by mask
1.       From Arctoolbox Click the plus sign in front of the Spatial Analyst Tools
2.        Click the plus sign in front of Extraction
3.        Double click on extract by mask function
4.        Select raster input map (ASTGTM_dem1.img)
5.        Select raster or feature mask data (Graphic)
6.        Change the name of the folder and file name of your output data
7.        Click ok
8.      Now use the hydrology tools
   
Conceptual overview of watershed delineation:
Flow Direction: One of the keys to deriving hydrologic characteristics of a surface is the ability to determine the direction of flow from every cell in the raster.  There are eight valid output directions relating to the eight adjacent cells into which flow could travel. This approach is commonly referred to as an eight-direction (D8) flow model 
                                                                                                      
Calculating the direction of flow
The direction of flow is determined by the direction of steepest descent, or maximum drop, from each cell. This is calculated as follows:
 maximum_drop = change_in_z-value / distance * 100
When a direction of steepest descent is found, the output cell is coded with the value representing that direction.
If all neighbors are higher than the processing cell, it will be considered noise, be filled to the lowest value of its neighbors, and have a flow direction toward this cell.
However, if a one-cell sink is next to the physical edge of the raster or has at least one NoData cell as a neighbor, it is not filled due to insufficient neighbor information. To be considered a true one-cell sink, all neighbor information must be present.
If two cells flow to each other, they are sinks and have an undefined flow direction. 
Cells that are sinks can be identified using the Sink tool. To obtain an accurate representation of flow direction across a surface, the sinks should be filled before using a flow direction raster.
The output of the Flow Direction tool is an integer raster whose values range from 1 to 255. The values for each direction from the center are:  
  • If a cell is lower than its eight neighbors, that cell is given the value of its lowest neighbor, and flow is defined toward this cell. If multiple neighbors have the lowest value, the cell is still given this value, but flow is defined with one of the two methods explained below. This is used to filter out one-cell sinks, which are considered noise.
  • If a cell has the same change in z-value in multiple directions and that cell is part of a sink, the flow direction is referred to as undefined. In such cases, the value for that cell in the output flow direction raster will be the sum of those directions. For example, if the change in z-value is the same both to the right (flow direction = 1) and down (flow direction = 4), the flow direction for that cell is 1 + 4 = 5. Cells with undefined flow direction can be flagged as sinks using the Sink tool.
  • If a cell has the same change in z-value in multiple directions and is not part of a sink, the flow direction is assigned with a lookup table defining the most likely direction. See Greenlee (1987).
  • The output drop raster is calculated as the difference in z-value divided by the path length between the cell centers, expressed in percentages. For adjacent cells, this is analogous to the percent slope between cells. Across a flat area, the distance becomes the distance to the nearest cell of lower elevation. The result is a map of percent rise in the path of steepest descent from each cell.
When calculating the drop raster in flat areas, the distance to diagonally adjacent cells (1.414 * cell size) is approximated by 1.5 * cell size to increase the processing speed by using integer calculations.
  • When using the NORMAL option, a cell at the edge of the surface raster will flow toward the inner cell with the steepest drop in z-value. If the drop is less than or equal to zero, the cell will flow out of the surface raster.
This tool takes a surface as input and outputs a raster showing the direction of flow out of each cell.
If the Output drop raster option is chosen, an output raster is created showing a ratio of the maximum change in elevation from each cell along the direction of flow to the path length between centers of cells and is expressed in percentages.
If the Force all edge cells to flow outward option is chosen, all cells at the edge of the surface raster will flow outward from the surface raster.
9.      Sink (Optional )
 Sink: This step uses your Flow Direction grid to identify sinks in your DEM. These are areas
surrounded by higher areas, so that there is no external drainage. Sometimes sinks are real, but
often DEMs have erroneous sinks. Regardless of whether they are real or not, for the watershed delineation process to work, we need a “depressionless DEM,” i.e., a DEM with no sinks. The
Output data set is Sink_FlowDirxx.
10.  Fill  ( as initial work or if there is sink)
 Fill: This step will fill the sinks of your DEM (DemClip). Note that doing this correctly requires
care and an iterative process which we don’t detail in this tutorial. Instead, we will do a basic Fill
command. The result of this step will be a depressionless DEM (Fill_Demclip1) which will in turn be
the basis of the rest of the process
11.   Flow Direction – for this initial process, set the Input Surface Raster to Fill_DemClip1. For
Output flow direction raster, navigate to your ProcessedData folder, and call the new
raster FlowDir_DemC1, then press OK, as show below:
12.   Flow Accumulation (may take a long time)

13.  Snap Pour Point
A)    Add a pour point  
       I.            can you do that from the previous exercises)
    II.            Before proceeding, you need to measure how far your stream gage is from an area of high accumulation on your Flow Accumulation grid. It is likely that your stream gage is on top of or near an area shaded white, indicating high flow accumulation.
B)    Activate the Snap Pour Point tool in ArcToolbox with specifications similar to
what you see below, using the distance you measured plus a little extra as your
Snap Distance. Make sure to call the output raster, SnapPour:
C)     Make sure the result is a single cell directly on top of a high accumulation area (colored white) and near your stream gage, as you see here:
14.   Watershed:
Your results should look something like this:
ü  If you think your result is correct, you can convert this raster data set to a GIS vector polygon (shapefile) so that you can have it permanently for mapping. To do this:
1. in ArcToolbox choose Conversion Tools – From Raster – Raster to Polygon
ü 
ü  Fill in the dialog box similar to what you see below (use your Watersh_Flow data set):
ü  For mapping purposes, you may make the new polygon hollow (no fill) with a thicker outline using the Symbology properties
15.  Flow lines for your stream network
This process requires your Flow Accumulation raster. The basic conceptual process is to reclassify all cells that meet a certain accumulated flow threshhold to be 1, and all other cells to be no data. To do this you can apply a conditional statement to your Flow Accumulation raster in which all cells with a value greater than a threshold number (e.g., 100) are reclassified to be 1, and all other cells
receive a “no data” value.
A.    Go to Spatial Analyst Tools – Map Algebra – Raster Calculator.
B.      Use the Raster Calculator to create a conditional statement
Con("FlowAcc_Flow1" > 1500, 1)
- Name the new data set that will be produced streamnet. Note: Pay attention to spaces when writing your expression.
C.     Zoom into it to see what it looks like – it is a detailed drainage network for the area covered by your Flow Accumulation grid.
o   Note that you can use a different threshold value. The value we used, 1500, is arbitrary. If you re-do this step with a different threshold value, you must change the output raster name – e.g., streamnet2, streamnet3, etc.
D.    To create a vector drainage line data set from this raster file, you can use the Stream to Feature tool under ArcToolbox – Spatial Analyst – Hydrology Tools. Fill in the dialog box similar to what you see below (note we specified 100 in our data name to remind ourselves we used 100 as the accumulation threshold):

Now
A.    East to west and north to south profile of the watershed?
B.     Calculate the area of the watershed
C.     The characteristics of the drainage net may be physically described by:
(i) the number of streams (ii) the length of streams
(iii) stream density (iv) drainage density

Sunday, November 20, 2016

Geo-processing

Exercise 4 Geo-processing
4.1  Dissolve
Dissolve is another tool used to trim away unnecessary detail that is not relevant to the scope of the project. Data can be simplified by dissolving several features in a layer into one. We use Dissolve when we want to aggregate features based on a specified attribute. Dissolve used to aggregate/group. The feature class based on their attribute data i.e. you can group uniform /homogeneous/ attribute data in to one single data.
To dissolve multiple features into one.
1. click the ArcToolbox
2. Data Management Tools
3. Generalization
4. Dissolve.
Ø  The Dissolve tool dialog box opens.
In the dissolve dialog box,
Ø  select the “Input Features” from the drop-down menu or browse to the feature.
Ø   specify a name and location for the “Output Feature Class”.
Ø  move to the ‘Dissolve_Field(s)” option. From the list of attributes select one or more on which to dissolve.
Ø  Once selected, click the ‘OK” button. The output is automatically added to the map display.
Exercise 4.1:
         Dissolve Ethiopia_woreda by Zone,
         Dissolve Ethiopia_woreda by Zone,
          How many banks are in each region (in which regions highest concentration?
         Divide the total number of banks to the total population 



4.2  Merge
The merge function helps to merge two and more feature class in to one feature class. Example when you transform a land use map of one community watershed, the procedure is for transform is transform each land use GPS point in separate file so after finishing separate data then you can merge to get one land use map or that specific community watershed.
1. Click the plus sign in front of the Data Management Tools
2. Click the plus sign in front or general
3. Double click on the merge function
4. Select the input feature class
5. Change the folder and file the output data
6. Click ok


Exercise 4.2: 
F Region in Ethiopia are given in exercise file as separate feature layer, Merge them all together  and create one feature layer 
F  from your ethio_GIS data you found problem in calculating area, pop Density for Amhara (because Lake Tana  as different feature) the Solution is merging
F Open Ethio-zone and merge zones in the same region together

Try the same exercise data but with union tool. What difference do you observe?

Overlaying operations :
An overlay operation is also one of the most common spatial analysis tools. Overlays allow you to identify areas where features in Iwo layers overlap. A new data set may be created based on these overlaps
4.3  Clip
clip is used when we want to cut out a piece of one layer using one or more of the polygons in another layer in order to work with only the data for an area of interest.
The layer that will have its features clipped can contain points, lines, or polygons. If we only want a subset or the polygon in this layer to be clipped we can select them using any of ArcMap”s  feature selection tools, before we start the Geoprocessing wizard”. The layer on which the clip will be based must contain polygon features.
1. Go to the Toolbox
2. Analysis tool
3. Extract
4. clip this opens open the clip window
§  under “Input Feature” select the map to be clipped
§  under “Clip Feature” select the map that will be used to perform the clip
§  under “Output Feature” indicate where to save the new layer and give it a name
The attributes of the features in the output layer will be the same as those of the feature in the layer being clipped.
Ø  Exercise 4.3:
Ø  Clip the rivers, roads and towns found in SNNPR
Ø  Clip towns in Amhara region which has a total population > 200000
o    

4.4 Intersect
we use intersect when we want to overlay a layer with the polygons in another layer so that the resulting output layer
a.       has the combined attribute data of the features from the two inputs, and
b.      Only contains features that fall within the spatial extent of the overlay polygons.
In this way, we can find those features that overlap and ,stamp’ the attributes of the overlay polygons in the second layer onto the features in the first layer.
we can intersect polygons with polygons and lines with polygons. We can specify that the intersection be limited to the currently selected set of features in either or both of the two inputs. If we only want a subset of the features in either or both layers to be used in the process, we can select these features using any of ArcMap”s feature selection tools.
To perform an intersect overlay,
I. go to “Analysis Tools” in AreToolbox and
2. click on Overlay”.
3. From the list or Overlay tools double-click on Intersect.
4. You arc prompted to select the input features for intersection and the output feature class
5. Click the ok button. The result is automatically displayed in ArcMap.
                                                                                                                                                           


Exercise 4.4:
Ø  To keep the GRD /from siltation soil conservation should be done. So, in which  woredas the government of Oromia region should practiced soil conservation in relation to the project. 
Ø  I.e  what is the intersection between Oromia and Abay Basin
Ø  How many  woredas of Oromia have direct  role in protecting the dam from siltation
Ø  How much percent of Abay Basin found in Oromia
4.5  Union
we use Union when we want to overlay two polygon layers so that the resulting output layer
a.       has the combined attribute data of the polygons in the two inputs, and
b.       Contains all the polygons from the inputs, whether or not they overlap.
In this way, we can produce a new layer combining the features and attributes of two polygon layers.
The output from this Geoprocessing operation will be in the same coordinate system as the data frame, irrespective of the coordinate system of the data source of the input layers (exception:
when saving the output from this operation as a feature class in an existing feature data set).

To perform a union overlay.
I. go to ArcToolbox's “Analysis Tools”.
2. select “Overlay”,
3. and then click “Union".
4. Specify the input layers to the union and a name for the output data set.
5. click ok, the result will be added to the ArcMap display if Arc Toolbox was used through ArcMap.
 

Exercise 4.5 :
 you want to produce the earliest map of Ethiopia but, the data you have is the recent one, Ethiopia and Eritrea are two different sovereign country. Can you produce that?

4.6 Erase
Contrast Update with Erase. Erase removes the overlapping features from the input layer. In this example, remove the Lakes areas completely from the Soils layer.
To perform an Erase,
I. go to “Analysis Tools” in AreToolbox and
2. click on Overlay”.
3. From the list or Overlay tools double-click on Erase.
4. You arc prompted to select the input features for intersection and the output feature class
5. Click the ok button. The result is automatically displayed in ArcMap.


Exercise 4.6:
 Erase areas covered by the lakes from the soil Layer
Exercise5. 6: mask annual precipitation of SNNPR from Ethiopia annual precipitation, where

4.7  Masking
Extract by mask function /clip Raster data.
1. Click the Spatial Analyst Tools
2. Click on Extraction
3. Double click on extract by mask function
4. Select raster input map
5. Select raster or feature mask data
6. Change the name or the folder and file name of your output data
7. Click ok

Delineating watershed using QGIS

  3.1              QSWAT Install QSWAt and launch it from plug in Click on new Project after saving,    select delineate watershed from...