nimdraal Posted July 9, 2013 Share Posted July 9, 2013 (edited) Hi I have basically two quesitons. 1: For decimal coordinates. normaly like 56.230943 but in extreme cases -102.1323123 or the previous number but positive. I am currently using double (11, 8 Is that the best option? 2: When I store coordinates in another format. Like this "58°1′57.35″N". How shall I do to get that exact string from the form at the webpage to get stored in the right format in the database? I have read about spatial extensions... But I get the impression that I should learn to walk before I start to run... right? Edited July 9, 2013 by nimdraal Quote Link to comment https://forums.phpfreaks.com/topic/280007-storing-coordinates-in-sql/ Share on other sites More sharing options...
fenway Posted July 15, 2013 Share Posted July 15, 2013 1. I see no reason to not use DECIMAL -- no need to worry about floating-point errors in recent versions of MySQL. 2. Never store formatted data -- you can always format it on the way out. Quote Link to comment https://forums.phpfreaks.com/topic/280007-storing-coordinates-in-sql/#findComment-1440731 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.