|
1 | 1 | \documentclass{article}
|
2 |
| -\renewcommand{\normalsize}{\fontsize{12}{13}\selectfont} |
| 2 | +\renewcommand{\normalsize}{\fontsize{12}{13}\selectfont} |
3 | 3 | \usepackage[landscape]{geometry}
|
4 | 4 | \usepackage{url}
|
5 | 5 | \usepackage{multicol}
|
|
26 | 26 | \parskip2pt
|
27 | 27 | \newcommand{\hr}{\centerline{\rule{3.5in}{1pt}}}
|
28 | 28 |
|
29 |
| -% Setup the size of paper % |
| 29 | +% Setup the size of paper % |
30 | 30 | \geometry{
|
31 | 31 | paperwidth=850pt,
|
32 | 32 | paperheight=1100pt,
|
|
60 | 60 | \end{tikzpicture}
|
61 | 61 | }
|
62 | 62 | \renewcommand{\footrulewidth}{0pt}
|
63 |
| - \setlength{\headsep}{0.5cm} |
| 63 | + \setlength{\headsep}{0.5cm} |
64 | 64 | }
|
65 | 65 |
|
66 | 66 | % ----------------------------------- Cheatsheet ---------------------------------------------- %
|
|
98 | 98 | % Mission %
|
99 | 99 | \begin{minipage}{\linewidth}
|
100 | 100 | \vspace{-10pt}
|
101 |
| - \textbf{\fontsize{44}{44}\selectfont \textbf{Mission}}\vspace{8pt}\\ |
| 101 | + \textbf{\fontsize{44}{44}\selectfont \textbf{Mission}}\vspace{8pt}\\ |
102 | 102 | The goal of qgisprocess is to provide an R interface to the geoprocessing algorithms of QGIS, a popular and open source desktop geographic information system (GIS) program. This package is a re-implementation of the functionality provided by the archived \textbf{RQGIS} package, which was partially revived in the \textbf{RQGIS3} package.
|
103 | 103 | \end{minipage}
|
104 | 104 |
|
105 | 105 | % Features %
|
106 | 106 | \begin{minipage}{\linewidth}
|
107 | 107 | \vspace{1pt}
|
108 |
| - \textbf{\fontsize{20}{5}\selectfont \textbf{Features}}\vspace{8pt}\\ |
| 108 | + \textbf{\fontsize{20}{5}\selectfont \textbf{Features}}\vspace{8pt}\\ |
109 | 109 | This package makes it easier to use native processing algorithms and some from GDAL, GRASS and many others (like SAGA).
|
110 | 110 |
|
111 | 111 | \begin{center}
|
112 |
| -\setlength{\arrayrulewidth}{0.001pt} |
| 112 | +\setlength{\arrayrulewidth}{0.001pt} |
113 | 113 | \arrayrulecolor{gray}
|
114 |
| -\renewcommand{\arraystretch}{1.25} |
| 114 | +\renewcommand{\arraystretch}{1.25} |
115 | 115 | \begin{tabular}{|c|c|}
|
116 | 116 | \hline
|
117 |
| - \rowcolor{mycolor} |
| 117 | + \rowcolor{mycolor} |
118 | 118 | \textcolor{white}{\textbf{Providers}} & \textcolor{white}{\textbf{Algorithms}} \\
|
119 | 119 | \hline
|
120 | 120 | qgis & 50 + 242 ( c ++) + 1 (3D) \\
|
|
128 | 128 | Total counts & 653 + x \\
|
129 | 129 | \hline
|
130 | 130 | \end{tabular}
|
131 |
| -\end{center} |
| 131 | +\end{center} |
132 | 132 | \end{minipage}
|
133 | 133 |
|
134 | 134 | \begin{lstlisting}[style=Rstyle]
|
135 | 135 | # Show a tibble with processing providers
|
136 |
| - > qgis_providers( ) |
| 136 | + > qgis_providers( ) |
137 | 137 | # Show a tibble with algorithms
|
138 |
| - > qgis_algorithms( ) |
| 138 | + > qgis_algorithms( ) |
139 | 139 | # Search algorithms using regular expressions
|
140 | 140 | > qgis_search_algorithms(
|
141 | 141 | algorithm = <x>,
|
142 | 142 | provider = <y>,
|
143 |
| - group = <z> |
144 |
| - ) |
| 143 | + group = <z> |
| 144 | + ) |
145 | 145 | \end{lstlisting}
|
146 | 146 |
|
147 | 147 | % Installation %
|
148 | 148 | \begin{minipage}{\linewidth}
|
149 | 149 | \vspace{10pt}
|
150 |
| - \textbf{\fontsize{20}{5}\selectfont \textbf{Installation}\vspace{5pt}} |
| 150 | + \textbf{\fontsize{20}{5}\selectfont \textbf{Installation}\vspace{5pt}} |
151 | 151 | \begin{lstlisting}[style=Rstyle]
|
152 | 152 | > install.packages("remotes")
|
153 | 153 | > install_github("r-spatial/qgisprocess")
|
|
157 | 157 |
|
158 | 158 |
|
159 | 159 | \begin{tikzpicture}
|
160 |
| - \node[mybox,text width=11cm] (box) |
| 160 | + \node[mybox,text width=11cm] (box) |
161 | 161 | {\\
|
162 | 162 | If needed, specify path to QGIS installation before
|
163 | 163 | loading qgisprocess:
|
|
169 | 169 | \end{tikzpicture}
|
170 | 170 |
|
171 | 171 | \begin{tikzpicture}
|
172 |
| - \node[mybox,text width=11cm] (box) |
| 172 | + \node[mybox,text width=11cm] (box) |
173 | 173 | {\\
|
174 | 174 | 1.Get started with the installation of docker in your machine.
|
175 |
| - |
176 |
| - 2.Download the image of geocomputation |
| 175 | + |
| 176 | + 2.Download the image of geocomputation |
177 | 177 | \begin{lstlisting}[breaklines=true,style=Rstyle]
|
178 | 178 | > docker pull geocompr/geocompr:qgis-ext
|
179 | 179 | \end{lstlisting}
|
|
182 | 182 | \begin{lstlisting}[breaklines=true,style=Rstyle]
|
183 | 183 | > docker run -d -p 8786:8787 -v $(pwd):/home/rstudio/data -e PASSWORD=pw geocompr/geocompr:qgis-ext
|
184 | 184 | \end{lstlisting}
|
185 |
| - |
| 185 | + |
186 | 186 | };
|
187 | 187 | \node[fancytitle, right=0pt,yshift=6pt] at (box.north west) {Using docker};
|
188 | 188 | \end{tikzpicture}
|
|
192 | 192 | % Input %
|
193 | 193 | \begin{minipage}{\linewidth}
|
194 | 194 | \vspace{-5pt}
|
195 |
| - \textbf{\fontsize{44}{44}\selectfont \textbf{Input functions}}\vspace{8pt}\\ |
| 195 | + \textbf{\fontsize{44}{44}\selectfont \textbf{Input functions}}\vspace{8pt}\\ |
196 | 196 | The package offers new functionalities of Input to have a workflow of an easy manner inside of R.
|
197 | 197 | \end{minipage}
|
198 | 198 | \begin{lstlisting}[style=Rstyle]
|
|
204 | 204 | \end{lstlisting}
|
205 | 205 | \begin{lstlisting}[style=Rstyle]
|
206 | 206 | # Run the algorithms
|
207 |
| - > qgis_run_algorithm( |
| 207 | + > qgis_run_algorithm( |
208 | 208 | algorithm = "native:creategrid",
|
209 | 209 | TYPE = 4,
|
210 | 210 | EXTENT = c("794599, 798208, 8931775,8935384"),
|
|
214 | 214 | OUTPUT = "grid"
|
215 | 215 | )
|
216 | 216 |
|
217 |
| - # Create a function based on the algorithm to use |
| 217 | + # Create a function based on the algorithm to use |
218 | 218 | > grid_fun <- qgis_function("native:creategrid")
|
219 | 219 | > grid_fun(
|
220 | 220 | TYPE = 4,
|
|
229 | 229 | % Output functions %
|
230 | 230 | \begin{minipage}{\linewidth}
|
231 | 231 | \vspace{12pt}
|
232 |
| - \textbf{\fontsize{20}{5}\selectfont \textbf{Output functions}}\vspace{8pt}\\ |
| 232 | + \textbf{\fontsize{20}{5}\selectfont \textbf{Output functions}}\vspace{8pt}\\ |
233 | 233 | qgisprocess give us new functionalities of output for vector, raster and other format file, and it is possible loads it to our environment work.
|
234 | 234 | \end{minipage}
|
235 | 235 |
|
|
253 | 253 | \textbf{\fontsize{44}{44}\selectfont \textbf{Pipe integration}}\vspace{-13pt}
|
254 | 254 | \vspace{13pt}
|
255 | 255 | \begin{lstlisting}
|
256 |
| -qgisprocess also provides |
| 256 | +qgisprocess also provides |
257 | 257 | qgis_run_algorithm_p() that works
|
258 | 258 | better in pipelines.
|
259 | 259 | \end{lstlisting}
|
|
270 | 270 | algorithm = "native:buffer",
|
271 | 271 | DISTANCE = 100
|
272 | 272 | ) |> st_as_sf() |>
|
273 |
| - plot() |
| 273 | + plot() |
274 | 274 | \end{lstlisting}
|
275 | 275 |
|
276 | 276 | % Workflow %
|
277 | 277 | \begin{minipage}{\linewidth}
|
278 | 278 | \vspace{12pt}
|
279 |
| - \textbf{\fontsize{44}{44}\selectfont \textbf{Workflow}}\vspace{8pt}\\ |
| 279 | + \textbf{\fontsize{44}{44}\selectfont \textbf{Workflow}}\vspace{8pt}\\ |
280 | 280 | \end{minipage}
|
281 | 281 |
|
282 | 282 | \begin{tikzpicture}
|
283 |
| - \node[mybox,text width=11.5cm] (box) |
| 283 | + \node[mybox,text width=11.5cm] (box) |
284 | 284 | {\\
|
285 | 285 | \begin{lstlisting}[breaklines=true,style=Rstyle]
|
286 | 286 | # Hexagrid of 400x400
|
|
293 | 293 | VSPACING = 400,
|
294 | 294 | CRS = "EPSG:26920",
|
295 | 295 | OUTPUT = "grid"
|
296 |
| - ) |> |
297 |
| - st_as_sf() |> |
| 296 | + ) |> |
| 297 | + st_as_sf() |> |
298 | 298 | select(id) |>
|
299 | 299 | plot()
|
300 | 300 | \end{lstlisting}
|
301 | 301 | };
|
302 | 302 | \node[fancytitle, right=0pt, yshift=6pt] at (box.north west) {Vector data};
|
303 | 303 | \end{tikzpicture}
|
304 | 304 | \begin{tikzpicture}
|
305 |
| -\node[mybox,text width=11.5cm] (box) |
| 305 | +\node[mybox,text width=11.5cm] (box) |
306 | 306 | {
|
307 | 307 | \begin{lstlisting}[breaklines=true,style=Rstyle]
|
308 | 308 | # TWI processing
|
|
315 | 315 | > qgis_run_algorithm(
|
316 | 316 | algorithm ="sagang:sagawetnessindex",
|
317 | 317 | DEM = dem,
|
318 |
| - TPI = "tpi.sdat") |> |
319 |
| - qgis_extract_output("TWI") |> |
320 |
| - qgis_as_terra() |> |
| 318 | + TWI = "twi.sdat") |> |
| 319 | + qgis_extract_output("TWI") |> |
| 320 | + qgis_as_terra() |> |
321 | 321 | plot(col = cptcity::cpt(pal = "ocal_blues"))
|
322 | 322 | \end{lstlisting}
|
323 | 323 | };
|
324 | 324 | \node[fancytitle, right=0pt,yshift=6pt] at (box.north west) {Raster data};
|
325 | 325 | \end{tikzpicture}
|
326 | 326 | \end{multicols*}
|
327 |
| -\end{document} |
| 327 | +\end{document} |
0 commit comments