Moore Spatial

GIS and Related Pursuits

By

Stupid Simple Geocoder

I just released the Stupid Simple Geocoder over on GitHub.

Stupid Simple Geocoder is a PHP geocoder that geocodes to the city level with the GeoNames free geocoding service. In order to reduce web requests and speed up your own page loads it’s backed up by an SQLite cache.

It has a single method named geocode which accepts either a single place name string, or an array of place name strings. In the single case it returns a single GeoJSON Feature object on success, or FALSE on failure. When given an array of place name strings it returns an Array of places it successfully geocoded (NOTE: this means the array could be empty!).

The returned Feature objects could be used to create a GeoJSON FeatureCollection, or for whatever you want. But mainly to construct FeatureCollections. That’s what I do!

One Response to Stupid Simple Geocoder

  1. Pingback: Announcing the Stupid Simple Geocoder » Stuporglue.org