Wednesday, March 14, 2012

This Python is named "Vector"

Have you ever been camping?  Remember how you picked out your tent site. Not in a hole or dip in case it rained
Near some water, not far from the road (if you had a lot of stuff).  This exercise was a formal "pick the campsite" plan.
We had parameters with road and water buffers, then an exclusion.  It walked through buffers, basic analysis tools
with clip, extract, union, field additions, joins and overlays. 

Here's my Process Summary how I got there.


1)      Opened edesktop created folders, moved lab files to set up. Week9_Analy_model_vect2
2)      New map>added layer roads>opened on map smaller than postage stamp>fixed zoom in>to 1:150,000. Saved map as week9_intro_campground
3)      Arctools>analysis>Proximity>buffer dialog 
Input – roads      Output-s|… roads300mBuff
Linear unit-  meters       Distance 300               Field----
Side – full           End Type—round                    Dissolve—All  > ok   Looks like example
4)      Inserted new field into water layer  (reminder clicked water layer in TOC>open attribute table>clicked table options (in table window>drop down>add field> buffdist ok
5)      With water still highlighted TOC> Menu>selection>select by attributes> type=lakes> (lakes highlighted)  back to TOC>open attribute table>buffdist attribute >highlight>RT click>dropdown>field calculator> below in textbox 150>ok   switch selection>only river highlighted> buffdist 500.  Buffer amts in column.
6)      TOC=clear selections.
7)      Arctools>analysis>proximity>buffer dialog box>  Input – Water
Output-  s:\...wtrVUFFr500L150 (Distance set by buffdist attribute)
Field—buffdist  Side type—Full             End type- round          Dissolve Type – List (uses listed fields below)   so we check  buffdist in list  Done.  Shows up on map.
8)      Moved water up.  Recolored water and roads buffers. Added contrast color to water bodies.
 Step 3:
9)      Needed to correct name of Week9file. Had to close out arcmap, opended edesktop file directory, to file, renamed Week9_Analy_model_vect2, back to arcmap,  Week9_vect2_campground had no visuals & TOC layers had red exclamations beside them. The check boxes were transparent w/checks.  Unchecked 1st layer water,  went to add layers>found water.shp added back in . Everything came back ok.
10)  Opened Python window. >>> import arcpy[enter] >>> arcpy.Buffer_analysis [no space or enter] (“Roads”,”S:/INTROGIS/Week9_Analy_model_vect2/VectorII/RoadBuff100m”,”100 Meters”,”Full”,”Round”,”All”)[enter]
11)   Had trouble here. Made a typing error and could not edit it. Had to retype several times. Had various errors re: syntax, no python, etc.  had to go  and restart at this step several times.   Even though restarted time spent to this point was still less than 2 hours into lab.
Step 5- Beginning Union
12)  Added field “insd_rbuf” to roads300m_Buff layer, and Added field “insd_wbuf” to wtBUFFr500L150 layer.   When adding this field highlighted, rt cl>Field calculator to give this field a value of 1, for the later union action.  1=yes.
13)   Arctoolbox>Analysis>Overlay>Union dialog box
Input:   wtrBUFFr500L150 layer and roads300M_BUFF 
Output:  s/INTROGIS/Week9_Analy_model_vect2/VectorII/wtrrdBUFF_UNION
joinAttributes:   ALL                   no Gaps Allowed option as given in instructions>ok

14)  Froze up  on table contents issues.  At least saved map.  Glad did major power outage without warning. Slept. New start in morning.
15)   Created new layer for Roads Buffer area Between 100 m  & 300 m.  using  Erase tool.
16)   Separated out River & Lakes to separate layers using select by attributes.
17)   Clipped River only Buffer using Road Bet Buf layer,  Clipped Lake only Buffer with same.
18)  Performed union tool on Lake & River Buffer area sites. File: LakeRiver_sitesB4cons
Step 6: Excluding conservation areas.
19)   Performed Erase tool on Lake & River buffer area sites to eliminate areas within designated conservation zones. Lab said 4 entries, I had 3.
20)  Added conservation_areas layer, performed Erase leaving potential sites. Added area field, calculated geometry, added graph to map reflecting area results. Saved map as s:\INTROGIS\Week9_Analy_model_vect2\VectorII\Week9_vect2-campground.jpg

No comments:

Post a Comment