FOR557 – 07 Exercise 6a See schedule for due date

advertisement
FOR557 – 07
Exercise 6a
See schedule for due
date
Digitizing
Overview
1) Do some simple” heads up” digitizing using
the infrared image on esf-Academic5 under
the folder Ex6a.
2) Calculate the Area and Perimeter of poly
features AFTER you have created them,
saved them, and then changed them.
Your Objective
is to get as much practice as possible in creating
and editing points, lines, and polys as possible.
You will find things like the constant switching
of the task between “New features” and “modify
features” frustrating so watch it.
What gets turned in
A map showing the area you worked on and the data you created. Polys must be “empty” (no fill) and
adjacent areas snapped together where appropriate. Print of the Attribute table for the poly coverage
showing areas in square map units and acres.
The Assignment
1.
2.
3.
4.
Zoom in to the Bulllhead image so it looks like the image above.
Create a point layer of each building you can recognize.
Create a lines layers of a)roads and b)streams
Create a poly layer of what you imagine are property boundaries of the areas in the SW of the image.
Adjacent property lines and vertices must be snapped together.
5. Make a map showing your work with an inset map of the property area so that we can see that they are
snapped together.
Calculating Areas of shapefiles.
When you modify the size or shape of a shapefile poly feature the area field in the Attribute table is NOT
updated and you have to apply the procedure below to update the area. If the work is done in a GDB the
area fields ARE updated but not any fields that are based on the area field (like acres). Use help to find
the script for perimeter update.
NOTE
I suggest that you do things that will not be in your report. They are worth experimenting with since they will be
part of 6b. For example in 6b you will have to label the polygons with owners name and area in acres!
D:\282217654.doc
Page 1 of 2
FOR557 – 07
Exercise 6a
See schedule for due
date
Digitizing
Updating Polygon areas for a shapefile
1.
2.
3.
4.
5.
6.
Open the attribute table for the layer of interest and create a field called Area (or fiddlesticks, the name does
not matter). Add a new field for area or whatever by clicking the Options button (lower right) and selecting
Add Field. I used the field name Area_M2 but you can use any old name. (To add a new field, you cannot
be in an editing session. )
Make the field Type double and the value for precision 15 and for scale 3. This makes 15 the total width
of the number not including the point and the number of decimals 3. This results in the field being able to
handle numbers like ppppppppppp.sss or -1234512345.123. Right-click the shapefile layer you want to
compute areas for and Open its Attribute Table.
Right-click the new field heading and select Field Calculator.
You will probably get a warning message – just click YES. (If you are using your own software the
textbook gives a procedure for getting rid of this message.)
Check the Advanced check box.  Easy step to miss! It’s a check box between the two Text windows
(Fields and the one labeled with your “field name=” (in my case it is” area_m2=”). This opens another text
box titled “Pre-Logic VBA Script Code.” See last figure.
Type the following VBA statements in the first text box. Since it is impossible the tell the difference
between 1 and l (that’s a one and a lower case L) it is better to copy and past the code.
Dim dblArea as double
Dim pArea as IArea
Set pArea = [shape]
dblArea = pArea.area
Copy the variable dblArea into the text box directly under the Pre-Logic box (seefigure.)
Check the code carefully – the computer will do exactly what you tell it to, right or wrong.
Click OK
If all goes well then create a field called acres and do a Field Calculator Acres=area_m2 /
0.00024710439 (REMEMBER The Acres= part of the expression is already in
the label of the calculation box! Replace area_M2 with your field name!)
Updating Perimeter is the same except the code is
7.
8.
9.
10.
Dim dblPerimeter as double
Dim pCurve as ICurve
Set pCurve = [shape]
dblPerimeter = pCurve.Length
D:\282217654.doc
Page 2 of 2
Download