Example here on how to decode: https://github.com/geodav-tech/decode-google-maps-polyline
How We reduced our Google Maps API cost
121–130 of 172 posts
Re: How We reduced our Google Maps API cost
#122For what it's worth, I found OpenStreetMaps and the Open Source Routing Machine to be sufficient for our purposes. If you don't want features like real-time traffic awareness, it's worth investigating the open source tooling. It can save a LOT of money.
[0]: https://github.com/opentripplanner/OpenTripPlanner
[1]: https://github.com/opentripplanner/OpenTripPlanner/pull/2077
[2]: https://github.com/opentripplanner/OpenTripPlanner/pull/2698
Re: How We reduced our Google Maps API cost
#123I wonder if they simply tried calling Google and negotiating a volume based discount. I realize Google is notoriously impersonal, but I always prefer if you can solve a problem without code.
Re: How We reduced our Google Maps API cost
#124For what it's worth, I found OpenStreetMaps and the Open Source Routing Machine to be sufficient for our purposes. If you don't want features like real-time traffic awareness, it's worth investigating the open source tooling. It can save a LOT of money.
+1, I've made my own geocoding/geodecoding on openstreetmap data, it worked 10x faster than google and with our level of usage, server essentially pays for itself just for 20% of resources. With our level of usage, we would burn through free tier in several hours.
Re: How We reduced our Google Maps API cost
#125Earlier quoted context omitted.
Genuine question: wouldn't this be considered write fraud? Last time I asked this question [0] on a different story [1], the responses I got were that it definitely is wire fraud, but this is so mind-blowing that I would like to ask again to confirm. [0] https://news.ycombinator.com/item?id=22362682 [1] https://news.ycombinator.com/item?id=22354357
It's violation of terms of service, and possibly a violation of contract, but it's clearly a civil matter, not a criminal one.
Re: How We reduced our Google Maps API cost
#126We were going to not display suburb data because of cost. In the end I found a creative commons placename database (geonames.org). For placenames with >500 people it's ~10MB of data and that covers the entire planet (surprisingly small). I then wrote a KD-Tree based library to look it up the nearest point in this table extremely efficiently (log(N) time).
I'll admit i haven't updated or maintained it. The server running it has been chugging along well though >5years later. https://github.com/AReallyGoodName/OfflineReverseGeocode
Re: How We reduced our Google Maps API cost
#127Earlier quoted context omitted.
Google's ToS says you're not allowed to do any computation on your own? I mean, I'm not disputing it, I just hadn't realized we were already there.
Section 3.2.3 of the Google Maps ToS > (c) No Creating Content From Google Maps Content. Customer will not create content based on Google Maps Content. > (d) No Re-Creating Google Products or Features. Customer will not use the Services to create a product or service with features that are substantially similar to or that re-create the features of another Google product or service. https://cloud.google.com/maps-platf…
Re: How We reduced our Google Maps API cost
#128Earlier quoted context omitted.
It's violation of terms of service, and possibly a violation of contract, but it's clearly a civil matter, not a criminal one.
hmm, not sure, some DA might want to prosecute it as theft of service.
A snippet from the article: A federal court in Washington, DC, has ruled that violating a website's terms of service isn't a crime under the Computer Fraud and Abuse Act, America's primary anti-hacking law. The lawsuit was initiated by a group of academics and journalists with the support of the American Civil Liberties Union.
Re: How We reduced our Google Maps API cost
#129I did the same years ago. We were providing realtime suburb data for a fleet of trains. Each train received a GPS coordinate once per minute, we took this and displayed the suburb. So 1440 updates per day per train. For the fleet it was going to be over $100 a day in API costs. We were going to not display suburb data because of cost. In the end I found a creative commons placename database (geonames.org). For placen…
At a previous employer I tried to convince my managers to let me do this for months. They always balked. Their loss.
Re: How We reduced our Google Maps API cost
#130Earlier quoted context omitted.
+1, I've made my own geocoding/geodecoding on openstreetmap data, it worked 10x faster than google and with our level of usage, server essentially pays for itself just for 20% of resources. With our level of usage, we would burn through free tier in several hours.
Nice! Is this open source or based on an open source project? I’m interested in doing something similar for one of my projects.