3

enter image description here

enter image description here

I am trying to count points within polygons (311 calls by Census tract). Both shapefiles are EPSG:4326, and I've done define projection just to double-check.

Every time I run "Join attributes by location (summary)" all values come back NULL. If not the projection, what else can cause this, or, if it is the projection, what else can I do to check?

4
  • can you post some screenshots or something to be sure you assigned the right things?
    – PieterB
    Apr 19, 2019 at 11:16
  • May be you uncheked PREDICATE or trying to Join layers in incorrect order (target and join) ?
    – Sergey N
    Apr 19, 2019 at 11:22
  • Just added screenshots. I noticed that the code says 'SUMMARIES' : [0] } even though it shows I selected an element. Maybe that's it?
    – Rosalie
    Apr 19, 2019 at 11:28
  • Update: I tried using a different summary measure 'Unique' instead of Count, and it returned all 1s, which is accurate (the field has only one value). So why can it recognize that but not count?
    – Rosalie
    Apr 19, 2019 at 14:34

2 Answers 2

1

I needed to use both intersect and within. Even though all the points were within a polygon zoomed in far enough, it wasn't capturing them for some reason.

1
  • 2
    I tested on Windows with QGIS 3.6.1, and it made no difference whether I chose "within" or "intersect" for the geometry predicate. It looks you're on a Mac, and for a while QGIS had a number of Mac-specific bugs. I think you should report this as a bug at issues.qgis.org.
    – csk
    Apr 19, 2019 at 18:19
1

Did you check your columns that need calculation are set as int or float type? In my case, I got NULL because all the columns that I wanted to get calculated summary were string types, so I changed its data types and it worked.

1
  • Good point. In this case I think polygons can't be within points. But if you can't make some maths on strings seems ok to me. Nov 14, 2022 at 2:12

Your Answer

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

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