[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

mysql data type for storing latitude and longitude

Posted on 2005-05-10
4
Medium Priority
?
14,027 Views
Last Modified: 2010-08-05
Hello

Please can you tell me what you think would be the most suitable data type for storing latitude and longitude coordinates for the UK in a mysql database. The coordinates are in the form 50.12345 or -2.1234. I am unsure as to whether to use a numerical data type as i do not know how the coordinates behave and if they are true numbers in the sense of the word.

Thanks
Andrea
0
Comment
Question by:andieje
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
imarshad earned 120 total points
ID: 13975010
I am not sure about the datatypes of mySQL but I personally always store Latitude and Longitude as Numeric datatype....

In my MSAcess Tables I store Lat/Long as Data Type: Number  Field Size: Single
In SQL Server I have Lat/Long as Data Type: Float   Length:8
In Oracle I use Float(126)....

and yes your Lat/Long will always remain Numeric (If you donot include the hemisphere info i.e N/S or E/W)

Imran
0
 

Assisted Solution

by:vegaswiz
vegaswiz earned 80 total points
ID: 13975228
I agree with imarshad, and I should add that North is positive, South negative and E Positive, West negative normally and this fist into all the equations I use for Spherical/Cartesian plots as well.

vegaswiz
0
 

Expert Comment

by:vegaswiz
ID: 13975240
oh, one other thing the data type would be Float(10.6) for civil applications. Generally good enough resolution for most any civilian applications.

vegaswiz
0
 

Author Comment

by:andieje
ID: 13976374
thank you both for your help. i tried to split the points even though there weren't many anyway :)
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

I feel like more and more people want to know how to programmatically convert addresses into geospatial locations. So in this article, I will show you how you can do it with Bing Maps. I'm going to use PowerShell, which is a nice scripting language,…
Introduction This article is designed to assist GIS (Geographic Information System) and GPS (Global Positioning System) developers using ESRI ArcGIS and other spatial information management systems.   For the uninitiated the concept of projectio…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Suggested Courses

873 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