coopcycle / coopcycle-web

Logistics & marketplace platform. Only for worker-owned business.
https://coopcycle.org
Other
564 stars 128 forks source link

Use OpenStreetMaps instead of Google Maps #4

Closed alexsegura closed 3 years ago

alexsegura commented 7 years ago
couleurmate commented 6 years ago

Use nominatim for geocoding

alexsegura commented 6 years ago

There is also Addok for geocoding, which is built on top of Redis.

PasLoin commented 4 years ago

https://openrouteservice.org/services/ (used by Vroom)

der-On commented 4 years ago

Yes please. If you want to decentralize why are you using a centralized ethically problematic service like google maps in the first place?

alexsegura commented 4 years ago

Hi @der-On

If you want to decentralize why are you using a centralized ethically problematic service like google maps in the first place?

Why are you on GitHub? It's centralised and ethically problematic too 🙃 Your sentence makes me think about liberals saying "if you are an anarchist, why do you have an iPhone?"


On this project, we are mainly using Google Maps for address suggestions, the rest is OpenStreetMaps.

We don't have billions from venture capital, we have very limited human resources, and running Pelias in production needs servers with huge amounts of RAM (it's built on top of ElasticSearch), which is quite expensive. When the price of using Google Maps will be equal or greater than renting servers to run Pelias, we will think about switching.

Actually, I think we'll use geocode.earth before running Pelias on our own servers 🌍

der-On commented 4 years ago

@alexsegura Didn't meant to offend you but if you only use G-Maps for address search a switch to the suggested nominatim should be fairly easy. My point is that a lot of FOSS projects tend to build on google services while there are usable free open alternatives available. I was not talking about self hosting. If you use nominatim on the client/browser you do not run into rate limits that fast. I've also used it on the server together with caching and rate limiting to prevent the limiting problems.

I'm keen to help here with snippets or PRs.

alexsegura commented 4 years ago

Nominatim is not intended for address suggestions, it's too slow and not tolerant to typos.

https://operations.osmfoundation.org/policies/nominatim/

Auto-complete search This is not yet supported by Nominatim and you must not implement such a service on the client side using the API.

There's OSMNames which could work, but from what I tested it doesn't work that well (typing an address with the street number actually returns the street without the number). From what I know, we need Pelias or Photon.


Having precise & accurate addresses is critical for bike messenger co-ops, to do their job without losing time. Our software is used in production, by people needing it to do their job on a daily basis.

I don't like that word, but we have to be pragmatic here. And careful. We can't change the source of addresses like this, it would need to be progressive, and we would need to monitor the results to check if the source works correctly. We would need to make some kind of A/B testing I suppose.

Changing the source will inevitably lead to different results, and will inevitably bring more bug reports, more support, etc... I mean, migrating to OSM for this, would need maybe dedicate a month to the subject. We can't afford that atm.


Most of the issues are being reported directly by workers of bike messenger co-ops, and as you can see, they are not reporting problems with Google Maps 🙂 If you want to help on things that matter to them, take a look at the issues they are reporting.

If you really want to work on OSM-related stuff, what would be dope would be to introduce VROOM for vehicle routing 😍 This, we can run it on our own servers without problem.

der-On commented 4 years ago

@alexsegura Thank you for the brief description of the problem. As routing with OSM is very interesting for me I will have a look at VROOM. Just can't give you a time.

alexsegura commented 3 years ago

Look @der-On, this issue is now fixed 😉