g_gui_gmodeler_zipcodes_avg_elevation.gxm 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE gxm SYSTEM "grass-gxm.dtd">
  3. <gxm>
  4. <window pos="47,27" size="1022,548" />
  5. <properties>
  6. <name>zipcodes_avg_elevation</name>
  7. <description>Sample model for wxGUI Graphical Modeler.</description>
  8. <author>ludka</author>
  9. </properties>
  10. <variables>
  11. <variable name="raster" type="file">
  12. <value>/opt/geodata/ncrast/elev_state_500m.tif</value>
  13. <description>Input raster</description>
  14. </variable>
  15. <variable name="vector" type="file">
  16. <value>/opt/geodata/ncshape/zipcodes_wake.shp</value>
  17. <description>Input boundaries</description>
  18. </variable>
  19. </variables>
  20. <action id="1" name="r.import" pos="85,65" size="110,58">
  21. <comment>raster import</comment>
  22. <task name="r.import">
  23. <parameter name="input">
  24. <value>%raster</value>
  25. </parameter>
  26. <parameter name="memory">
  27. <value>300</value>
  28. </parameter>
  29. <parameter name="output">
  30. <value>elevation</value>
  31. </parameter>
  32. <parameter name="resample">
  33. <value>nearest</value>
  34. </parameter>
  35. <parameter name="extent">
  36. <value>input</value>
  37. </parameter>
  38. <parameter name="resolution">
  39. <value>estimated</value>
  40. </parameter>
  41. <flag name="overwrite" />
  42. </task>
  43. </action>
  44. <action id="2" name="v.import" pos="85,125" size="110,46">
  45. <comment>vector import</comment>
  46. <task name="v.import">
  47. <parameter name="input">
  48. <value>%vector</value>
  49. </parameter>
  50. <parameter name="output">
  51. <value>zipcodes_wake</value>
  52. </parameter>
  53. <parameter name="extent">
  54. <value>input</value>
  55. </parameter>
  56. <parameter name="snap">
  57. <value>1e-13</value>
  58. </parameter>
  59. <flag name="o" />
  60. <flag name="overwrite" />
  61. </task>
  62. </action>
  63. <action id="3" name="g.region" pos="85,180" size="110,52">
  64. <comment>region settings</comment>
  65. <task name="g.region">
  66. <parameter name="vector">
  67. <value>zipcodes_wake</value>
  68. </parameter>
  69. <parameter name="res">
  70. <value>10</value>
  71. </parameter>
  72. </task>
  73. </action>
  74. <action id="4" name="v.rast.stats" pos="460,65" size="148,46">
  75. <comment>method = average</comment>
  76. <task name="v.rast.stats">
  77. <parameter name="map">
  78. <value>zipcodes_wake</value>
  79. </parameter>
  80. <parameter name="layer">
  81. <value>1</value>
  82. </parameter>
  83. <parameter name="raster">
  84. <value>elevation</value>
  85. </parameter>
  86. <parameter name="column_prefix">
  87. <value>rst</value>
  88. </parameter>
  89. <parameter name="method">
  90. <value>average</value>
  91. </parameter>
  92. <parameter name="percentile">
  93. <value>90</value>
  94. </parameter>
  95. <flag name="c" />
  96. </task>
  97. </action>
  98. <action id="5" name="v.db.univar" pos="240,205" size="108,50">
  99. <task name="v.db.univar">
  100. <parameter name="map">
  101. <value>zipcodes_wake</value>
  102. </parameter>
  103. <parameter name="layer">
  104. <value>1</value>
  105. </parameter>
  106. <parameter name="column">
  107. <value>rst_average</value>
  108. </parameter>
  109. <parameter name="percentile">
  110. <value>90</value>
  111. </parameter>
  112. </task>
  113. </action>
  114. <action id="6" name="v.to.rast" pos="405,185" size="114,42">
  115. <comment>average raster</comment>
  116. <task name="v.to.rast">
  117. <parameter name="input">
  118. <value>zipcodes_wake</value>
  119. </parameter>
  120. <parameter name="layer">
  121. <value>1</value>
  122. </parameter>
  123. <parameter name="type">
  124. <value>point,line,area</value>
  125. </parameter>
  126. <parameter name="output">
  127. <value>zipcodes_avg</value>
  128. </parameter>
  129. <parameter name="use">
  130. <value>attr</value>
  131. </parameter>
  132. <parameter name="attribute_column">
  133. <value>rst_average</value>
  134. </parameter>
  135. <parameter name="value">
  136. <value>1</value>
  137. </parameter>
  138. <parameter name="memory">
  139. <value>300</value>
  140. </parameter>
  141. <flag name="overwrite" />
  142. </task>
  143. </action>
  144. <action id="7" name="r.colors" pos="385,250" size="116,44">
  145. <comment>bgyr color table</comment>
  146. <task name="r.colors">
  147. <parameter name="map">
  148. <value>zipcodes_avg</value>
  149. </parameter>
  150. <parameter name="color">
  151. <value>bgyr</value>
  152. </parameter>
  153. <flag name="e" />
  154. </task>
  155. </action>
  156. <action id="8" name="d.mon" pos="285,310" size="122,42">
  157. <comment>monitor display</comment>
  158. <task name="d.mon">
  159. <parameter name="start">
  160. <value>wx0</value>
  161. </parameter>
  162. <parameter name="bgcolor">
  163. <value>white</value>
  164. </parameter>
  165. </task>
  166. </action>
  167. <action id="9" name="d.barscale" pos="595,290" size="134,38">
  168. <comment>barscale display</comment>
  169. <task name="d.barscale">
  170. <parameter name="style">
  171. <value>arrow_ends</value>
  172. </parameter>
  173. <parameter name="color">
  174. <value>black</value>
  175. </parameter>
  176. <parameter name="bgcolor">
  177. <value>white</value>
  178. </parameter>
  179. <parameter name="text_position">
  180. <value>right</value>
  181. </parameter>
  182. <parameter name="fontsize">
  183. <value>10</value>
  184. </parameter>
  185. </task>
  186. </action>
  187. <action id="10" name="d.rast" pos="705,100" size="106,44">
  188. <comment>raster display</comment>
  189. <task name="d.rast">
  190. <parameter name="map">
  191. <value>zipcodes_avg</value>
  192. </parameter>
  193. <parameter name="bgcolor">
  194. <value>white</value>
  195. </parameter>
  196. </task>
  197. </action>
  198. <action id="11" name="d.vect" pos="505,125" size="130,46">
  199. <comment>vector display</comment>
  200. <task name="d.vect">
  201. <parameter name="map">
  202. <value>zipcodes_wake</value>
  203. </parameter>
  204. <parameter name="layer">
  205. <value>1</value>
  206. </parameter>
  207. <parameter name="display">
  208. <value>shape</value>
  209. </parameter>
  210. <parameter name="type">
  211. <value>boundary</value>
  212. </parameter>
  213. <parameter name="color">
  214. <value>black</value>
  215. </parameter>
  216. <parameter name="fill_color">
  217. <value>200:200:200</value>
  218. </parameter>
  219. <parameter name="width">
  220. <value>0</value>
  221. </parameter>
  222. <parameter name="width_scale">
  223. <value>1</value>
  224. </parameter>
  225. <parameter name="icon">
  226. <value>basic/x</value>
  227. </parameter>
  228. <parameter name="size">
  229. <value>5</value>
  230. </parameter>
  231. <parameter name="label_layer">
  232. <value>1</value>
  233. </parameter>
  234. <parameter name="label_color">
  235. <value>red</value>
  236. </parameter>
  237. <parameter name="label_bgcolor">
  238. <value>none</value>
  239. </parameter>
  240. <parameter name="label_bcolor">
  241. <value>none</value>
  242. </parameter>
  243. <parameter name="label_size">
  244. <value>8</value>
  245. </parameter>
  246. <parameter name="xref">
  247. <value>left</value>
  248. </parameter>
  249. <parameter name="yref">
  250. <value>center</value>
  251. </parameter>
  252. </task>
  253. </action>
  254. <action id="12" name="d.northarrow" pos="720,240" size="156,42">
  255. <comment>northarrow display</comment>
  256. <task name="d.northarrow">
  257. <parameter name="style">
  258. <value>1a</value>
  259. </parameter>
  260. <parameter name="at">
  261. <value>85.0,15.0</value>
  262. </parameter>
  263. <parameter name="color">
  264. <value>black</value>
  265. </parameter>
  266. <parameter name="fill_color">
  267. <value>black</value>
  268. </parameter>
  269. <parameter name="width">
  270. <value>0</value>
  271. </parameter>
  272. <parameter name="fontsize">
  273. <value>10</value>
  274. </parameter>
  275. </task>
  276. </action>
  277. <action id="13" name="d.legend" pos="440,310" size="138,46">
  278. <comment>legend display</comment>
  279. <task name="d.legend">
  280. <parameter name="raster">
  281. <value>zipcodes_avg</value>
  282. </parameter>
  283. <parameter name="lines">
  284. <value>50</value>
  285. </parameter>
  286. <parameter name="thin">
  287. <value>5</value>
  288. </parameter>
  289. <parameter name="labelnum">
  290. <value>5</value>
  291. </parameter>
  292. <parameter name="color">
  293. <value>black</value>
  294. </parameter>
  295. <parameter name="fontsize">
  296. <value>10</value>
  297. </parameter>
  298. </task>
  299. </action>
  300. <data pos="265,65" size="175,50">
  301. <data-parameter prompt="raster">
  302. <value>elevation</value>
  303. </data-parameter>
  304. <relation dir="from" id="4" name="raster">
  305. </relation>
  306. <relation dir="to" id="1" name="output">
  307. </relation>
  308. </data>
  309. <data pos="275,125" size="175,50">
  310. <data-parameter prompt="vector">
  311. <value>zipcodes_wake</value>
  312. </data-parameter>
  313. <relation dir="from" id="4" name="map">
  314. </relation>
  315. <relation dir="from" id="5" name="map">
  316. </relation>
  317. <relation dir="from" id="6" name="input">
  318. </relation>
  319. <relation dir="from" id="11" name="map">
  320. </relation>
  321. <relation dir="from" id="3" name="vector">
  322. </relation>
  323. <relation dir="to" id="2" name="output">
  324. </relation>
  325. </data>
  326. <data pos="575,185" size="175,50">
  327. <data-parameter prompt="raster">
  328. <value>zipcodes_avg</value>
  329. </data-parameter>
  330. <relation dir="from" id="7" name="map">
  331. </relation>
  332. <relation dir="from" id="10" name="map">
  333. </relation>
  334. <relation dir="from" id="13" name="raster">
  335. </relation>
  336. <relation dir="to" id="6" name="output">
  337. </relation>
  338. </data>
  339. </gxm>