diff --git a/index.qmd b/index.qmd index a0c42fbc2ef6548d67a3bda823b13a9839a33e46..94fd305ae4e8865632c370af686c4e967d351c63 100644 --- a/index.qmd +++ b/index.qmd @@ -1 +1,15 @@ -# Preface {.unnumbered} \ No newline at end of file +# Preface {.unnumbered} + +This manual is tended both for R users wishing to set up spatial data peocessing and for users wishing to use R to carry out the tasks that they usually carry out with GIS. The main steps in the processing of geographic information are covered. Emphasis is placed on the processing of vector data but a part is still dedicated to raster data. + +**How to use the manual**\ +The RStudio project containing all the data used in the manual is available [here](https://github.com/rCarto/geodata/archive/refs/heads/main.zip). Once the file is unzipped it is possible to test all the manipulations proposed in the RStudion project. + +**Context**\ +This manual has been designed from the courses "[Géomatique avec R](https://rcarto.github.io/geomatique_avec_r/)" and "[Cartographie avec R](https://rcarto.github.io/cartographie_avec_r/)" by Timothée Giraud and Hugues Pecout. It has been translated and its examples have been adapted to the geographical distribution of the audience. + +------------------------------------------------------------------------ + +{fig-align="left"} + +The online version of this document licensed under the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0](http://creativecommons.org/licenses/by-nc-sa/4.0/). diff --git a/public/img/by-nc-sa.png b/public/img/by-nc-sa.png new file mode 100644 index 0000000000000000000000000000000000000000..867c1ac9e6e4e7f5efc3f4997d79db41eb2a30fa Binary files /dev/null and b/public/img/by-nc-sa.png differ diff --git a/public/index.html b/public/index.html index 51d201cdb1ecb2dce282fe7a7a13054a62daedfb..d50c301724c8bda1414df847d16d6d0d6fc66417 100644 --- a/public/index.html +++ b/public/index.html @@ -162,6 +162,19 @@ ul.task-list{list-style: none;} <section id="preface" class="level1 unnumbered"> <p><img src="img/geohealth_banner.jpeg" title="Mapping and spatial analyses in R for One Health studies" class="quarto-cover-image img-fluid"></p><h1 class="unnumbered">Preface</h1> +<p>This manual is tended both for R users wishing to set up spatial data peocessing and for users wishing to use R to carry out the tasks that they usually carry out with GIS. The main steps in the processing of geographic information are covered. Emphasis is placed on the processing of vector data but a part is still dedicated to raster data.</p> +<p><strong>How to use the manual</strong><br> +The RStudio project containing all the data used in the manual is available <a href="https://github.com/rCarto/geodata/archive/refs/heads/main.zip">here</a>. Once the file is unzipped it is possible to test all the manipulations proposed in the RStudion project.</p> +<p><strong>Context</strong><br> +This manual has been designed from the courses “<a href="https://rcarto.github.io/geomatique_avec_r/">Géomatique avec R</a>†and “<a href="https://rcarto.github.io/cartographie_avec_r/">Cartographie avec R</a>†by Timothée Giraud and Hugues Pecout. It has been translated and its examples have been adapted to the geographical distribution of the audience.</p> +<hr> +<div class="quarto-figure quarto-figure-left"> +<figure class="figure"> +<p><img src="img/by-nc-sa.png" class="img-fluid figure-img"></p> +<p></p><figcaption aria-hidden="true" class="figure-caption">Creative Commons License</figcaption><p></p> +</figure> +</div> +<p>The online version of this document licensed under the <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0</a>.</p> </section> diff --git a/public/search.json b/public/search.json index 8888cec0486a6d3cd99a899de6f9685a1d44b6ab..e11483d25f62a02b78c4daadc2686ea0473a7094 100644 --- a/public/search.json +++ b/public/search.json @@ -201,5 +201,12 @@ "title": "4 Work with Raster Data", "section": "4.6 Transformation and conversion", "text": "4.6 Transformation and conversion\n\n4.6.1 Rasterization\nConvert polygons to raster format.\n\nchamkarmon = subset(district, district$ADM2_PCODE ==\"KH1201\") \nraster_district <- rasterize(x = chamkarmon, y = elevation_clip_utm)\n\n\nplot(raster_district)\n\n\n\n\n\n\n\n\nConvert points to raster format\n\n#rasterization of the centroids of the municipalities\nraster_dist_centroid <- rasterize(x = centroids(district), \n y = elevation_clip_utm, fun=sum)\nplot(raster_dist_centroid, col = \"red\")\nplot(district, add =TRUE)\n\n\n\n\nConvert lines in raster format\n\n#rasterization of municipal boundaries\nraster_dist_line <- rasterize(x = as.lines(district), y = elevation_clip_utm, fun=sum)\n\n\nplot(raster_dist_line)\n\n\n\n\n\n\n4.6.2 Vectorisation\nTransform a raster to vector polygons.\n\npolygon_elevation <- as.polygons(elevation_clip_utm)\n\n\nplot(polygon_elevation, y = 1, border=\"white\")\n\n\n\n\nTransform a raster to vector points.\n\npoints_elevation <- as.points(elevation_clip_utm)\n\n\nplot(points_elevation, y = 1, cex = 0.3)\n\n\n\n\nTransform a raster into vector lines.\n\nlines_elevation <- as.lines(elevation_clip_utm)\n\n\nplot(lines_elevation)\n\n\n\n\n\n\n4.6.3 terra, raster, sf, stars…\nReference packages for manipulating spatial data all rely o their own object class. It is sometimes necessary to convert these objects from one class to another class to take advance of all the features offered by these different packages.\nConversion functions for raster data:\n\n\n\nFROM/TO\nraster\nterra\nstars\n\n\n\n\nraster\n\nrast()\nst_as_stars()\n\n\nterra\nraster()\n\nst_as_stars()\n\n\nstars\nraster()\nas(x, ‘Raster’) + rast()\n\n\n\n\nConversion functions for vector data:\n\n\n\nFROM/TO\nsf\nsp\nterra\n\n\n\n\nsf\n\nas(x, ‘Spatial’)\nvect()\n\n\nsp\nst_as_sf()\n\nvect()\n\n\nterra\nst_as_sf()\nas(x, ‘Spatial’)\n\n\n\n\n\n\n\n\nHijmans, Robert J. 2022. “Terra: Spatial Data Analysis.†https://CRAN.R-project.org/package=terra.\n\n\nLi, Xingong. 2009. “Map Algebra and Beyond : 1. Map Algebra for Scalar Fields.†https://slideplayer.com/slide/5822638/.\n\n\nMadelin, Malika. 2021. “Analyse d’images Raster (Et Télédétection).†https://mmadelin.github.io/sigr2021/SIGR2021_raster_MM.html.\n\n\nMennis, Jeremy. 2015. “Fundamentals of GIS : Raster Operations.†https://cupdf.com/document/gus-0262-fundamentals-of-gis-lecture-presentation-7-raster-operations-jeremy.html.\n\n\nNowosad, Jakub. 2021. “Image Processing and All Things Raster.†https://nowosad.github.io/SIGR2021/workshop2/workshop2.html.\n\n\nRacine, Etienne B. 2016. “The Visual Raster Cheat Sheet.†https://rpubs.com/etiennebr/visualraster." + }, + { + "objectID": "index.html", + "href": "index.html", + "title": "Mapping and spatial analyses in R for One Health studies", + "section": "", + "text": "This manual is tended both for R users wishing to set up spatial data peocessing and for users wishing to use R to carry out the tasks that they usually carry out with GIS. The main steps in the processing of geographic information are covered. Emphasis is placed on the processing of vector data but a part is still dedicated to raster data.\nHow to use the manual\nThe RStudio project containing all the data used in the manual is available here. Once the file is unzipped it is possible to test all the manipulations proposed in the RStudion project.\nContext\nThis manual has been designed from the courses “Géomatique avec R†and “Cartographie avec R†by Timothée Giraud and Hugues Pecout. It has been translated and its examples have been adapted to the geographical distribution of the audience.\n\n\n\n\nCreative Commons License\n\n\nThe online version of this document licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0." } ] \ No newline at end of file