MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Storing Latitude and Longitude in a SQL Server 2005 DB?

This is a discussion on Storing Latitude and Longitude in a SQL Server 2005 DB? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I'm working with SQL Server 2005 and have to store the Lat and Lng for updates coming into the ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  5 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 10-30-2007
OOT OOT is offline
Junior Member
Yellow Belt
 
Join Date: Dec 2006
Posts: 14
Storing Latitude and Longitude in a SQL Server 2005 DB?

I'm working with SQL Server 2005 and have to store the Lat and Lng for updates coming into the server. I was initially thinking of storing them as VarChars but the Decimal option seems better. I've been searching the forums and either I'm using the wrong keywords or the information isn't posted but what I'm looking for are the maximum values that lat and lng can be? Should I define the data type as Decimal(12, or can I go smaller? I just want to make sure that once it's done I won't have to go back and change them so I want to account for whatever the highest/lowest combination is.

Or do you think storing it as a VarChar(12) would be better?

Thanks in advance for any and all help that you can give. It is very much appreciated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 11-01-2007
Junior Member
White Belt
 
Join Date: Jul 2003
Posts: 9
Re: Storing Latitude and Longitude in a SQL Server 2005 DB?

I use Decimal(18,15) for storing them, since you need a high accuary (decimal places). Varchar is never a good choice for storing numbers.

Bernhard
__________________
Bernhard Heuschneider
Zirl, Austria
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 11-01-2007
OOT OOT is offline
Junior Member
Yellow Belt
 
Join Date: Dec 2006
Posts: 14
Re: Storing Latitude and Longitude in a SQL Server 2005 DB?

Quote:
Originally Posted by C72831 View Post
I use Decimal(18,15) for storing them, since you need a high accuary (decimal places). Varchar is never a good choice for storing numbers.

Bernhard
Thank you for that. I thought going the varchar route would be a mistake. I didn't realize that the lat/lng number would be that high. Thank you for the information ... now I'm off to edit my database
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/storing-latitude-longitude-sql-server-2005-db-6659.html

Posted By For Type Date
Apple Blog » Blog Archive » Storing Latitude and Longitude in a SQL Server 2005 DB? This thread Pingback 11-05-2007 04:57 PM
Create 3D Map Video - Win a Free Zune from Microsoft - MapPoint News - MP2K Magazine This thread Refback 11-05-2007 06:48 AM
Merging Multiple Routes - MapPoint Articles - MP2K Magazine This thread Refback 11-04-2007 04:16 PM
Determing Whether A Point Is Located Inside Polygon - MapPoint Articles - MP2K Magazine This thread Refback 11-02-2007 07:42 AM
Programming MapPoint via .NET - MapPoint Articles - MP2K Magazine This thread Refback 11-02-2007 07:38 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Geocode your data directly from SQL Server 2005 Johannes Kebeck's Blog Virtual Earth Blogs 0 09-15-2007 03:25 PM
How to get latitude and longitude ma2005pp MapPoint 2006/2009 Discussion 3 09-28-2005 01:57 AM
Latitude and Longitude virgilar MapPoint 2006/2009 Discussion 1 03-21-2005 01:01 PM
Latitude and Longitude Anonymous MapPoint 2006/2009 Discussion 1 11-25-2003 12:52 PM
NMEA latitude/longitude and mappoint latitude/longitude muurman MapPoint 2006/2009 Discussion 3 11-22-2003 04:42 AM


All times are GMT -5. The time now is 07:51 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5
MP2K Magazine
Visitor Map

Catered Chalet Ski Holidays
Looking for catered chalet ski holidays? Your search is over! Here at Holiday Hypermarket you can choose your style of accommodation with ease.

Travel Counsellors
Travel Counsellors are an award winning Travel Agent. Have a personal Travel Counsellor help with your travel plans.

Jamaica Holidays
Jamaica Holidays can include world class business hotels, upscale shopping and top entertainment and dining. Alternatively, hit the beach or hike in the hills. Book online with us.

Nile Cruises
Nile cruises are one of the best ways to discover the riches of Egypt. See ancient ruins and lush verdure from the River Nile. Book today!

Turkey
Before booking a holiday to Turkey check out the ULookUBook travel guide. Find out about the rich culture in Turkey before you go there to help you to make the most of your holiday.

Cheap holiday comparison
Travel.co.uk is a comparison service which makes it easy to search and find your cheap holiday options.

Cheap Portugal Holidays
Hotels of all ratings! Find information on cheap Portugal holidays at On The Beach!


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53