
Migrating away from Google Maps and cutting costs - ashitlerferad
https://www.eventsofa.de/campus/migrating-away-from-google-maps-and-cutting-costs-by-99/
======
dbatten
In case it helps anybody else - we were recently looking for alternatives to
Google Maps for reverse geocoding. We took property data from a local county,
ran the centroids of a bunch of randomly selected parcels through 4 different
reverse geocoding services, and compared the addresses we got back to the
actual address of the parcel, as listed by the county.

Google was 97% accurate, at $4 per 1000 requests. Mapbox was 95% accurate, at
$.50 per 1000 requests. TomTom was 73% accurate, at $.42 per 1000 requests.
Location IQ (one of many providers simply running the open-source Nominatim
project) was 12% accurate, at $.03 per 1000 requests.

To be fair to Location IQ / Nominatim, they had the right street the vast
majority of the time, but were usually wrong about house number due to
interpolating between address boundaries at cross streets defined in Census
Data. If you need exact addresses, Nominatim probably isn't for you, but if
you need a general location, it might work fine.

Also - this was one county of test data, so take it with a grain of salt.

Nevertheless, it gave us confidence that we could move away from the Google
APIs, save 90% of our costs, and still have a high level of accuracy.

~~~
ViktorMihov
Have you tried HERE APIs[1] by any chance? I am curious how it stacks up
against the other services.

[1] Link to example -> [https://developer.here.com/api-
explorer/rest/geocoder/revers...](https://developer.here.com/api-
explorer/rest/geocoder/reverse-geocode)

~~~
xtracto
We sued HERE API at a previous gig I was. We used it for standard geo-coding
(also after Google starting asking high prices to use it) and the quality was
very good.

~~~
libso
Geez, do people sue for anything in America?

~~~
SemiNormal
Always remember to send a Thank You subpoena.

------
phirschybar
Our experience with the Google cost increase was similar. We were paying
around $550/mo for the GMaps Platform pre-price-change. Over 80% of this cost
was for dynamic maps usage. The rest was for use of the Google Places API.

When I got the notification in May that the rates were increasing, I didn't
take it that seriously. We have a profitable company and I would have been
more than happy to pay Google twice their rate for the premium services they
offer. Nobody ever expects a sudden rate increase to be more than 20%, 30% or
40%, right???!

It was in July that the gravity of the situation hit me. I was seeing tweets
and articles lamenting the rate increase. I thought to myself "huh, I better
check this out". I did some quick math using the new rate card and nearly had
a heart attack! Our bill was estimated to be ~$14,500 and the CLOCK WAS
TICKING. We were facing a 2600% rate increase and had only 2 months to figure
out a game plan. Our business was on the line!

I immediately determined that we were eligible for bulk pricing. However,
Google will not sell you the bulk rates directly. You have to contract with an
authorized 3rd party (re-seller, basically) to get the rates. So, we found a
reseller and locked in the bulk rates. That brought our estimate down to
around $12,000/mo. Better, but still a huge shock.

The next step was optimization. There was no way for us to reduce dynamic maps
usage because it is such a core part of our products. So, we cut off almost
all of our Places API usage and started using other services. Our estimated
bill was now down to $9,000.

That's where we are today. We just got our first full month bill. It was a
huge hit to our business, wiping out a significant portion of our
profitability.

To be frank, I am pissed about this. I was more than happy to pay Google far
more than they were charging us. We were always under the impression that
rates would increase one day. But, to force an increase of this magnitude with
such a short amount of lead time is pretty f&^%ing sh*&$tty coming from a
billion dollar giant.

We're starting to test other mapping services. I met with a team member from
Mapbox last week and am planning on testing their platform in December. Their
quote for our usage needs? $550/mo.

~~~
bad_user
Going from $550 to $14,500 per month is totally unacceptable.

This is exactly why I'll always be wary to depend on Google's services. And it
isn't the first time they do this either.

