• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 674
  • Last Modified:

Display longitude / latitude from geography datatype

How do I Display longitude / latitude from a geography datatype??
0
HLRosenberger
Asked:
HLRosenberger
  • 2
  • 2
1 Solution
 
lcohanDatabase AnalystCommented:
0
 
HLRosenbergerAuthor Commented:
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
 
lcohanDatabase AnalystCommented:
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
 
HLRosenbergerAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now