Getting ready

  1. To access GeoNames web services, you need to create a user at http://www.geonames.org/login. The user we created for this recipe is postgis; you will need to change it with your username whenever you query the GeoNames web service URL.
  2. If you are using Windows, be sure to have OSGeo4W installed as suggested in the initial instructions of this chapter.
  3. If you are using Linux, follow the initial instructions for this chapter, create a Python virtualenv in order to keep a Python-isolated environment to be used for all the Python recipes in this book, and activate it:
      $ source postgis-cb-env/bin/activate
  1. Once activated, if you still haven't done so, you have to install the gdal and simplejson Python packages needed for this ...

Get PostGIS Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.