First they monopolize the market via cheap rates and branding, then they make
it exorbitantly expensive.

~~~
magduf
>Going from $550 to $14,500 per month is totally unacceptable.

Wrong. It's completely acceptable. It's their business, and this is the risk
you take when you make your business dependent on another business.

>This is exactly why I'll always be wary to depend on Google's services. And
it isn't the first time they do this either. >First they monopolize the market
via cheap rates and branding, then they make it exorbitantly expensive.

Google isn't the only company that does stuff like this. Almost any company
would do this if they had the opportunity.

~~~
abandonliberty
This doesn't make it acceptable. It sounds like what you're proposing is that
a company must build its own streets, electrical grid, telecom network,
generation plants, etc.

Very few business would do well in such an environment.

~~~
magduf
Also, I'll add that your comparison is apples-to-oranges. For the electrical
part in particular, electric utilities in almost every country are highly
regulated. They can't raise prices on a whim, even though they're monopolies;
the government won't allow it. This doesn't apply to Google Maps. You're
comparing services that are provided by a government, or are highly regulated,
to a service that has governmental constraints whatsoever. If you don't like
the price, don't buy it.

------
dmortin
Another problem with Google that you cannot really experiment with it for
free. You have to add your credit card and there is no concept of using only
the free quota.

E.g. I'd put up an experimental site which uses google maps free qouta only
and I don't want to pay anything, since it's only an experiment, I'd be happy
with my access blocked automatically for the rest of the month after the free
quota is exhausted.

But AFAIK it cannot be done. You have to track you spendings and shut down the
site manually when you are near the end of the free quota.

Google in the past helped people experimenting with its platform. This is not
the case anymore with google maps.

~~~
Alterlife
This is true for all google cloud services. You have to enter a credit card
number. You may 'intend' to use just 20$ a month and I believe you can set
quota alerts, but you can't set a hard budget. Google will just bill for
whatever you consumed.

I think that's ridiculous. It should deal-breaker problem for anyone running
on a side project.

~~~
amelius
Can't you use a throwaway/generated credit-card?

~~~
JoshGlazebrook
Privacy.com and other virtual cards register as prepaid cards and are blocked
by google.

~~~
amelius
That sucks. If inflexibility already shows at the entrance, then I'm not going
to enter the place.

~~~
existencebox
Hey, just to chime in. I'm a MSFTie, so no relevence to G, but have worked on
products with similar limitations, and was usually the one arguing _against_
the CC friction at login.

What has become abundantly clear however is that CC gating is a fast way to
reduce your malicious traffic _exponentially_; and especially if you're
enterprise focused, this doesn't even impact your core strata much.

As a non-corporate-techie in my off-work-time, I absolutely understand the
frustration at this inflexibility. During my day job where I'd have to clean
up the fires that result from a fully open door policy however? I'd have a
somewhat different take.

It's not 100% clear cut "the CC is all just to add spurious friction", is all
I mean to say :)

------
_Codemonkeyism
Author here ( @codemonkeyism ), ready to answer questions. Blog seems down,
we're haven't been slashdotted for a long time, sorry!

[Added some more caching, site works again slowly]

~~~
mabbo
> Thanks to Google for giving us free Maps for some years

This attitude is something I truly appreciate. So often posts like these are
angry rants about 'how dare they do this to me'. You seem to presume good
intentions, which should be the default reaction in life.

~~~
rejschaap
It seemed a bit passive aggressive to me, but maybe I'm reading into it too
much.

~~~
_Codemonkeyism
Sorry English isn't my native tongue, didn't intend it to be passive
aggressive but meant it.

------
ckastner
> In under 30 minutes we migrated our code to Stadiamaps without prior
> knowledge of their API, including deployment.

This surprised me. I'm completely ignorant with respects to geoinformation
providers, but for some reason, I somewhat expected vendor lock-in to be much
tighter.

