Geocoding - the should I use API or database? - database

I need my users to be able to regularly geocode their addresses, but NOT onto a map - I simply need to be able to translate an address into a set of lat/long coordinates so my site can react accordingly.
It seems like Google doesn't want you to use their geocoding service unless you are actually plotting on a map. On the other hand, I want to make sure that the service is reliable and will last a long time.
I'd also consider downloading some kind of address database and running the requests myself if I knew where to find it.
Any ideas?

A good alternative to the Google Geocoding API is SimpleGeo (no affiliation). They are more liberal when it comes to the Terms of Service, meaning you have fewer restrictions of what you can do with the data.
On the other hand, I remember a quote from their founder saying their non-US data is not on the same level (or better) than, for example, the data from Google.

Note this answer is incorrect, but retained for posterity.
If you are under 2,500 requests per day, you should be fine using Google's geocoding API:
http://code.google.com/apis/maps/documentation/geocoding/
Are you basing your assumption about what Google wants on this?
This document is intended for website and mobile developers who want to use geocoding data within maps provided by one of the Google Maps APIs. It provides an introduction to using this API and reference material on the available parameters.
That's describing the audience of the document, not the audience of the API itself.

Related

Any alternative to Google Maps API with directions from current location?

I am currently developing a web site for my thesis which features my City's tourist spots (e.g. malls, parks, restaurants) with Google Maps API that shows the current location of the user and the destination point and all the possible routes to said destination. But sadly, with the Billing system I am limited to load a few maps before it says "OVER_QUERY_LIMIT".
I have researched few free Maps API and I have found some, like MapBox, HERE Api... What would be the best free alternative for Google Map API?
P.s. I am still a student and can not afford to pay $200. If there are any other possible ways in handling this, please do let me know. Thank you!
Check Freemium Plan from HERE Maps, 250.000 transactions/months for free, no need for credit card.
You can use JS, REST and Native APIs.

Design: using a backend server to circumvent great firewall of china

I have a front-end angular app using firebase to store user data.
I currently do not have a backend set up, such as a node.js server.
I would like to use the Google Docs API to upload files from my app.
Since the Great Firewall of China does not (or makes unstable) the use of Google services, is it possible to place those services on the backend server and still use them reliably?
Perhaps after they have uploaded the document to firebase, a backend script retrieves it, uploads it to google docs, and then removes the record from firebase? Just trying to see if Google or similar services are even feasible for this use case.
I suppose the crux of my question is whether or not the calling of the Google API would be taking place on the user's computer, in which case would it become unstable?
** Updates for clarity:
I am deciding whether my firebase-backed app needs a more traditional backend like a node server to do things like: upload images and documents, send mail via Mandrill, etc... It would be helpful to me if I knew whether, after putting in the time to create a server, some of the services I am after (aka APIs) are any more resilient to the GFW than they would be if they ran on the client side. So if any one has had success in such a task, I would like to know.
** Technical update:
So, for example, if I run the Google Maps API on the client side, if the user is in China and is not running a VPN, accessing the API calls will either lag or time out or (rarely) success in returning the scripts. If I was somehow able to able to process the map query "off-site" aka on the server, could I then return with a static image of the map to a Chinese user without fail?
If I was somehow able to able to process the map query "off-site" aka
on the server, could I then return with a static image of the map to a
Chinese user without fail?
Yes, of course. What you are going to miss this way is all the front-end interactive functionality Google Maps offers. But if that's ok in your use case, sure.
I have never tried it with the GCF, but what I would do is this:
Google Maps <-> Your Reverse proxy <-> User
So, instead of the user visitng the real google maps site, it will be visiting your maps.mydomain.com site, that will be sitting in between, proxying everything.
Nginx is an excellent choice for a reverse proxy. If you need more control, there are good node.js reverse proxying packages that you an use to rewrite the content extensively before serving it (perhaps to obfuscate it in case the GCF blacklists content based on pattern matching, or to change the script names/links again to avoid pattern matching).
You are misunderstanding about the great firewall of China. I consulted for a couple of Chinese companies after the dot com crash so I can say this from personal experience, not hearsay.
It is mostly high-end Cisco hardware behind gateways behind their government telecom infrastructure. Nowadays they knock off what hardware they can, every chance they can, and spend money on specialized hardware to monitor cell phones systems.
There was a brief mention of the street-level surveillance hardware on 20/20 before the crash if you are interested in looking it up.
Not to discourage you, but I say set up whatever open servers you want with whatever frontends or backends you want, but the reality is the traffic is not going to be there.
That is why they call it an oppressive regime, they do not get to decide for themselves, remember?

Strategy: How do I exchange data directly between JavaScript and Google App Engine DataStore

I am somewhat new to Web development - specifically Google App Engine and JavaScript/HTML development, but I have an app deployed and working on Google App Engine and it is working ok.
I would like a user of my App to be able to store and retrieve a serialization of the app state in JSON using the GAE Datastore. (Note - This is only a user-initiated action - so channels seem to be overkill)
The examples provided by Google demonstrates one approach that allows the server-side Python implementation to do this. Specifically https://developers.google.com/appengine/docs/python/gettingstartedpython27/usingdatastore. I have this working ok.
But this approach seems rather inelegant especially if as an "app" I want to store and retrieve serialized chunks of data somewhat asynchronously without reloading the page/app each time (again, this is only ever user-initiated).
I have not been able to find any high-level guidance on an approach to do that (assuming it is possible).
Any suggestions/links/examples would be greatly appreciated.
Thank you!
Jeff
As with many things, this depends on your specific needs. If you just want direct access to datastore storage, the datastore is exposed as an independent service with an API.
If you instead want to assert logic over the usage and interact with your app in some fashion, you may also want to look at Google Cloud Endpoints. With an endpoints API, you gain a more structured API you can call directly from javascript, or generate client libraries to be consumed by other languages/platforms.

Google App Engine Datastore Data Privacy

I'm playing around with the Google App Engine and the Datastore.
Really amazing stuff going on over there.
But I couldn't help and wonder what Google is allowed to do with the data my application is storing in there Datastore.
Can someone explain it in simple worlds?
Thanks
Google App Engine is governed by Google's general Privacy Policy. They promise not to share information outside of Google except in certain circumstances (court order, etc.), and they restrict access to only employees who need it. However, because they can use your data to "provide, maintain, protect and improve our services," Google may be using your data for their own purposes (probably not, but I see nothing that prevents them).
Disclaimer: I am not a lawyer. Also, this policy doesn't provide GAE-specific information.
Worth noting that Google Cloud has separate Terms of Service that includes this line:
5.2 Use of Customer Data. Google will not access or use Customer Data, except as necessary to provide the Services to Customer.

Geocoding Chinese addresses using Google Maps API in Python?

I have looked into Geopy and googlemaps (http://py-googlemaps.sourceforge.net/) and they both do not work for Chinese addresses. My app is stored on the Google App Engine. What I want to do is to parse a file containing addresses of restaurants in Hong Kong, and then Geocode the addresses and store the Lat and Lng in the datastore. How do I do this?
Try the Chinese language version of GoogleMaps ditu.google.cn. It is better than the China coverage in the English Google Maps (at least it was a couple of years ago when I last looked into it).
Be aware that the Chinese government restricts foreign use of GIS data, so there may not be a good geocoding solution available if you are based outside China.
I am not sure the API provides geocoding in China. Are you also saying that even with the google maps interface you can not get the geocoding to work. If that is the case then you better try to move on to a different service since there is quite a bit of functionality in the gmap website that is not in the API. So if the website doesn't work it is probably a darn good bet the API won't work.

Resources