TransWikia.com

Using transform function in QGIS layer geometry generator?

Geographic Information Systems Asked on January 24, 2021

I’m trying to use the following expression in the geometry generator in a QGIS layer to show a 1-mi boundary around points:

buffer(transform($geometry, 'EPSG:4326', 'EPSG:102654'), 5280)

However, the buffer doesn’t show

To test, if I transform to the source to and from EPSG:4326, the buffer does work (but obviously doesn’t display correctly).

What is it about the EPSG:2877 I’m using that is causing the problem?

One Answer

I can confirm this behavior, also in the latest 3.14. It is independet of the used CRS, if a buffer shows it is always in the original CRS, but most times just no buffer at all is shown. However, the expression should be correct. Also using centroid() or others within the actual expression doesnt change things. I am afraid only a developer could answer why this happens.

However, as a workaround you could use a virtual layer using a query such as

select st_buffer(st_transform(layer.geometry,102654),5280) as geom from layer

Answered by MrXsquared on January 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP