geocoding

Calculate latitude and longitude having meters distance from another latitude/longitude point

陌路散爱 提交于 2019-11-29 14:01:06
问题 I need to calculate latitude and longitude of a given point. I know latitude and longitude of a reference point, and an value indicating meters on x and y axis from the reference point. Starting from this data I have to find latitude and longitude of the point. I searched for similar questions but it looks like most questions are about finding distance between two lat/long points. I need to do the contrary. How can I do? I use Java 回答1: Here is the best starting point for such questions:

Using Google Maps geocoder from Python with urllib2

僤鯓⒐⒋嵵緔 提交于 2019-11-29 11:54:06
I'm trying to use the Google Maps geocoder with Python and JSON, but keep being told I have a bad request: add = "Buckingham Palace, London, SW1A 1AA" geocode_url = "https://maps.googleapis.com/maps/api/geocode/json?address=%s&sensor=false&region=uk" % add print geocode_url req = urllib2.urlopen(geocode_url) jsonResponse = json.loads(f.read()) pprint.pprint(nest) This fails with urllib2.HTTPError: HTTP Error 400: Bad Request . But if I simply copy and paste https://maps.googleapis.com/maps/api/geocode/json?address=Buckingham%20Palace,%20London,%20SW1A%201AA&sensor=false&region=uk into a

Google Maps API: Geocode returns different co-ordinates then Google maps

谁说我不能喝 提交于 2019-11-29 11:19:24
I am currently attempting to geocode addresses but I'm having an issue with getting accurate co-ordinates. For example if I enter the address into google maps it shows up correctly, but if I geocode the same address I only get an APPROXIMATE location type from the geocode json response as well as different co-ordinates. What is causing the discrepancy and is there anything I can do to improve the accuracy of my geocoding to get to the level of a manual google maps address search? Try adding the country to the query. With Fonthill Road, Lucan, Dublin it gives different size results: http://maps

error (429) Too Many Requests while geocoding with geopy in Python

梦想的初衷 提交于 2019-11-29 11:01:39
I have a Pandas dataframe with ~20k rows, and I am trying to geocode by address column into lat/long coordinates. How do I use time.sleep() or maybe other function to stop OSM Nominatim from Too Many Requests 429 error that I am getting now? Here's the code I use for this: from geopy.geocoders import Nominatim from geopy.distance import vincenty geolocator = Nominatim() df['coord'] = df['address'].apply(geolocator.geocode).apply(lambda x: (x.latitude, x.longitude)) df.head() Thanks in advance! geopy since 1.16.0 includes a RateLimiter class which provides a convenient way to deal with the Too

Using geocoder on production server

跟風遠走 提交于 2019-11-29 10:22:25
问题 I am developing a location based application. And i need a trustable source for getting geolocation. right now i am using this geocoder plugin. and i am getting this error:- Geocoding API not responding fast enough (see Geocoder::Configuration.timeout to set limit). I am getting error when our team of 5 is testing on staging servers I need a fast enough solution with some ~10k request a day with no per second limits PS: I am open to use some paid service. EDIT Think of a case you want to

How to plot contours on a map with ggplot2 when data is on an irregular grid?

萝らか妹 提交于 2019-11-29 10:14:13
Sorry for the wall of text, but I explain the question, include the data, and provide some code :) QUESTION: I have some climate data that I want to plot using R. I am working with data that is on an irregular, 277x349 grid, where (x=longitude, y=latitude, z=observation). Say z is a measure of pressure (500 hPa height (m)). I tried to plot contours (or isobars) on top of a map using the package ggplot2, but I am having some trouble due to the structure of the data. The data comes from a regular, evenly spaced out 277x349 grid on a Lambert conformal projection, and for each grid point we have

Google Geocoding Json Parsing Issue in C#

我与影子孤独终老i 提交于 2019-11-29 08:32:06
I have my code working fine, but I can't seem to be able to get to the deeper parts of the tree. I'm trying to pull the longitude and the latitude. The code below pulls 'status' no problem as 'OK" (at the very end of the response). What is the syntax for 'geometry' -> 'location' -> 'lat' and 'lng'? Here is my code: string RawAddress = "163 Leektown Road, New Gretna, NJ 08004"; string Address = RawAddress.Replace(" ", "+"); string AddressURL = "http://maps.google.com/maps/api/geocode/json?address=" + Address; var result = new System.Net.WebClient().DownloadString(AddressURL); dynamic data =

Using a callback function with Google Geocode

妖精的绣舞 提交于 2019-11-29 08:05:30
I've been struggling with this for a few hours now, and even after reading several examples on Stack I've been unable to get this working. It doesn't help that I'm a JS newbie. I'm trying to retrieve information about an address from the Google Geocoder API, and then pass the object over to another function. Per my reading I understand that function I'm using to retrieve the information is asynchronous, and therefore I need to use a callback function to read it. However, when I attempt to do this I still get 'undefined' returned by my console. I know that the information is coming from Google

Google maps geocode API V3 not returning result in javascript function

自古美人都是妖i 提交于 2019-11-29 07:35:21
I'm trying to use the Google geocoder API V3 to plot a location on a map based on an address specified by the user, code is below. When I make a request directly (e.g. to http://maps.googleapis.com/maps/api/geocode/json?address=peterborough&sensor=false ) I get the expected response. However, when I make the same request using the code below, the midpoint variable is always undefined after the getLatLong function has exited. What am I doing incorrectly? function loadFromSearch(address) { midpoint = getLatLong(address); mapCentre = midpoint; map.setMapTypeId(google.maps.MapTypeId.ROADMAP); ...

Where to place API key for Google Geocoding API?

拈花ヽ惹草 提交于 2019-11-29 05:59:54
We use Google Geocoding API to map address to Latitude and Longitude. Here is the sample URL for encoding (which returns json) - http://maps.googleapis.com/maps/api/geocode/json?address=Dallas&sensor=false Message: OVER_QUERY_LIMIT Ok, it makes sense, because we exceed over 2500 daily limit so we place API key like this - http://maps.googleapis.com/maps/api/geocode/json?key=xxxxx&address=Dallas&sensor=false Message: REQUEST_DENIED I'm wondering where/how to place the API Key. Looks like in version 3 you need to pass the ClientID in the URL and not a key as you do in the free version: https:/