https://github.com/baraja-core/geocoder
Rewrite real address to geo coordinates.
https://github.com/baraja-core/geocoder
address cross geo geocoder gps rewrite
Last synced: about 1 year ago
JSON representation
Rewrite real address to geo coordinates.
- Host: GitHub
- URL: https://github.com/baraja-core/geocoder
- Owner: baraja-core
- License: mit
- Created: 2021-09-20T18:08:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-08T13:37:07.000Z (almost 4 years ago)
- Last Synced: 2025-03-24T13:04:39.097Z (about 1 year ago)
- Topics: address, cross, geo, geocoder, gps, rewrite
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Simple PHP Geocoder
===================
Rewrite real address to geo coordinates.
Idea
----
The task of the address geocoding process is to rewrite a real address (which we get from the user or from another API) into real GPS coordinates. If the address is too general and represents a large area, we return the middle point in that area.
The process of transcribing an address to GPS is not always reliable and accurate. Data from many sources is used, but in some cases the transcription may fail or return an incorrect result.
When using a geocoder, always validate the output coordinates against a preset area in your application.
How to use
----------
Simple create instance and call method:
```php
$geocoder = new \Baraja\Geocoder\Geocoder();
$coordinates = new $geocoder->decode('Náměstí Míru Praha');
echo $coordinates->getLatitude(); // 50.075075836281066
echo $coordinates->getLongitude(); // 14.437529917970826
```