~~~
_Codemonkeyism
Geo coding took longer as the meta information about city districts etc. which
needs to be mapped is different, but changing maps was easy. That said Open
Cage was nice as their data was cleaner and we didn't have to manually change
data as we had to do with Google.

~~~
mtmail
OpenCage ([https://opencagedata.com/](https://opencagedata.com/)) founder here
if anybody has questions. Putting country hierarchies in a set of keys is a
challenge for all geocoders and the output differs slightly (though we have a
google-compat mode). Sometimes it's just road vs street or town vs city.
England has parishes, Paris has arrondissements (equivalent to a city within a
city), Berlin is a city, county and state (same outer boundaries) for example.

~~~
everybodyknows
FAQ has:

>Just pass the coordinates as a latitude and a longitude, separated by either
a comma or a (URL encoded) space and the API will automagically work out that
you want to reverse geocode.

Is the reverse geocoding based on 1\. government-source boundary data, or 2\.
proximity to tagged points from OSM or other non-authoritative sources?

~~~
mtmail
Both where government provides open boundary data, though in most cases that
would've been imported into OpenStreetMap already
[https://opencagedata.com/credits](https://opencagedata.com/credits)

------
linsomniac
Has anyone figured out WHY Google maps did this double-digit multiplier price
increase?

Were they vastly under pricing it before? Did they want to stop providing it
so they priced it at a point that would make almost everyone go away?

I'm just curious about their motivation and surprised that this doesn't seem
to have been figured out or even discussed.

~~~
ianthetechie
My guess is that they realized the enterprise market was more profitable for
them, so they decided to focus more exclusively there. They know their
enterprise customers aren't about to jump ship, so they can do pretty much as
they please due to their dominant market positioning.

------
thesimon
Google Cache:

[https://webcache.googleusercontent.com/search?q=cache:https:...](https://webcache.googleusercontent.com/search?q=cache:https://www.eventsofa.de/campus/migrating-
away-from-google-maps-and-cutting-costs-
by-99/&rlz=1C1GCEA_enDE769DE769&strip=0&vwsrc=0)

~~~
_Codemonkeyism
Thanks.

------
dracodoc
In case it's not known by everybody, you can geocode(maybe also reverse
geocode, I didn't check) US addresses in batch with TIGER census data and
PostGIS.

It's not directly relate to topic (dynamic maps, online geocoding), but
somewhat relevant.

With about $300 in Amazon EC2 I geocoded 18 million addresses in 3 months. You
probably can do it with your own PC with similar time (the only hardware
requirement is RAM and SSD).

[http://dracodoc.github.io/tags/Geocoding/](http://dracodoc.github.io/tags/Geocoding/)

~~~
wyldfire
Did you do any verification to show the effective accuracy/spatial resolution?

~~~
dracodoc
There is an accuracy score in postgis tiger geocoder plugin. Usually a low
value mean a pretty good match. Depend on address format and quality, 70-80%
of addresses got a good match.

For resolution you cannot expect too much because street numbers are usually
interpolated, and TIGER database definitely will not be as good as best
commercial database. However you don't have many other solution if you have
millions address to geocode.

------
blantonl
I've migrated much of our mapping capabilities to MapBox's API.. but we're
still facing mapping bills in the hundreds of dollars.

My next step is going to be to setup a caching Open Street Map tile server and
using [https://leafletjs.com/](https://leafletjs.com/) javascript library. The
costs now for mapping solutions are going to drive us to run our own GIS
infrastructure.

~~~
linsomniac
We also looked at MapBox but ended up going with local tile server from
OpenStreetMap data. We are using the geofabrik.de data bundles, mod_tile and
renderd to serve up the tiles, and we pre-generate the tiles so all our
requests are served from disk rather than being rendered (which really slows
down mapping). We are lucky that we are only dealing with one state, so our
data is around 25GB for map tiles and another 10GB for "street overlay" tiles
that we lay on top of aerial tiles that we generate from NAIP data.

We customized the CartoCSS a bit to get the maps closer to the way we wanted
them. For example, we took out building outlines, and reduced the frequency of
highway shields, which required removing exit numbers.

It's a good solution for us, but we already had some mapping experience and
lots of system deployment experience, so YMMV.

------
lukeqsee
Stadia Maps founder here to answer any questions!

------
pg_bot
Any reason why you wouldn't self host your tiles using something like open map
tiles?[0] If you're geocoding mostly US addresses it's actually not impossible
to roll your own geocoder* . If you're insane enough, I'm sure you could find
some German spatial data and follow along with how the TIGER geocoder loads
and normalizes information if you wanted to run an entire GIS operation in-
house.

[0]: [https://openmaptiles.org](https://openmaptiles.org)

* Provided you're familiar with PostgreSQL, and PostGIS.

~~~
snarfy
It makes sense if it's your core competency, but when it's not it's usually
worth it to pay someone else to deal with it, like email.

------
BattyMilk
Piggy backing off this thread for my own question.

I've a small webapp to show me my elevation based on my lat/lon. I built it
with Google's API as I've used it before and it's what I know. It doesn't get
much traffic so it's unlikely to ever cost much once my free credit expires
but I'd like to explore other options.

What alternative (preferably free) services are there out there? I need to be
able to pass lat/lon and get back the elevation above sea level of that point
on earth.

~~~
ryandrake
That would depend on what your resolution and accuracy requirements are.
Ground level or treetop? If you are willing to DIY there are freely available
DEM (Digital Elevation Model) datasets that might work for you. For example
ASTER[1] has global 90 meter resolution and 30 meter resolution in the USA.
There are smaller, embeddable DEMs with ~1km resolution. Lots of options out
there. Grab a coffee and start with an internet search for DEM.

1:
[https://en.m.wikipedia.org/wiki/Advanced_Spaceborne_Thermal_...](https://en.m.wikipedia.org/wiki/Advanced_Spaceborne_Thermal_Emission_and_Reflection_Radiometer#ASTER_Global_Digital_Elevation_Model)

~~~
BattyMilk
Cheers, I'll take a read. I'm looking for ground level (I use it to calibrate
the barometer on my watch at the start of a hike/trail run/climb)

------
narrowtux
We did something similar and used Maptiler.com's vector tile server offering +
MapboxGL.js on the frontend.

Using mapbox's own backend would've been too expensive for us since our app is
able to do asset tracking, a use case almost all of the bigger mapping
providers (we checked google, bing, here, mapbox) want to earn an extra buck
on.

------
pmontra
What most (all?) of those alternatives are missing is the satellite view and
street view. I look at it almost every time I search for a place to get an
idea of the surroundings for when I'll be there. However links to the same
location on Google Maps can fix that.

~~~
mtmail
Google invested 100s of millions driving streetview cars around the world.
That's hard to match. "Street View cars have traveled almost 10 million miles,
covering every single continent and 83 countries in total"
([http://geoawesomeness.com/googles-street-view-
turns-10/](http://geoawesomeness.com/googles-street-view-turns-10/)) Mapbox
has satellite view

------
imaginenore
Yeah, but Stadia Maps aren't that good. They have really bizarre issues with
labeling. For instance, they would display "Bridgeport", but not "New York" at
some zoom levels. And Long Island looks completely disconnected, and Manhattan
is missing altogether.

[https://i.imgur.com/O6v1X03.png](https://i.imgur.com/O6v1X03.png)

~~~
wlkr
I don't think that's their fault but issues with the map services they rely on
(which is OSM from what I gather [0]). I remember this being discussed
recently on HN but can't find an article/thread right now.

[0]:
[https://news.ycombinator.com/item?id=17010831](https://news.ycombinator.com/item?id=17010831)

~~~
ianthetechie
Yes, It's a mix of underlying data and Mapbox GL. This is an active area of
development both on our end and in the Mapbox open source community.

