cancel
Showing results for
Did you mean:

## 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

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...

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
Most Valuable Professional
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

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...

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.

Announcements

#### April 4th Copilot Studio Coffee Chat | Recording Now Available

Did you miss the Copilot Studio Coffee Chat on April 4th? This exciting and informative session with Dewain Robinson and Gary Pretty is now available to watch in our Community Galleries!   This AMA discussed how Copilot Studio is using the conversational AI-powered technology to aid and assist in the building of chatbots. Dewain is a Principal Program Manager with Copilot Studio. Gary is a Principal Program Manager with Copilot Studio and Conversational AI. Both of them had great insights to share with the community and answered some very interesting questions!     As part of our ongoing Coffee Chat AMA series, this engaging session gives the Community the unique opportunity to learn more about the latest Power Platform Copilot plans, where we’ll focus, and gain insight into upcoming features. We’re looking forward to hearing from the community at the next AMA, so hang on to your questions!   Watch the recording in the Gallery today: April 4th Copilot Studio Coffee Chat AMA

#### Tuesday Tip: Blogging in the Community is a Great Way to Start

Top Solution Authors
Top Kudoed Authors
Users online (6,151)