2

enter image description here

In QGIS I have some shapefile describing the distribution of an animal, these file have an attribute name "PRESENCE" with value 1. There are points when only one file is present and other where there are more.

My goal is to create a new layer (I think it's should be a raster) representing the sum of all the "PRESENCE" attributes for every point. I've tried using the function "Join attributes by location" but it doesn't seem working.

The image is showing how my files look and the attributes table.

Can you help me?

3
  • Can you add a screenshot showing you data?'
    – BERA
    Apr 24 '20 at 18:25
  • If join attributes by location doesn't work, the points are probably not in exactly the same location. Try using the snap to grid or snap to layer tool to make the point locations identical.
    – csk
    Apr 24 '20 at 19:21
  • I added the photo, it's useful?
    – MilosVf
    Apr 24 '20 at 20:47
1

A raster is the right concept, but my guess it will be easier to work with a vector grid. Consider creating a new hexagon grid and "updating by spatial location" the attributes of the new grid with each of the point layers. Obviously the size of your grid will determine how frequently you get "presence points" vs the scale of the whole study area.


EDIT

My apologies, the tool is called JOIN ATTRIBUTES by location from the VECTOR menu. The JOIN in the name is an unfortunate wording considering it's use elsewhere describing a dynamic join in a project. In this case it is a one-off relationship only whilst the function is being executed. And then unfortunately there is a multitude of options about the spatial part which really are best tested by trial and error... (i.e. I don't know what they all mean!) (if you seek a full a description of these functions it is somewhere in the GRASS wiki/help). A tutorial along similar lines is here; https://www.qgistutorials.com/en/docs/3/performing_spatial_joins.html

See below how it looks on my machine; (note the CRS/SRID/EPSG are both the same, as you get into more complex tools, QGIS tends not to support On The Fly Reprojection)

Update Attributes

1
  • 1
    Thanks, it's exactly what I wanted, I'm having trouble updating the hexagon values. I used Vector -> Analysis Tools -> Counts points in polygon but it doesn't make any difference. What do you meant with "updating by spatial location"? Thanks a lot for your help
    – MilosVf
    Apr 27 '20 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.