Getting ready

  1. First, import some data to be used as a test bed in PostGIS. Download the .kmz file containing information about 2012 global earthquakes from the USGS website at http://earthquake.usgs.gov/earthquakes/eqarchives/epic/kml/2012_Earthquakes_ALL.kmz. Save it in the working/chp03 directory (alternatively, you can use the copy of this file included in the code bundle provided with this book).
  2. A .kmz file is a collection of .kml files packaged with the ZIP compressor. Therefore, after unzipping the file (you may need to change the .kmz file extension to .zip), you may notice that it is composed of just a single .kml file. This file, which is in the GDAL abstraction, constitutes an OGR KML data source composed of nine different layers ...

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.