Solved

Display longitude / latitude from geography datatype

Posted on 2013-01-28
4
598 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 39

Expert Comment

by:lcohan
Comment Utility
0
 
LVL 1

Author Comment

by:HLRosenberger
Comment Utility
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 39

Accepted Solution

by:
lcohan earned 500 total points
Comment Utility
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
Comment Utility
Thanks
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now