cancel
Showing results for
Search instead for
Did you mean:
Advocate II

## Use GPS coordinate to get Lat and Long

Hello Team,

I have a SharePoint column with GPS coordinates (53°22'16.9"N 6°08'58.8"E). How do i convert this to Lat and long so that i can use it in powerapps.

Regards,

Utsav

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support

Could you please share a bit more about your scenario?

Do you want to convert the GPS coordinates (53°22'16.9"N 6°08'58.8"E) into Lat and long value within an app?

If you want to convert the convert the GPS coordinates (53°22'16.9"N 6°08'58.8"E) into Lat and long value within an app within an app, I afraid that there is no way to achieve your needs in PowerApps currently.

Currently, there is no function or connector supported in PowerApps to convert the convert the GPS coordinates (53°22'16.9"N 6°08'58.8"E) into corresponding Lat and long value. If you would like this feature to be added in PowerApps, please consider submit an idea to PowerApps Ideas Forum:
https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

As an alternative solution, you could consider convert the GPS coordinates (53°22'16.9"N 6°08'58.8"E) into Lat and long value using the following expression:

``Latitude/Longitude = D + ((S/60)+M)/60``

Where D and M and S are the values that compose the DMS format : D°M'S''

Please check the following article for more details:

https://stackoverflow.com/questions/6945008/converting-latitude-longitude-valuesdmscompass-direction...

On your side, please take a try with the following workaround:

Add a Gallery control in your app, set the Items property to your SP List data source. Add a Label control in the Gallery, set the Text property to following:

``````(Value(Trim(Last(FirstN(Split(Substitute(Substitute(Substitute(First(Split(ThisItem.GPSText," ")).Result, "°","/"), "'","/"), """","/"), "/"),3)).Result))/60 +
Value(Trim(Last(FirstN(Split(Substitute(Substitute(Substitute(First(Split(ThisItem.GPSText," ")).Result, "°","/"), "'","/"), """","/"), "/"),2)).Result)))/60 +
Value(Trim(Last(FirstN(Split(Substitute(Substitute(Substitute(First(Split(ThisItem.GPSText," ")).Result, "°","/"), "'","/"), """","/"), "/"),1)).Result)) &
", "
&(Value(Trim(Last(FirstN(Split(Substitute(Substitute(Substitute(Last(Split(ThisItem.GPSText," ")).Result, "°","/"), "'","/"), """","/"), "/"),3)).Result))/60 +
Value(Trim(Last(FirstN(Split(Substitute(Substitute(Substitute(Last(Split(ThisItem.GPSText," ")).Result, "°","/"), "'","/"), """","/"), "/"),2)).Result)))/60 +
Value(Trim(Last(FirstN(Split(Substitute(Substitute(Substitute(Last(Split(ThisItem.GPSText," ")).Result, "°","/"), "'","/"), """","/"), "/"),1)).Result))``````

Note: The GPSText column represents the column in your SP List to store the GPS coordinates value. Please make sure you use Text type column rather than Location type column to store the GPS coordinates value in your SP List. If you use Location type column to store the GPS coordinates value, you could not access the "GPS Column: Coordinate" value within your app.

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Super User II
1. Split on N or S with Split function then get first result
2. Split on W or E with Split function then get first result

Then, for #1:

1. Split on ° then get first result (53)
2. Split on ' then get first result (22)
1. take this result (22) and divide by 60
3. Split on " then get first result (16.9)
1. take this result (16.9) and divide by 3600
4. Add 53 + (22/60) + (16.9/3600) and then you have your result for Latitude
5. Repeat the above for the Longitude

Hope this initial summary and pseudocode above helps.

Community Support

Could you please share a bit more about your scenario?

Do you want to convert the GPS coordinates (53°22'16.9"N 6°08'58.8"E) into Lat and long value within an app?

If you want to convert the convert the GPS coordinates (53°22'16.9"N 6°08'58.8"E) into Lat and long value within an app within an app, I afraid that there is no way to achieve your needs in PowerApps currently.

Currently, there is no function or connector supported in PowerApps to convert the convert the GPS coordinates (53°22'16.9"N 6°08'58.8"E) into corresponding Lat and long value. If you would like this feature to be added in PowerApps, please consider submit an idea to PowerApps Ideas Forum:
https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

As an alternative solution, you could consider convert the GPS coordinates (53°22'16.9"N 6°08'58.8"E) into Lat and long value using the following expression:

``Latitude/Longitude = D + ((S/60)+M)/60``

Where D and M and S are the values that compose the DMS format : D°M'S''

Please check the following article for more details:

https://stackoverflow.com/questions/6945008/converting-latitude-longitude-valuesdmscompass-direction...

On your side, please take a try with the following workaround:

Add a Gallery control in your app, set the Items property to your SP List data source. Add a Label control in the Gallery, set the Text property to following:

``````(Value(Trim(Last(FirstN(Split(Substitute(Substitute(Substitute(First(Split(ThisItem.GPSText," ")).Result, "°","/"), "'","/"), """","/"), "/"),3)).Result))/60 +
Value(Trim(Last(FirstN(Split(Substitute(Substitute(Substitute(First(Split(ThisItem.GPSText," ")).Result, "°","/"), "'","/"), """","/"), "/"),2)).Result)))/60 +
Value(Trim(Last(FirstN(Split(Substitute(Substitute(Substitute(First(Split(ThisItem.GPSText," ")).Result, "°","/"), "'","/"), """","/"), "/"),1)).Result)) &
", "
&(Value(Trim(Last(FirstN(Split(Substitute(Substitute(Substitute(Last(Split(ThisItem.GPSText," ")).Result, "°","/"), "'","/"), """","/"), "/"),3)).Result))/60 +
Value(Trim(Last(FirstN(Split(Substitute(Substitute(Substitute(Last(Split(ThisItem.GPSText," ")).Result, "°","/"), "'","/"), """","/"), "/"),2)).Result)))/60 +
Value(Trim(Last(FirstN(Split(Substitute(Substitute(Substitute(Last(Split(ThisItem.GPSText," ")).Result, "°","/"), "'","/"), """","/"), "/"),1)).Result))``````

Note: The GPSText column represents the column in your SP List to store the GPS coordinates value. Please make sure you use Text type column rather than Location type column to store the GPS coordinates value in your SP List. If you use Location type column to store the GPS coordinates value, you could not access the "GPS Column: Coordinate" value within your app.

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

## Helpful resources

Announcements

#### Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

#### Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

#### Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

#### Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,047)