This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from StreamCat_functions import dbf2DF | |
pre = 'D:/NHDPlusV21/NHDPlusGL/NHDPlus04' | |
fline = dbf2DF('D%s/NHDSnapshot/Hydrography/NHDFlowline.dbf' % pre) | |
flow = dbf2DF('%s/NHDPlusAttributes/PlusFlow.dbf' pre)[['TOCOMID','FROMCOMID']] | |
def recurs(val, ups): | |
print val | |
ups = ups + flow.ix[flow.TOCOMID == val].FROMCOMID.tolist() | |
if 0 in ups: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import rasterio | |
""" | |
2014-02-13 | |
Bryan Luman | |
Use it however you like at your own risk | |
Problem: | |
I have a huge DEM converted from LiDAR LAS points. I'd like to make it slightly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create data frame 1 | |
x = c("ID1","ID2","ID3","ID4","ID5") | |
y = c("C1","C2","C3","C4","C5") | |
d1 = data.frame("SiteID" = x, "Value" = y) | |
d1 | |
# Create lookup table | |
x = c("ID2","ID5") | |
y = c("C5","C2") | |
lookup = data.frame("SiteID" = x, "Value" = y) | |
lookup |