geocoding

MongoDB geospatial index in C#

本小妞迷上赌 提交于 2019-12-06 04:52:51
问题 I have been trying to get started but run into the same rock time after time trying to create and query MongoDB with C# official driver. The problem is how to create data with geo information. I am just not finding the answer. Code: MongoUrl url = new MongoUrl("mongodb://xxx.xx.x.xx/mydb"); MongoServer server = MongoServer.Create(url); MongoDatabase database = server.GetDatabase("mydb"); <-- this works fine BsonDocument[] batch = { new BsonDocument { { "name", "Bran" }, { "loc", "10, 10" } },

Finding latitude and longitude of many places once

吃可爱长大的小学妹 提交于 2019-12-06 04:14:40
问题 I have a long list of towns and cities, and I'd like to add latitude and longitude information to each of them. Does anyone know the easiest way to generate this information once? See also Geocode multiple addresses 回答1: The first part of the third video shows how to get latitude and Longitude using Google Refine and geocoding. No need to write a new script. Ideal for doing this kind of change once . http://code.google.com/p/google-refine/ 回答2: Or use www.geonames.org - there's language APIs

How do I enter an “empty” POINT() geometry value into a MySQL field of type POINT?

亡梦爱人 提交于 2019-12-06 03:04:55
问题 I have a table with a POINT geometry field. I enter latitude/longitude points into it like this: INSERT INTO table( point ) VALUES( POINT( lon_value, lat_value ); Sometimes I do not have lat/lon values to enter. I am unable to enter a blank, a NULL, or an empty POINT() ... since POINT(0,0) is actually a location on the globe, that won't work either. What is the solution here? 回答1: I would use coordinates of North Pole INSERT INTO table( point ) VALUES( POINT(0.0000,90.0000); If the actual

google geocoding api not as accurate as google maps using address

我的未来我决定 提交于 2019-12-06 01:59:56
问题 I have many examples where google maps returns the exact location whereas geocoding cannot find an exact match and provides only a close match lat/lon which is no good for my purpose. example: "1729 state road 8, auburn, IN 46706" in google maps drops me exactly on a walmart distribution center as it should. using geocoding.....either thru http://gmaps-samples.googlecode.com/svn/trunk/geocoder/singlegeocode.html or manually via https://maps.googleapis.com/maps/api/geocode/json?address=1729

Loading city/state from SQL Server to Google Maps?

青春壹個敷衍的年華 提交于 2019-12-06 01:33:30
问题 I'm trying to make a small application that takes a city & state and geocodes that address to a lat/long location. Right now I am utilizing Google Map's API, ColdFusion, and SQL Server. Basically the city and state fields are in a database table and I want to take those locations and get marker put on a Google Map showing where they are. This is my code to do the geocoding, and viewing the source of the page shows that it is correctly looping through my query and placing a location ("Omaha,

get formatted_address from google maps api json

雨燕双飞 提交于 2019-12-05 16:43:15
I want to get the formatted_adress from the json array. an example link could be http://maps.googleapis.com/maps/api/geocode/json?latlng=55.397563 , 10.39870099999996&sensor=false var url = "http://maps.googleapis.com/maps/api/geocode/json?latlng="+latlng+"&sensor=false"; $.getJSON(url, function(data) { var adress = data['formatted_address']; alert(adress); }); but im getting "undefined" Here's the corrected JS.. Demo Fiddle var latlng = "55.397563, 10.39870099999996"; var url = "http://maps.googleapis.com/maps/api/geocode/json?latlng=" + latlng + "&sensor=false"; $.getJSON(url, function (data

Maps for China - which is correct, Satellite or default street map ? does that mean geocoding results are wrong?

大兔子大兔子 提交于 2019-12-05 15:09:48
So it is known that the maps, either the regular street map or the satellite map, does not line up correctly in specific parts of China. So which map lines up correctly, the satellite map or the default street map? Some sites suggest that the satellite map is correct. But the Google Geocoder is placing locations correctly on the google street map and not on the satellite map. So if the satellite map is considered to be correctly aligned with China, does that mean that the Google Geocoder is also returning incorrect coordinates for locations in China? I have not been able to find any official

Get only IATA code with geocoding

大城市里の小女人 提交于 2019-12-05 14:16:50
问题 How can I have just the IATA codes with Google Maps? I just found out how to get the address and city, but I need to grab just the IATA code, like NYC or JFK etc. How can I do that? Thanks for your help. 回答1: You could use the Global Airport Database. It has GPS coordinates. 回答2: You can try use this service: GET Request Params: http://iatageo.com/getCode/{lat}/{lng} GET Request Example: http://iatageo.com/getCode/-15.4343434/-47.323232 This will return a JSON, for example: { "code": "BSB",

location (lat long) using facebook api

纵然是瞬间 提交于 2019-12-05 13:56:01
Is there a way to get the location of a user in (latitude and longitude format) using facebook api?? I am able to get the location name and other attributes but not the lat long of the place. Is there any API for the same in javascript. If you have the user's basic info, one of the fields is location "location": { "id": "104146386288393", "name": "Newton, Massachusetts" }, You can make another query using the id of the location to return JSON containing lat/lon of the city, e.g. { "id": "104146386288393", "name": "Newton, Massachusetts", "picture": "http://external.ak.fbcdn.net/safe_image.php

Google Maps geocoding API yields ZERO_RESULTS for valid addresses

你。 提交于 2019-12-05 12:59:28
We use google API to geocode. We geocoded some 10K addresses successfully. For some reason, the API returns 'GeoCoding Error: status = ZERO_RESULTS' for below addresses. We tried several times, but we still get the same ZERO_RESULTS error only for these addresses. Note: These addresses show up fine in google maps search. Please provide your inputs. The below google geocoding API calls return ZERO_RESULTS, however google maps search shows up fine: http://maps.googleapis.com/maps/api/geocode/xml?address=7441+Adairsville+Hwy+Adairsville+GA+30103&sensor=false http://maps.googleapis.com/maps/api