QField icon indicating copy to clipboard operation
QField copied to clipboard

Symbology geometry generator: Index missmatch

Open vincentBenet opened this issue 1 year ago • 4 comments

Describe the issue

On Qgis on a layer, I am using symbology based on the ID of another layer with geometry generator line to make a line based on the ID point of the other layer.

On Qgis this is working well, but on Qfield, the line is going somewhere else (this is OK on only few points)

Reproduction steps

Steps to reproduce the behavior:

  1. Create a first layer named 'sites' of points and place few points.
  2. Create a second layer of linestring geometry with an attribute id_site and place few lines with attribute based on ID of first layer.
  3. On the second layer add on symbology a geometry generator line with following formulla: make_line($geometry, geometry(get_feature_by_id('sites', "id_site"))

Expected behavior

  1. On Qgis you have a line that goes to the corresponding id_site
  2. Load the project on Qfield and you should have same lines

Observed behavior

  1. On Qfield, some lines are not going to the correct id_site, it has changed compared to QGIS.

Screenshots and GIFs

Screenshot_20240707_104634

Desktop (please complete the following information)

  • OS: Windows 10
  • QGIS Version 3.22.0

Mobile (please complete the following information)

  • Device: Honor
  • OS: Android 11
  • QField version: 33603

Additional information

  • Problem started happening recently, didn't happen in an older version of QField: No
  • Problem can be reliably reproduced, doesn't happen randomly: Yes
  • Problem happens with all files and projects, not only some files or projects: Yes

[If the problem happened with QFieldCloud, please add your username and project name.] Custom Qfieldcloud server from fresh build, I can create username if needed

vincentBenet avatar Jul 07 '24 14:07 vincentBenet

Can you try with the layer name instead of id?

m-kuhn avatar Jul 07 '24 14:07 m-kuhn

Can you try with the layer name instead of id?

No, I am using the function get_feature_by_id('sites', "id_site"), but the layer name is included in it.

vincentBenet avatar Jul 07 '24 22:07 vincentBenet

@vincentBenet , if possible, we'd benefit from having a sample project with data that already show the discrepancy between QGIS and QField.

nirvn avatar Jul 08 '24 04:07 nirvn

@nirvn here it is:

Project: peche.zip

Qfield on computer: image

Qfield on phone: WhatsApp Image 2024-07-08 à 09 21 49_f5f6bc7e

QGIS: image

As you observe, on the spot 11, the red arrow line linking acces layer to the spot is not going at the right index on the phone.

Please take in note, that I am using QfieldCloud to transfert project to my phone, this maybe a root source problem...

vincentBenet avatar Jul 08 '24 13:07 vincentBenet