0

I am trying to use the QGIS Model Designer to add a count of points within a polygon to the polygon layer. The field existing already in the layer.

I can get the Model Designer to count the points OK, but none of the options I select in the Field Calculator algorithm actually add the count to the existing layer. I am using Field Calculator. The Input layer is set to Using Model Input and is selecting the polygon layer. In Field Name I have manually entered the field name that is to have the count of points entered into it. The Formula is set to being the output from the Count Points in Polygon algorithm. There are no entries in the other boxes. When I run it, it says that it has run OK but no data is added to the attributes

5
  • 1
    Please be more specific when it comes to your attempts of achieving your goal. What exactly have you tried? What expressions did you use, what was the outcome?
    – Erik
    May 2 at 10:54
  • I am using Field Calculator. The Input layer is set to 'Using Model Input' and is selecting the polygon layer. In 'Field Name' I have manually entered the field name that is to have the count of points entered into it. The 'Formula' is set to being the output from the Count Points in Polygon algorithm. There are no entries in the other boxes. When I run it, it says that it has run OK but no data is added to the attributes
    – Sean K
    May 2 at 12:35
  • 1
    Please Edit the Question to contain any clarifications requested in comments. It's not fair to those who would help by making them read a long comment log to understand what is being asked.
    – Vince
    May 2 at 12:47
  • 1
    Please provide the exact settings and expression.
    – Erik
    May 2 at 13:13
  • Related gis.stackexchange.com/a/460488/276 for visual on how to use the field calculator to update in model designer. make sure your projection is the same for all layers.
    – Mapperz
    May 2 at 21:16

0

Your Answer

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

Browse other questions tagged or ask your own question.