2017 © Pedro Peláez
 

library nominatim

A simple interface to OSM Nominatim search.

image

opendi/nominatim

A simple interface to OSM Nominatim search.

  • Monday, January 22, 2018
  • by ihabunek
  • Repository
  • 8 Watchers
  • 0 Stars
  • 402 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 6 Versions
  • 2 % Grown

The README.md

Opendi Nominatim

A simple interface to OSM Nominatim search., (*1)

Latest Stable Version Total Downloads Build Status License, (*2)

See Nominatim documentation for info on the service., (*3)

Basic usage

Create a new instance of Nominatim by using the newInstance() factory method., (*4)

use Opendi\Nominatim\Nominatim;

$url = "http://nominatim.openstreetmap.org/";
$nominatim = Nominatim::newInstance($url);

Searching by query:, (*5)

$search = $nominatim->newSearch();
$search->query('1600 Pennsylvania Ave NW, Washington, DC 20500, United States');

$nominatim->find($search);

Or break it down by address:, (*6)

$search = $nominatim->newSearch()
    ->street('1600 Pennsylvania Ave NW')
    ->city('Washington')
    ->county('Washington')
    ->state('Washington DC')
    ->postalCode('DC 20500')
    ->country('United States')
    ->addressDetails();

$nominatim->find($search);

The result will be an array of results (in this case, only one result was found)., (*7)

Array
(
    [0] => Array
        (
            [place_id] => 2632584431
            [licence] => Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright
            [osm_type] => way
            [osm_id] => 238241022
            [boundingbox] => Array
                (
                    [0] => 38.8974898
                    [1] => 38.897911
                    [2] => -77.0368539
                    [3] => -77.0362521
                )

            [lat] => 38.8976989
            [lon] => -77.036553192281
            [display_name] => The White House, 1600, Pennsylvania Avenue Northwest, Thomas Circle, Southwest Waterfront, Washington, 20500, United States of America
            [class] => tourism
            [type] => attraction
            [importance] => 1.5576757387296
            [icon] => http://nominatim.openstreetmap.org/images/mapicons/poi_point_of_interest.p.20.png
            [address] => Array
                (
                    [attraction] => The White House
                    [house_number] => 1600
                    [pedestrian] => Pennsylvania Avenue Northwest
                    [neighbourhood] => Thomas Circle
                    [suburb] => Southwest Waterfront
                    [city] => Washington
                    [county] => Washington
                    [postcode] => 20500
                    [country] => United States of America
                    [country_code] => us
                )

        )

)

The Versions

22/01 2018

dev-develop

dev-develop

A simple interface to OSM Nominatim search.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

22/01 2018

dev-master

9999999-dev

A simple interface to OSM Nominatim search.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

22/01 2018

1.0.0

1.0.0.0

A simple interface to OSM Nominatim search.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

19/08 2016

dev-feature/guzzle_6

dev-feature/guzzle_6

A simple interface to OSM Nominatim search.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

05/02 2015

0.2.0

0.2.0.0

A simple interface to OSM Nominatim search.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

09/07 2014

0.1

0.1.0.0

A simple interface to OSM Nominatim search.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires