Hydrologic Modeling in Oak Woodland SoilscapesResearch SitesNavigationUser loginWho's onlineThere are currently 0 users and 4 guests online.
|
Establishing the Optimal Number of Survey PointsSubmitted by dylan on Fri, 2008-03-21 23:40.
First Pass: Terrain SkeletonInitial Estimation
# generate a slightly larger watershed, so that we get the edges v.buffer in=w_smooth out=w_buff buffer=50 --o # setup some kind of sampling intervals contour_sampling_interval=50 skeleton_sampling_interval=15 # create a set of points along contours v.to.points -i -t in=contours out=cp dmax=$contour_sampling_interval --o v.category in=cp out=cp_cat option=del --o v.category in=cp_cat out=cp_cat_1 option=add --o # select only those within the watershed: v.select -t ainput=cp_cat_1 atype=point binput=w_buff btype=area operator=overlap out=contour_pts --o # create set of points from terrian skeleton # note that the output from r.flow involves multiple line segments that converge # and thus is not readily converted to a regular interval of points # combine flow and upflow v.patch in=flow,upflow out=skel # convert to points on a regular interval # use a small number to preserve the complexity-- # we will thin the number of points down later v.to.points -i -t in=skel out=sp dmax=10 --o # these points need a category first # v.category in=sp out=sp_cat option=del --o v.category in=sp_cat out=sp_cat_1 option=add --o # select only points within watershed v.select -t ainput=sp_cat_1 atype=point binput=w_buff btype=area operator=overlap out=skel_pts --o # give each sampling point a unique ID and attr designating the observation type: v.db.addtable skel_pts v.db.addtable contour_pts v.db.addcol skel_pts column='pt_type varchar(10)' v.db.addcol contour_pts column='pt_type varchar(10)' echo "update contour_pts set pt_type = 'contour'" | db.execute echo "update skel_pts set pt_type = 'skel'" | db.execute # patch contour and skeleton sampling points v.patch -e in=contour_pts,skel_pts out=rp v.build rp # thin points out a bit v.clean in=rp out=rtk_pts tool=snap thres=$skeleton_sampling_interval --o # cleanup temp points: g.remove vect=cp,cp_cat,cp_cat_1,sp,sp_cat,sp_cat_1,rp # simple map d.erase d.vect contours col=grey d.vect skel col=grey d.vect w_buff width=2 type=boundary # sample points # d.vect contour_pts icon=basic/box fcol=yellow # d.vect skel_pts icon=basic/box fcol=red # combined sample points: d.vect rtk_pts icon=basic/box fcol=yellow # d.barscale -m # d.out.file intial_plan --o # how many points are we talking about ? eval `v.info rtk_pts -t | grep points` echo $points # 832
|