Welcome to WebmasterWorld Guest from 54.226.183.49

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Need to generate correct longitude & latitude .SQL

Need to auto-generate extra coordinate numbers in a .SQL file

     

avery123

4:02 pm on Jul 6, 2014 (gmt 0)




Hi guys,
I'm not fluent in database programming languages, but I am trying to auto-generate some numbers to put in a .sql file.

The numbers I am trying to auto-generate refer to something that are called rad_latitude and rad_longitude in this particular .SQL file.

See example below:

 INSERT INTO `dsb_loc_zips` (`zip_id`, `zipcode`, `fk_country_id`, `fk_state_id`, `fk_city_id`, `latitude`, `rad_latitude`, `longitude`, `rad_longitude`) VALUES

(42789, 'OX1', 217, 63, 212310, 51.729639, 0.9028525214180669, -1.28049, -0.02234876653886219),


51.729639 latitude

0.9028525214180669 rad_latitude

-1.28049 longitude

-0.02234876653886219 rad_longitude

I was able to generate the above code by "manually" entering some location info, including the latitude and longitude numbers into a Admin/CMS area of a website.
... I did not know the "rad_" numbers. The site auto-generated them.

Do you know of any Program, Website or Excel file etc, that by entering a long list of "latitude" and "longitude" numbers... can auto-generate the relevant "rad_latitude" and "rad_longitude" numbers?

Thank you for reading :)

LifeinAsia

4:50 pm on Jul 6, 2014 (gmt 0)

WebmasterWorld Administrator lifeinasia is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Converting degrees to radians (and back again) is fairly basic trigonometry- multiply the number of degrees by pi/180.

avery123

9:58 am on Jul 8, 2014 (gmt 0)



Thank you.
Will look into this...
 

Featured Threads

Hot Threads This Week

Hot Threads This Month