madebydaniz / location-info
This is a tool to search OSM data by name and address and to generate synthetic addresses of OSM points (reverse geocoding).
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 2
Open Issues: 0
Type:package
Requires
- php: >=7.1
- curl/curl: ^2.0
Requires (Dev)
This package is auto-updated.
Last update: 2025-04-28 22:15:52 UTC
README
This is a tool to search OSM data by name and address and to generate synthetic addresses of OSM points (reverse geocoding).
Requirements
Installation
Install via Composer:
$ composer require madebydaniz/location-info
Usage
Reference : https://nominatim.org/release-docs/develop/api/Search/
$address = "Stephansplatz 2, 1010, Wien"; $data = LocationInfo::getInstance()::search($address); print_r($data); #output Array ( [place_id] => 4868677 [licence] => Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright [osm_type] => node [osm_id] => 567056993 [boundingbox] => Array ( [0] => 48.2080963 [1] => 48.2081963 [2] => 16.3722742 [3] => 16.3723742 ) [lat] => 48.2081463 [lon] => 16.3723242 [display_name] => 2, Stephansplatz, Stubenviertel, KG Innere Stadt, Innere Stadt, Wien, 1010, Österreich [class] => place [type] => house [importance] => 0.441 )
#TODO : return format
- html
- xml
- json
- jsonv2
- geojson
- geocodejson