One issue that can occur (experienced it) is that you have self intersecting lines (lines that go back on itself).
The LengthCalculator will calculate the length of the line (including the not visible overlapping parts).
Hi @lianaolianov, in my observation, the LengthCalculator works fine on your sample Shapefile dataset. Just be aware the unit of the resulting length will be the same as the unit of distance in the coordinate system. Since the coordinate system of your dataset is LL-WGS84 (latitude, longitude), the unit of distance is degrees. If you need to get the length in other unit (e.g. meters), you will have to transform the geometry into an appropriate coordinate system before calculating the length.
Hi @lianaolianov, in my observation, the LengthCalculator works fine on your sample Shapefile dataset. Just be aware the unit of the resulting length will be the same as the unit of distance in the coordinate system. Since the coordinate system of your dataset is LL-WGS84 (latitude, longitude), the unit of distance is degrees. If you need to get the length in other unit (e.g. meters), you will have to transform the geometry into an appropriate coordinate system before calculating the length.
I have changed my projection's system unit and everything works fine.
Thank you very much.
There's also the GeographicLengthCalculator custom transformer on the FME Hub which will do all the work for you.
I assume you want the lengths of the 4 road segments? Note that you're not supposed to calculate lengths in a geographic coordinate system (like the WGS84 you're using). Always use a projected coordinate system, because only then the values will be correct. It's a matter of measuring distances on the right ellipsoid and datum. Using the Reprojector and setting it to EPSG:26191, I get values for the roads that are 20000 metres or more.
Also, when looking at the dataset and taking it through a GeometryValidator, I get errors in the data (_issues{0}.issue_found (string): Self-Intersections in 2D). It could be good to clean the data first, before you keep using this file.