In the QGIS attribute form, I'm trying to convert from NAD83/BC Albers (EPSG:3005) to WGS84 / Pseudo-Mercator (EPSG 4326) with the following code:
format_number(
y(
transform(
$geometry,
'EPSG:3005',
'EPSG:4326'
)
),
6
)
The process works but I'm getting incorrect coordinates returned. I use identical code lines to successfully transform other CRSs, but obviously I'm messing something up here. I've attached a screengrab that previews the properly formatted resultant 44.199697° that should be more like 49.920942°
Best Answer
Make sure that the assigned CRS is set to EPSG:3005 and correct the value of your target EPSG.
You should put this as a default values for your lon/lat fields, respectively :