[QGIS-Developer] Geometry generator expression for line segment length

Anita Graser anitagraser at gmx.at
Sat Nov 23 02:29:32 PST 2019


Fixing the code prefix fixed the issue. Thanks Nyall!

Ad proj build: funnily enough, QGIS aboug says "Running against PROJ Rel.
7.0.0, March 1st, 2020"  ... Welcome to the future!

Anita

On Mon, Nov 18, 2019 at 9:36 AM Anita Graser <anitagraser at gmx.at> wrote:

>
>
> On Mon, Nov 18, 2019 at 4:40 AM Nyall Dawson <nyall.dawson at gmail.com>
> wrote:
>
>> On Fri, 15 Nov 2019 at 05:34, Anita Graser <anitagraser at gmx.at> wrote:
>> >
>> > Hi,
>> >
>> > I recently noticed that the expression I used in
>> https://anitagraser.com/2016/10/09/movement-data-in-gis-2-visualization/
>> does not work in current QGIS versions anymore. Specifically, I computed
>> the metric length of a line segment by transforming from WGS84 'EPSG:4326'
>> to 'EPSG:54027':
>> >
>> > length(
>> >       transform(
>> >         geometry_n($geometry, at geometry_part_num),
>> >         'EPSG:4326','EPSG:54027'
>> >         )
>> >     )
>> >
>> > While debugging, I found that the transformation is not applied
>> anymore. (Some other EPSG codes do work though.) However, I couldn't figure
>> out how to get this transformation to work again.
>>
>> Is this a proj 6 based build? In any case, EPSG:54027 doesn't exist.
>> The correct code is "ESRI:54027" (see https://epsg.io/54027).
>
>
> Good catch, different four letters starting with E! The issue appeared on
> OSGeo4W so I'll have to check if that means proj6 already. Anyway, I'll
> give the other code a try!
>
> Thanks
> Anita
>
>
>
>
>> It's
>> possible that < proj 6 builds had some exception in place for this
>> particular CRS, but with a proj 6 based build we rely on proj to
>> interpret CRS auth/id pairs so any exceptions in place for earlier
>> QGIS versions won't apply anymore.
>>
>> Nyall
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20191123/33d84637/attachment.html>


More information about the QGIS-Developer mailing list