2

While using the Vector->Data Management Tools->Join Attributes by Location process, and following this great tutorial on spatial joins. (http://www.qgistutorials.com/de/docs/performing_spatial_joins.html) I tried to create the sum of pumping rates from all the well (points) located within a feature (grid polygons). See image:

Each point has a monthly pumping rate

After using the Join attributes by Location feature, I can generate the grid cells with the "sum". The cells are in the correct locations

However, this sum is completely wrong. for most of the cells created, the sum is zero, and in those cells where it is not (6 out of 170) the number generated seems completely random. I repeated with with other functions like mean, max, etc. and still get nonsensical values. Are there requirements for the "receiving" layer?

What could be the source of this error? And how can I solve it within QGIS?

1
  • 2
    Make sure that both the grid and the point layers have the same projection.
    – ahmadhanb
    Commented Oct 27, 2016 at 8:47

2 Answers 2

3

Just to extend my comment, you have to make sure that both the grid and point layers have the same projection. Spatial reference or projection in GIS in general and QGIS in particular is very important. Seeing both layers overlaying each other correctly does not mean they are in the same location.

0

To add to @ahmadhanb's answer about setting the projections (CRS), note that changing the projection in the layer properties is insufficient, you want to use the Geoprocessing toolkit to "formally" assign the projection - the commands are separate for vector layers and for raster layers: enter image description here

If the projections are different, you would want to reproject one of them into the CRS of the other layer.

1
  • 2
    Please don't use "above" to refer to other Answers. Display order is user-controlled, so it's not a reliable way to describe another post. Instead, refer to the user by posting name.
    – Vince
    Commented Aug 21, 2023 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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