SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


geometry data type convert to longitude & latitude doesn't make sense


geometry data type convert to longitude & latitude doesn't make sense

Author
Message
snomadj
snomadj
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3321 Visits: 802
This isn't a biggie but it's bugging me so any input appreciated.

I have a valid GEOMETRY value.

I run:
SELECT @myGeoVal.STX AS longitude

It outputs -222222.222222222

Not all in twos but you get the gist. My question is:

Why so many numbers! I thought the max longitude would be 90 non?


Eirikur Eiriksson
Eirikur Eiriksson
SSC Guru
SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)

Group: General Forum Members
Points: 154575 Visits: 22798
snomadj - Wednesday, January 24, 2018 5:00 AM
This isn't a biggie but it's bugging me so any input appreciated.

I have a valid GEOMETRY value.

I run:
SELECT @myGeoVal.STX AS longitude

It outputs -222222.222222222

Not all in twos but you get the gist. My question is:

Why so many numbers! I thought the max longitude would be 90 non?


You are mixing geometry and geography, the first one is on a flat plane and the other models the earth....
Cool

snomadj
snomadj
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3321 Visits: 802
Bugger. I will get back to the drawing board. Cheers for the reply. All this spatial stuff is a brave new world for me atm.
Eirikur Eiriksson
Eirikur Eiriksson
SSC Guru
SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)

Group: General Forum Members
Points: 154575 Visits: 22798
You are welcome!
Cool
Alastair Aitchison has written some books on the subject, worth the reading.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search