Getting distance between two points based on latitude/longitude

I tried implementing this formula: http://andrew.hedges.name/experiments/haversine/ The aplet does good for the two points I am testing: Yet my code is not working. from math import sin, cos, sqrt, atan2 R = 6373.0 lat1 = 52.2296756 lon1 = 21.0122287 lat2 = 52.406374 lon2 = 16.9251681 dlon = lon2 – lon1 dlat = lat2 – lat1 … Read more

This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console

I have a latitude, and longitude : “-27.0000,133.0000”. I want produce a map base on that. I’ve tried go to this link https://maps.googleapis.com/maps/api/geocode/json?latlng=-27.0000,133.0000&key=****** I keep getting this error on the browser { “error_message” : “This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console: … Read more

What datatype to use when storing latitude and longitude data in SQL databases? [duplicate]

This question already has answers here: What is the ideal data type to use when storing latitude / longitude in a MySQL database? (21 answers) Closed 6 years ago. When storing latitude or longitude data in an ANSI SQL compliant database, what datatype would be most appropriate? Should float be used, or decimal, or …? … Read more