-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geometry generator inside Point Cluster style uses project CRS instead of layer CRS #26660
Comments
Author Name: Tom Chadwin (@tomchadwin) Confirmed. This results in geometry expression functions operating differently on a clustered layer to an unclustered layer (as far as I can tell). |
Author Name: Tom Chadwin (@tomchadwin)
|
Author Name: Tom Chadwin (@tomchadwin) In the project I attached, the red features are non-clustered geometry generators, and have the correct appearance - the geometry generator draws a square around the point in the layer's CRS (EPSG:27700). When rendered in the project's CRS (EPSG:4326), it has the correct projected "perspective". The blue and yellow squares are point-clustered - blue is feature, yellow is cluster. If the same geometry generator expression is used, the features are in the wrong location. They can be moved to the correct location (as I've done in the attached project), by wrapping the generator expression as follows: transform(<generator_expression>, <project_crs>, <layer_crs>) That moves the features into the correct location. However, it means that the square drawn by the generator appears unprojected - it's still a rotated square, and has not been transformed to the correct projected perspective. In addition, in the generator expression to draw the square, I have to change from layer CRS units to project CRS units. I find this hard to understand, since I am combining the latlng unit distances with $x and $y, and the latter are in metres. I hope this explanation makes some sense - my lack of confidence with projection means I struggle to identify if this is a bug, but I certainly cannot achieve what I want to, and what I can achieve without a cluster. |
@mstuyts @tomchadwin the original issue seems fixed to me. In a project with CRS 4326 and a point layer in a project CRS then in the context of the cluster renderer
returns projected coordinates. However... while this
works fine in a normal symbology, in the context of the cluster renderer the isolated points are a no show. Can you confirm? |
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". |
While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue. |
Author Name: Michel Stuyts (@mstuyts)
Original Redmine Issue: 18773
Affected QGIS version: 3.0.1
Redmine category:symbology
This problem occurs when the project CRS is different from the point layer CRS.
Steps to reproduce with Single symbol style:
+Result:+
The points are created on the same place as if a Simple marker style was used (this is the expected result). If the expression is changed to geom_to_wkt($geometry) in the Expression Dialog box, the Output Preview shows coordinates in EPSG:31370, so the points are generated in the CRS of the original points layer.
Steps to reproduce with Point Cluster style (geometry generator on original points):
PART 1
+Result:+
The Cluster points are created near the place of the points where a Simple marker style would place the points, but the points created by the Geometry generator are not visible near the cluster points. If the expression is changed to geom_to_wkt($geometry) in the Expression Dialog box, the Output Preview shows coordinates in EPSG:4326, so the points are generated in the CRS of project.
PART 2
+Result:+
The Cluster points and original points are created near the place of the points like when a Simple marker style was used. Inside the Point Cluster style this counterintuitive expression is needed to get the points at the correct place.
A similar problem occurs when the Geometry Generator is applied on the Cluster Markers instead of on the original points.
Steps to reproduce with Point Cluster style (geometry generator on cluster points):
PART 1
+Result:+
The original points are created on the same place as if a Simple marker style was used. The Cluster points are created near the place where the 0,0 coordinates in EPSG:31370 are (north of Paris), because the coordinates in EPSG:4326 are much smaller than the coordinates in EPSG:31370.
PART 2
+Result:+
The Cluster points and original points are created near the place of the points like when a Simple marker style was used. Inside the Point Cluster style this counterintuitive expression is needed to get the Cluster points at the correct place.
The text was updated successfully, but these errors were encountered: