nimdraal Posted July 9, 2013 Share Posted July 9, 2013 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? 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. Link to comment https://forums.phpfreaks.com/topic/280007-storing-coordinates-in-sql/#findComment-1440731 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.