Use Geocoder with Bernard

Let’s geocode an IPv4, a real address and foobar via the ChainProvider with FreeGeoIpProvider and GoogleMapsProvider with the CurlHttpAdapter using the GeoJsonDumper dumper. Then we need to make the Bernard Client with the PredisDriver because we will use Redis as a persistent engine. Our geocoding messages are quite simple objects so we will use the NaiveSerializer. Then configurations change if it’s a producer or a consumer. We will look closer later.

Geotools a geo-related PHP 5.3 library

Geotools supports now Redis, MongoDB and Memcached as cache engine. Read more in github – Well, Geotools is yet another project about geocoding tools, kit, library etc… Yes, but if you are a user of Geocoder you will appreciate it - I hope :) I started this, first of all, for my own needs and then because I was thinking how I could implement an easy way to batch geocoding and reverse geocondig requests in serie and especially in parallel.

Geocoder PHP library simple batch requests

This demo will run the CurlHttpAdapter against 10 providers which can geocode this address 10 rue Gambetta, Paris, France. We will then transform, if available, result objects in standard format via the WktDumper.