GPS split in latitude and longitude

Post your questions and help other users.

Moderator: Martin

Post Reply
Multimania
Posts: 11
Joined: 19 Nov 2013 12:37

GPS split in latitude and longitude

Post by Multimania » 24 Nov 2013 20:47

Hello,

it is posible to split the variable location in latitude and logitude?

I need it in two variables.

Thanks.

Martin!
Posts: 31
Joined: 26 Oct 2013 18:00

Re: GPS split in latitude and longitude

Post by Martin! » 24 Nov 2013 21:55

Maybe you could use the split function?
List split(String s, String pattern)
Splits the string s into a list of strings by using the regular expression pattern as the delimiter.

pat2net
Posts: 85
Joined: 01 May 2013 09:18

Re: GPS split in latitude and longitude

Post by pat2net » 25 Nov 2013 07:02

I made a script for you to do it. Maybe there is an easiest way but it work.

http://automagic4android.com/flow.php?i ... 859f6b5854

Multimania
Posts: 11
Joined: 19 Nov 2013 12:37

Re: GPS split in latitude and longitude

Post by Multimania » 25 Nov 2013 09:51

pat2net wrote:I made a script for you to do it. Maybe there is an easiest way but it work.

http://automagic4android.com/flow.php?i ... 859f6b5854
Thanks, but it does not work.

Multimania
Posts: 11
Joined: 19 Nov 2013 12:37

Re: GPS split in latitude and longitude

Post by Multimania » 25 Nov 2013 10:09

Multimania wrote:
pat2net wrote:I made a script for you to do it. Maybe there is an easiest way but it work.

http://automagic4android.com/flow.php?i ... 859f6b5854
Thanks, but it does not work.
getElement({lat}),1); and getElement({lon}),1); does not work.

Martin!
Posts: 31
Joined: 26 Oct 2013 18:00

Re: GPS split in latitude and longitude

Post by Martin! » 25 Nov 2013 11:36

The script seems to contain some errors. Try this instead:
http://automagic4android.com/flow.php?i ... 862e287485

I'm using the following script to get latitude and longitude from the location variable:

Code: Select all

loc = split("{location,locationformat,decimal}", ",");
latitude = getElement({loc}, 0);
longitude = getElement({loc}, 1);

pat2net
Posts: 85
Joined: 01 May 2013 09:18

Re: GPS split in latitude and longitude

Post by pat2net » 25 Nov 2013 12:07

I try it again and it work for me but I'm using the evaluation version of Automagic. Anyway I think the solution by Martin! is more simple then mine and it seem to work for everybody!

Multimania
Posts: 11
Joined: 19 Nov 2013 12:37

Re: GPS split in latitude and longitude

Post by Multimania » 26 Nov 2013 07:15

Martin! wrote:The script seems to contain some errors. Try this instead:
http://automagic4android.com/flow.php?i ... 862e287485

I'm using the following script to get latitude and longitude from the location variable:

Code: Select all

loc = split("{location,locationformat,decimal}", ",");
latitude = getElement({loc}, 0);
longitude = getElement({loc}, 1);
Hi,

thanks. i have found the same way!

It works fine and fast ;-)

Post Reply