geocoder-php / Geocoder

The most featured Geocoder library written in PHP.
https://geocoder-php.org
MIT License
3.94k stars 515 forks source link

What is the domain area of this project? #951

Closed gnumoksha closed 5 years ago

gnumoksha commented 5 years ago

Hi. I'm a bit confused about the domain area of this project. Is this related to geocoding only?

Quoting google maps docs:

Geocoding is the process of converting addresses (like a street address) into geographic coordinates (like latitude and longitude), which you can use to place markers on a map, or position the map.

Reverse geocoding is the process of converting geographic coordinates into a human-readable address.

Just to be clear, I need to enrich address data received from many different resources and I've found geocoding providers are designed for unambiguous address. Do all providers have this same rule?

jbelien commented 5 years ago

From the README:

Geocoder is a PHP library which helps you build geo-aware applications by providing a powerful abstraction layer for geocoding manipulations.

This library provides an easy way to query plenty of geocoding providers. Each geocoding provider has its own rules ! We provide a structured way to query every provider the same way and the result is also always structured the same way no matter what geocoding provider you chose.

Geocoder library includes geocoding, reverse geocoding but also "IP geocoding".

gnumoksha commented 5 years ago

This library provides an easy way to query plenty of geocoding providers. Each geocoding provider has its own rules !

I've quoted Google's definition of Geocoding but in fact, this is the global definition of Geocoding (see Wikipedia)

We provide a structured way to query every provider the same way and the result is also always structured the same way no matter what geocoding provider you chose.

Geocoder library includes geocoding, reverse geocoding but also "IP geocoding".

Right. What I'm saying is to clarify what this result would be. Besides Google Maps, the Here provider is also using geocoding and the nominatim provider uses address + geocoding.

I'm saying all this because for many people the concept of "geocoding" is unclear. The fact of one need a nonambiguous address to search an address using geocoding is an issue that the README can clarify too. For example, I came to this issue with the geocoding definition because of my team at work had thought it was ok to search ambiguous address using geocoding, when in fact, it resulted in poor results.results.

jbelien commented 5 years ago

Right. What I'm saying is to clarify what this result would be. Besides Google Maps, the Here provider is also using geocoding and the nominatim provider uses address + geocoding.

I don't get this.

For the addresses, the Geocoder library only provides geocoding (= converting an address into geographic coordinates) and reverse geocoding (= converting geographic coordinates into an address) ! Those 2 functionalities are based on external API and we, of course, do not have any control on how the external API process the address (or the geographic coordinates).

Each external API will process a ambiguous address its own way, that's out of this library scope and goal.

gnumoksha commented 5 years ago

I agree with what you said, my only concern here is explicit what geocoding is supposed to do.

I am going to close this issue and leave the PR for you to do what you think is best.