Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Display longitude / latitude from geography datatype

Posted on 2013-01-28
4
Medium Priority
?
653 Views
Last Modified: 2013-01-29
How do I Display longitude / latitude from a geography datatype??
0
Comment
Question by:HLRosenberger
  • 2
  • 2
4 Comments
 
LVL 40

Expert Comment

by:lcohan
ID: 38828303
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 38828334
that's the opposite.  I already have the geography data.  I want a simple query that displays the longitude / latitude based on the geography data.
0
 
LVL 40

Accepted Solution

by:
lcohan earned 2000 total points
ID: 38828650
Yes, is just the opposite of the same function like:


DECLARE @gstring geography;
SET @gstring = geography::STLineFromText('LINESTRING(-122.360 47.656, -122.343 47.656 )' , 4326);
SELECT @gstring.STPointN(1).ToString(), @gstring.STPointN(2).ToString();

http://msdn.microsoft.com/en-us/library/bb895372(v=sql.100).aspx

"Spatial Data Types Overview"
http://msdn.microsoft.com/en-us/library/bb964711.aspx
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 38831423
Thanks
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Loops Section Overview

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question