The measure tool measures elipsoidal distances (configurable in the
project properties).

The function length(geometry) returns the length of the argument
(linestring) measured in the plane.

The function $length() returns the length of the current geometry
(linestring) measured in the elipsoid and should be consistent with
the measure tool (same configuration).

You do not want to use length(geometry) unless you are using a local projection.


2018-05-22 11:57 GMT+02:00 Michel Stuyts <michel.stu...@edegem.be>:
> I understand that every projection has a distortion, but I was wondering how 
> the QGIS Measure Tool manages to give results very close to local projections 
> anywhere in the world no matter what project CRS is set, but the length() 
> function can't.
>
> Michel
>
>
> ________________________________
> Van: Micha Silver [tsvi...@gmail.com]
> Verzonden: vrijdag 18 mei 2018 17:41
> Aan: Michel Stuyts; qgis-user
> Onderwerp: Re: [Qgis-user] results Measure Tool vs. length()
>
> Maybe I misunderstood your question, but you *should* expect different 
> length, area and direction calculations when converting from one projection 
> to another. Every projection distorts. Either distance, area, or direction, 
> or some combination. A local projection is designed to minimize distortion 
> for some small section of the planet. So survey measurements in that region 
> will closely match map calculations. But trying to calculate from a layer 
> that's projected to some other projection will always give different results.
>
> (If you already understand the above, I apologize for restating the 
> obvious...)
>
> On 05/18/2018 01:14 PM, Michel Stuyts wrote:
> Thank you very much for the explanation.
>
> When I use 
> length(transform($geometry,layer_property(@layer_id,'crs'),'EPSG:31370')) in 
> Belgium the results are very similar to the result of the Measure Tool, but 
> if use this expression in New York the result is different from the result of 
> the Measure Tool.  It is the other way around if I use 
> length(transform($geometry,layer_property(@layer_id,'crs'),'EPSG:102316')). 
> What kind of projection does the Measure Tool use to calculate a length? 
> Because the results of the Measure Tool seem to be very similar to local 
> projections.
>
>
> Michel
>
>
>
>
>
> Van: Julien Guilloux [mailto:julien.guill...@ecrins-parcnational.fr]
> Verzonden: vrijdag 18 mei 2018 11:01
> Aan: Michel Stuyts <michel.stu...@edegem.be><mailto:michel.stu...@edegem.be>; 
> Springfield Harrison <stellar...@gmail.com><mailto:stellar...@gmail.com>; 
> qgis-user <qgis-user@lists.osgeo.org><mailto:qgis-user@lists.osgeo.org>
> Onderwerp: Re: [Qgis-user] results Measure Tool vs. length()
>
> Hi Michel,
>
> Never use epsg 3857 for measurement beacuse it is not a "projection"...
> this "pseudo projection mercator" 3857, called often "Popular Visualisation"  
> is pseudo.... Because only use for visualization applications.
>
> example in France :  3200 km for a road for example, instead of 2100 km in a 
> real projection (as local zone UTM or a Lambert projection)
>
>
> So, you can use qgis, esri, postgis etc... the measurment with 3857 will be 
> always bad, due to a "false" calcul from origine 0,0 (equateur cross 
> greenwich) and "false" ellipoide etc....
>
> best regards,
> Julien
>
> have a look on :
> http://spatialreference.org/ref/sr-org/6864/
>
> ________________________________
> [Afbeelding verwijderd door afzender.]
>
>   [Afbeelding verwijderd door afzender.]
>
> Julien-Pierre GUILLOUX
> Chargé de mission Eau, Forêt, Natura 2000, coordinateur des 
> porter-à-connaissance
>
> Parc national des Écrins
> 04 92 40 20 56 / 06 99 77 38 26
> www.ecrins-parcnational.fr<http://www.ecrins-parcnational.fr/>
>
>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org<mailto:Qgis-user@lists.osgeo.org>
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
> --
> Micha Silver
> Ben Gurion Univ.
> Sde Boker, Remote Sensing Lab
> cell: +972-523-665918
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to