pkdsm2shadow(1)
β¨ pkdsm2shadow β bestie's guide to casting shade (literally) β¨
okay so picture this: you've got a digital surface model and you wanna know where the sun isn't shining. that's the whole vibe here. this is pkdsm2shadow, a program to calculate sun shadow based on digital surface model and sun angles. no cap. π
πΈ SYNOPSIS πΈ
pkdsm2shadow -i input -o output [-sza angle] [-saa angle] [options]
[advanced options]
π¦ DESCRIPTION π¦
pkdsm2shadow is a utility to create a binary shadow mask from a digital surface model, based on Sun zenith (-sza) and azimuth angles (-saa). that's it, that's the girl. you give her a surface, you tell her where the sun is, she tells you what's in shadow. iconic behavior fr fr. β¨
π OPTIONS π
-ifilename,--inputfilename β input image file. the one you're reading from, bestie. π₯-ofilename,--outputfilename β Output image file. where the shadow mask goes. π€-szaangle,--szaangle β Sun zenith angle. how high up the sun is, angle-wise. βοΈ-saaangle,--saaangle β Sun azimuth angle, and yes the directions are written out for you because we love clarity:N=0 E=90 S=180 W=270. π§-fvalue,--flagvalue β Flag to put in image if pixel shadow. this is the value a shadowed pixel gets stamped with. π·οΈ-ottype,--otypetype β Data type for output image. your choices are:{Byte / Int16 / UInt16 / UInt32 / Int32 / Float32 / Float64 / CInt16 / CInt32 / CFloat32 / CFloat64}. and here's the cute part: an empty string means inherit type from input image. matching energy. π-ofGDALformat,--oformatGDALformat β Output image format (see alsogdal_translate(1)). π-ctfilename,--ctfilename β color table (file with 5 columns:id R G B ALFA(0: transparent,255: solid)). so yes, alpha goes from see-through to fully opaque, we love a range. π-cooption,--cooption β Creation option for output file. Multiple options can be specified. stack 'em, girl. π-vlevel,--verboselevel β verbose mode if> 0. want her to yap about what she's doing? bump the level. π£οΈ
β Advanced options β
these are the extra-credit ones, iykyk.
-svalue,--scalevalue β scale used for input dsm:height=scale*input+offsetπ-offvalue,--offsetvalue β offset used for input dsm:height=scale*input+offsetπ
π₯ EXAMPLE π₯
Create a shadow mask for the input raster dataset dsm.tif, using Sun zenith angle of 10 degrees and a Sun azimuth angle of 135 degrees (South-South-East). All shadow pixels are set to a value of 1.
pkdsm2shadow -i dsm.tif -sza 10 -saa 170 -f 1 -o shadow.tif
ok so real talk: the prose up there says azimuth135(South-South-East) but the command itself says-saa 170. that's exactly how the original page has it, so i'm not touching it β just giving you the heads up so you're not out here thinking you misread. π
and that's the whole page, bestie. this one's from pkdsm2shadow(1), dated 01 January 2025. go forth and cast some shade. π«Άπ
π¦ where this page comes from
- ubuntu questing: pktools 2.6.7.6+ds-6build4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms