geocoding

Google Geocoding v2 API stopped working suddenly

我是研究僧i 提交于 2019-11-26 06:07:26
问题 The Geocoding v2 API stopped unexpectedly. e.g. http://maps.google.com/maps/geo?q=27703&output=json&key=AIzaSyBVr3n3IVZzakGvtIWeRaJEXsC63JHZ0w8 I\'m not able to get lat,long from the API. The output from server is: { \"Status\": { \"code\": 610, \"request\": \"geocode\" } } I searched for status: 610 but could not find any relevant info. Thanks. 回答1: The service has been stopped. It is the 8th of March. See the top of this page for information on the death of v2 See The Google Geocoding API

Calculating Distance between two Latitude and Longitude GeoCoordinates

萝らか妹 提交于 2019-11-26 06:03:08
I'm calculating the distance between two GeoCoordinates. I'm testing my app against 3-4 other apps. When I'm calculating distance, I tend to get an average of 3.3 miles for my calculation whereas other apps are getting 3.5 miles. It's a big difference for the calculation I'm trying to perform. Are there any good class libraries out there for calculating distance? I'm calculating it like this in C#: public static double Calculate(double sLatitude,double sLongitude, double eLatitude, double eLongitude) { var radiansOverDegrees = (Math.PI / 180.0); var sLatitudeRadians = sLatitude *

Measuring the distance between two coordinates in PHP

五迷三道 提交于 2019-11-26 05:52:55
Hi I have the need to calculate the distance between two points having the lat and long. I would like to avoid any call to external API. I tried to implement the Haversine Formula in PHP: Here is the code: class CoordDistance { public $lat_a = 0; public $lon_a = 0; public $lat_b = 0; public $lon_b = 0; public $measure_unit = 'kilometers'; public $measure_state = false; public $measure = 0; public $error = ''; public function DistAB() { $delta_lat = $this->lat_b - $this->lat_a ; $delta_lon = $this->lon_b - $this->lon_a ; $earth_radius = 6372.795477598; $alpha = $delta_lat/2; $beta = $delta_lon

Calculate distance between Zip Codes… AND users.

♀尐吖头ヾ 提交于 2019-11-26 04:17:16
问题 This is more of a challenge question than something I urgently need, so don\'t spend all day on it guys. I built a dating site (long gone) back in 2000 or so, and one of the challenges was calculating the distance between users so we could present your \"matches\" within an X mile radius. To just state the problem, given the following database schema (roughly): USER TABLE UserId UserName ZipCode ZIPCODE TABLE ZipCode Latitude Longitude With USER and ZIPCODE being joined on USER.ZipCode =

Google Maps: how to get country, state/province/region, city given a lat/long value?

此生再无相见时 提交于 2019-11-26 03:47:43
问题 I need a list of countries, states & cities based on a collection of lat/long values I have. I need to store this information in a manner that hierarchy is preserve and without duplicates (e.g. \"USA\" and \"United States\" and \"United States of America\" are the same country; I only want one instance of this country in my database). Is this possible to do with Google Map API? 回答1: What you are looking for is called reverse geocoding. Google provides a server-side reverse geocoding service

Given the lat/long coordinates, how can we find out the city/country?

爷,独闯天下 提交于 2019-11-26 03:32:03
问题 For example if we have these set of coordinates \"latitude\": 48.858844300000001, \"longitude\": 2.2943506, How can we find out the city/country? 回答1: The free Google Geocoding API provides this service via a HTTP REST API. Note, the API is usage and rate limited, but you can pay for unlimited access. Try this link to see an example of the output (this is in json, output is also available in XML) https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true 回答2:

Getting distance between two points based on latitude/longitude

对着背影说爱祢 提交于 2019-11-26 03:04:49
问题 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 a = (sin(dlat/2))**2 + cos(lat1) * cos(lat2) * (sin(dlon/2))**2 c = 2 * atan2(sqrt(a), sqrt(1-a)) distance = R * c print \"Result\", distance print \"Should be\", 278.546

How do I Geocode 20 addresses without receiving an OVER_QUERY_LIMIT response?

ε祈祈猫儿з 提交于 2019-11-26 02:42:37
问题 Using the Google Geocoder v3, if I try to geocode 20 addresses, I get an OVER_QUERY_LIMIT unless I time them to be ~1 second apart, but then it takes 20 seconds before my markers are all placed. Is there any other way to do it, other than storing the coordinates in advance? 回答1: No, there is not really any other way : if you have many locations and want to display them on a map, the best solution is to : fetch the latitude+longitude, using the geocoder, when a location is created store those

Measuring the distance between two coordinates in PHP

我只是一个虾纸丫 提交于 2019-11-26 01:56:00
问题 Hi I have the need to calculate the distance between two points having the lat and long. I would like to avoid any call to external API. I tried to implement the Haversine Formula in PHP: Here is the code: class CoordDistance { public $lat_a = 0; public $lon_a = 0; public $lat_b = 0; public $lon_b = 0; public $measure_unit = \'kilometers\'; public $measure_state = false; public $measure = 0; public $error = \'\'; public function DistAB() { $delta_lat = $this->lat_b - $this->lat_a ; $delta_lon

How can I measure distance and create a bounding box based on two latitude+longitude points in Java?

纵饮孤独 提交于 2019-11-26 01:37:41
问题 I am wanting to find the distance between two different points. This I know can be accomplished with the great circle distance. http://www.meridianworlddata.com/Distance-calculation.asp Once done, with a point and distance I would like to find the point that distance north, and that distance east in order to create a box around the point. 回答1: We've had some success using OpenMap to plot a lot of positional data. There's a LatLonPoint class that has some basic functionality, including