Last active
January 31, 2017 17:11
-
-
Save gadomski/c921e5bffc888f0c5f44ca07d4932de4 to your computer and use it in GitHub Desktop.
This file contains 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
default: | |
.PHONY: default | |
cleaned: $(patsubst 3dd/%.3dd,laz/cleaned/%.laz,$(wildcard 3dd/*.3dd)) | |
.PHONY: cleaned | |
txt/cleaned/%.txt: txt/original/%.txt | |
mkdir -p $(dir $@) | |
echo "X,Y,Z,Intensity" > $@ | |
sed 's/, /,/g' $< >> $@ | |
laz/cleaned/%.laz: txt/cleaned/%.txt | |
mkdir -p $(dir $@) | |
pdal translate $< $@ -f range --filters.range.limits='X![0:0],Y![0:0],Z![0:0]' -f programmable --filters.programmable.script=scripts/scale_intensity.py --filters.programmable.module=scale_intensity --filters.programmable.function=scale_intensity | |
.PRECIOUS: laz/cleaned/%.laz |
This file contains 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
def scale_intensity(input, output): | |
intensity = input["Intensity"] | |
intensity = intensity * 65536 | |
output["Intensity"] = intensity | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment