geocoding

How can we get tweets from specific country

*爱你&永不变心* 提交于 2019-11-28 08:31:59
I've read a lot about this part and what I found is to write the geocode and search for tweets for example https://api.twitter.com/1.1/search/tweets.json?geocode=37.781157,-122.398720,1mi&count=10 according to what i found in twitter website Returns tweets by users located within a given radius of the given latitude/longitude. A maximum of 1,000 distinct "sub-regions" will be considered when using the radius modifier. Example Values: 37.781157,-122.398720,1mi The question!, how can we define or draw the latitude and longitude ? I've tried google map but I only get a point then i can add the

API key Browser API keys cannot have referer restrictions when used with this API

本秂侑毒 提交于 2019-11-28 08:03:14
I'm trying to program geocoding. I created API key, but when I add it into my website code I don't get anything, however when I don't use API everything works well. When I'm sending: https://maps.googleapis.com/maps/api/geocode/json?address=".$adres."&key=KLUCZ_XXX I get a response: Browser API keys cannot have referer restrictions when used with this API. If I use: https://maps.googleapis.com/maps/api/geocode/json?address=".$adres" The result is correct but the number of queries is limited per day. Key constraint: referrals HTTP (Web) - set to the domain from which conjure inquiry. Interface

Get only country specific result using google geocode api

删除回忆录丶 提交于 2019-11-28 06:56:15
I am using google geocode api for fetching lat long using postal code of singapore I have tried following to fetch data: (1) http://maps.googleapis.com/maps/api/geocode/json?address=505468&sensor=false (2) http://maps.googleapis.com/maps/api/geocode/json?address=Singapore%20505468&sensor=false (3) http://maps.googleapis.com/maps/api/geocode/json?address=Singapore%20505468&sensor=false&region=sg But it returns location from India https://developers.google.com/maps/documentation/geocoding/?hl=fr#RegionCodes Any other way to get only country specific (Singapore) result. I have tried following it

How to get the bounding coordinates for a US postal(zip) code?

牧云@^-^@ 提交于 2019-11-28 06:28:12
Is there a service/API that will take a postal/zip code and return the bounding(perimeter) coordinates so I can build a Geometry object in a MS SQL database? By bounding coordinates, I mean I would like to retrieve a list of GPS coordinates that construct a polygon that defines the US zip code. An elaboration of my comment, that ZIP codes are not polygons.... We often think of ZIP codes as areas (polygons) because we say, "Oh, I live in this ZIP code..." which gives the impression of a containing region, and maybe the fact that ZIP stands for " Zone Improvement Plan" helps the false

Using Google Maps geocoder from Python with urllib2

Deadly 提交于 2019-11-28 05:24:59
问题 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

Retrieving Postal Code with Google Maps Javascript API V3 Reverse Geocode

人盡茶涼 提交于 2019-11-28 05:02:28
I'm trying to submit a query using the postal code to my DB whenever the googlemaps viewport center changes. I know that this can be done with reverse geocoding with something like: google.maps.event.addListener(map, 'center_changed', function(){ newCenter(); }); ... function newCenter(){ var newc = map.getCenter(); geocoder.geocode({'latLng': newc}, function(results, status){ if (status == google.maps.GeocoderStatus.OK) { var newzip = results[0].address_components['postal_code']; } }); }; Of course, this code doesn't actually work. So I was wondering how I would need to change this in order

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

泄露秘密 提交于 2019-11-28 04:28:50
问题 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? 回答1: Try

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

妖精的绣舞 提交于 2019-11-28 03:45:58
问题 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

Get latitude/longitude from address

你。 提交于 2019-11-28 03:16:41
How can I get latitude and longitude from a full address (street, city, etc.) input by the user, using the iPhone SDK 3.x? Here's an updated, more compact, version of unforgiven's code, which uses the latest v3 API: - (CLLocationCoordinate2D) geoCodeUsingAddress:(NSString *)address { double latitude = 0, longitude = 0; NSString *esc_addr = [address stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSString *req = [NSString stringWithFormat:@"http://maps.google.com/maps/api/geocode/json?sensor=false&address=%@", esc_addr]; NSString *result = [NSString stringWithContentsOfURL:

parse google geocode with xstream

泪湿孤枕 提交于 2019-11-28 02:14:53
I'm using Java and XStream to parse a google geocode request over http. My idea is to have an Address class with all the geocode attr's (ie. lat/long, city, provice/state etc) but I'm having problems parsing the xml with xstream. The google response is similar to this: <?xml version="1.0" encoding="UTF-8" ?> <kml xmlns="http://earth.google.com/kml/2.0"><Response> <name>98 St. Patrick St, Toronto</name> <Status> <code>200</code> <request>geocode</request> </Status> <Placemark id="p1"> <address>98 St Patrick St, Toronto, ON, Canada</address> <AddressDetails Accuracy="8" xmlns="urn:oasis:names:tc