Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When trying to draw a line for Storm Tracks, if a line layer needs to cross from W to E longitude (or vice versa) in the Pacific, the line wraps all the way around the globe instead of connecting by shortest distance. example coordinates and image below:
GeoPoints in this order:
[175,30]
[176,29]
[177,28]
[179,27]
[-178.7,24.6]
produces the following result:
Hi Joe,
It´s occurs cause you´re trying to draw a line between "sides" of a plane world, combining negative and positive values.
In this case you need to calculate the difference between the negative value and 180 and add it to 180.
-178.7 + 180 = 1.3 + 180 = 181.3
So the points wich you need to draw are:
[176, 29],[177, 28], [179, 27], [181.3, 24.6]
Pedro
Can anyone tell me how to fix these "jumps" that occur on my map?
The maps below show 3 small paths at longitudes of interest ( critical longitudes where the "jumps" occur). If the path crosses the longitude discontinuity it "jumps" and takes the long way around the map. The first map shows that it jumps at location 2. If however I apply the transformation outlined in this thread where I add 360, it fixes location 2 but the "jump" moves to location 3. It seems that the jump is just moving no matter how I change my coordinates.
It appears that this transformation has shifted the jump from the (180, -180) latitude line to the (0, 360) latitude line.
The actual data of the paths on the map is:
SmallData:
load * inline
[assetid, latitude, longitude, messagetime
2, 46.7522781 , 163.0435627 , 2019-07-26 02:39:16
2, 47.8609425 , 174.934958 , 2019-07-26 02:39:17
2, 47.9432986 , -179.0895877 , 2019-07-26 02:39:17
2, 46.386769 , -161.746896 , 2019-07-26 02:39:18
3, 30.7522781 , 5 , 2019-07-26 02:39:16
3, 30.8609425 , 1 , 2019-07-26 02:39:17
3, 30.9432986 , -1 , 2019-07-26 02:39:17
3, 30.386769 , -5 , 2019-07-26 02:39:18
4, -15.7522781 , 95 , 2019-07-26 02:39:16
4, -15.8609425 , 91 , 2019-07-26 02:39:17
4, -15.9432986 , 89 , 2019-07-26 02:39:17
4, -15.386769 , 85 , 2019-07-26 02:39:18
];
The map coordinates for the paths are constructed as follows:
Paths:
Load
assetid,
'[' & concat( GeoMakePoint(latitude,
if( longitude < 0 , longitude, longitude))
, ',', messagetime ) & ']' as trail
Resident SmallData
Group By assetid;
Now apply: if( longitude < 0 , longitude + 360, longitude))
See this reply: https://community.qlik.com/t5/Qlik-GeoAnalytics-Discussions/Jumps-in-Line-Layer/m-p/1626102/highligh...
Thanks,
Patric