O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

PostGIS Essentials

Book Description

Learn how to build powerful spatial database solutions with PostGIS quickly and efficiently

In Detail

PostGIS is one of the world's leading spatial databases, created as a geographic extension for PostgreSQL. With it, users are able to manipulate and visualize spatial data incredibly effectively and efficiently.

PostGIS Essentials introduces you to the fundamentals of PostGIS, giving you easy access to one of the most popular and powerful spatial databases available today. You will begin by learning how to install and successfully set up PostGIS before covering how to create your first spatial database. The book will then help you to develop your skills further as you will learn how to insert GIS objects as well as how to select and filter GIS queries with clear and practical information. You will then learn how to display GIS data graphically and create effective visualizations. The book concludes with tips, tricks, and techniques to help you optimize PostGIS and improve the performance of your database.

What You Will Learn

  • Install and configure PostGIS and other useful open source tools such as QGIS and GDAL for working with spatial data
  • Create spatial databases and tables from scratch and develop spatial queries through practical examples
  • Obtain useful spatial data from public and free sources and insert and manage this data to be useful with your data tables
  • Familiarize yourself with the fundamental concepts in PostGIS and spatial databases
  • Visualize the data stored in your tables and combine it with other data sources to create beautiful graphical solutions using QGIS
  • Use the GDAL spatial library to transform and reproject from a wide range of data formats such as vectorial and raster geospatial data formats
  • Develop a complete GIS application from scratch by implementing the concepts learned in the book

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. PostGIS Essentials
    1. Table of Contents
    2. PostGIS Essentials
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. Introducing PostGIS and Setting it Up
      1. What is PostGIS?
      2. Why PostGIS?
      3. Installing PostgreSQL
      4. Installing PostGIS
      5. Installing QGIS
      6. Summary
    9. 2. Creating Your First Spatial Database
      1. The development of spatial databases
      2. Creating our first database using a command line
        1. Creating our first spatial data table using a command line
      3. Creating a spatial database using GUI
        1. Creating a spatial data table using GUI
        2. Creating a spatial data table using a SQL script
      4. Summary
    10. 3. Inserting GIS Objects
      1. Developing insertion queries with GIS objects
      2. What is a spatial reference system?
        1. Including SRS information in our spatial tables
          1. Getting data from external sources
            1. Extracting spatial data from an shp file
            2. Importing shp files with a graphical tool
      3. Summary
    11. 4. Selecting and Filtering GIS Queries
      1. Grouping data
      2. Nonspatial queries
      3. Spatial functions
        1. The ST_Distance functions (geometry, geometry)
        2. The ST_DWithin function (geometry, geometry, float)
        3. The ST_Length function
        4. The ST_Intersects function (geometry, geometry)
        5. The ST_Within function (geometry A, geometry B)
      4. Queries that use data from two databases
        1. The Postgres_FWD module
      5. Developing spatial queries with our own data
      6. Summary
    12. 5. Displaying GIS Data Graphically
      1. Introducing QGIS
      2. The QGIS application
      3. Hands-on with QGIS
      4. Developing a spatial query from QGIS
      5. Summary
    13. 6. Management of Vectorial and Raster Data with PostGIS
      1. The GDAL/OGR library
      2. Working with GDAL/OGR commands
      3. Working with raster files
        1. Inserting raster data into our database
        2. Graphically displaying raster data saved in our database
      4. Summary
    14. 7. Performance Tuning
      1. Spatial indexes in PostGIS
      2. Tuning spatial queries
      3. Tuning PostgreSQL's configuration file for our spatial database
      4. Summary
    15. 8. Developing a GIS Web Application
      1. Developing a web application
        1. Installing the web server
        2. Installing a PHP module
        3. Installing Leaflet
        4. Implementing the web application
      2. Summary
    16. 9. Developing a Desktop GIS Application
      1. What is World Wind?
        1. How does World Wind work?
          1. Previous requirements
            1. Hardware
            2. Software
          2. Installing World Wind
        2. Setting up the development environment
          1. Installing Eclipse
        3. Configuring the development environment
      2. Coding our first application
        1. Getting the PostgreSQL–Java binding
      3. Developing a management application
      4. Summary
    17. Index