<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi,<div><br><div>You can use a vector layer as suggested or use a raster layer with a specific value for land or water.  You can then use something like the point sampling tool plugin (a plugin that you must install and activate) to retrieve the value of the point on the raster of vector layer.  </div><div><br></div><div>Make sure your statistics works with spatial data.  Using a standard statistic with spatial data may give you bad results.  <br><br><div dir="ltr">Nicolas Cadieux<div><a href="https://gitlab.com/njacadieux">https://gitlab.com/njacadieux</a></div></div><div dir="ltr"><br><blockquote type="cite">Le 14 avr. 2021 à 03:07, Raymond Nijssen <r.nijssen@terglobo.nl> a écrit :<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>Hi Milena,</span><br><span></span><br><span>There's an algorithm "Random Points in Polygons" that will only return points within the polygons of a layer. So you need a vector layer for land for the area you are interested in.</span><br><span></span><br><span>Hope this helps,</span><br><span>Raymond</span><br><span></span><br><span>On 14-04-2021 08:36, Milena Muehler wrote:</span><br><blockquote type="cite"><span>Dear community!</span><br></blockquote><blockquote type="cite"><span>I’m new to QGIS and hope you can follow my process and my question. Would be more than happy to get your help!</span><br></blockquote><blockquote type="cite"><span>So I have a raster layer with a cumulative value for each raster giving information about land modification (in 2016)</span><br></blockquote><blockquote type="cite"><span>I have another vector layer with points providing information where an outbreak of a zoonotic infectious disease occurred (in 2016)</span><br></blockquote><blockquote type="cite"><span>I want to examine the effect / association between  land modification and outbreak (I´ll do this with a binary logistic regression analysis in SPSS) therefore I want to generate a text file with values of the land modification for the location of the outbreak - I’ve done this with the tool "point sampling“.</span><br></blockquote><blockquote type="cite"><span>But I also need values of land modification located at the points „no-outbreaks“. (to calculate the binary logistic regression analysis later in SPSS) Therefore I’ve generated random points. However, these points are truly random :)</span><br></blockquote><blockquote type="cite"><span>So most random point „lay in the ocean“ and therefore I don’t get values of land modification.</span><br></blockquote><blockquote type="cite"><span>So my question: How do I deal with that? Can I give a kind of command that all random points have to lie on land? and to give a certain radius for the „not random“ points - outbreaks.</span><br></blockquote><blockquote type="cite"><span>someone said I can do this via raster calculator. But I cannot follow it, since I don’t calculate two raster layers?! I gave me this kinda command to deal with my issue: (via raster calculator?!)</span><br></blockquote><blockquote type="cite"><span>L = grid cell is on land</span><br></blockquote><blockquote type="cite"><span>B = Buffer around outbreaks with radius r (tbd: minimum distance between outbreaks and random non-outbreaks)</span><br></blockquote><blockquote type="cite"><span>D = L / B (difference  "L without B „ = country on which a random non-outbreak can lay)</span><br></blockquote><blockquote type="cite"><span>Thank you so much!!!!!!!</span><br></blockquote><blockquote type="cite"><span>_______________________________________________</span><br></blockquote><blockquote type="cite"><span>Qgis-user mailing list</span><br></blockquote><blockquote type="cite"><span>Qgis-user@lists.osgeo.org</span><br></blockquote><blockquote type="cite"><span>List info: https://lists.osgeo.org/mailman/listinfo/qgis-user</span><br></blockquote><blockquote type="cite"><span>Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user</span><br></blockquote><span>_______________________________________________</span><br><span>Qgis-user mailing list</span><br><span>Qgis-user@lists.osgeo.org</span><br><span>List info: https://lists.osgeo.org/mailman/listinfo/qgis-user</span><br><span>Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user</span><br></div></blockquote></div></div></body></html>