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

Practical GIS

Book Description

Learn the basics of Geographic Information Systems by solving real-world problems with powerful open source tools

About This Book

  • This easy-to-follow guide allows you to manage and analyze geographic data with ease using open source tools
  • Publish your geographical data online
  • Learn the basics of geoinformatics in a practical way by solving problems

Who This Book Is For

The book is for IT professionals who have little or no knowledge of GIS. It’s also useful for those who are new to the GIS field who don’t want to spend a lot of money buying licenses of commercial tools and training.

What You Will Learn

  • Collect GIS data for your needs
  • Store the data in a PostGIS database
  • Exploit the data using the power of the GIS queries
  • Analyze the data with basic and more advanced GIS tools
  • Publish your data and share it with others
  • Build a web map with your published data

In Detail

The most commonly used GIS tools automate tasks that were historically done manually—compiling new maps by overlaying one on top of the other or physically cutting maps into pieces representing specific study areas, changing their projection, and getting meaningful results from the various layers by applying mathematical functions and operations. This book is an easy-to-follow guide to use the most matured open source GIS tools for these tasks.

We’ll start by setting up the environment for the tools we use in the book. Then you will learn how to work with QGIS in order to generate useful spatial data. You will get to know the basics of queries, data management, and geoprocessing.

After that, you will start to practice your knowledge on real-world examples. We will solve various types of geospatial analyses with various methods. We will start with basic GIS problems by imitating the work of an enthusiastic real estate agent, and continue with more advanced, but typical tasks by solving a decision problem.

Finally, you will find out how to publish your data (and results) on the web. We will publish our data with QGIS Server and GeoServer, and create a basic web map with the API of the lightweight Leaflet web mapping library.

Style and approach

The book guides you step by step through each of the core concepts of the GIS toolkit, building an overall picture of its capabilities. This guide approaches the topic systematically, allowing you to build upon what you learned in previous chapters. By the end of this book, you’ll have an understanding of the aspects of building a GIS system and will be able to take that knowledge with you to whatever project calls for it.

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 code file.

Table of Contents

  1. 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
  2. Setting Up Your Environment
    1. Understanding GIS
    2. Setting up the tools
      1. Installing on Linux
      2. Installing on Windows
      3. Installing on macOS
      4. Getting familiar with the software
      5. About the software licenses
    3. Collecting some data
      1. Getting basic data
        1. Licenses
      2. Accessing satellite data
        1. Active remote sensing
        2. Passive remote sensing
        3. Licenses
      3. Using OpenStreetMap
        1. OpenStreetMap license
    4. Summary
  3. Accessing GIS Data With QGIS
    1. Accessing raster data
      1. Raster data model
      2. Rasters are boring
    2. Accessing vector data
      1. Vector data model
      2. Vector topology - the right way
      3. Opening tabular layers
    3. Understanding map scales
    4. Summary
  4. Using Vector Data Effectively
    1. Using the attribute table
      1. SQL in GIS
    2. Selecting features in QGIS
      1. Preparing our data
      2. Writing basic queries
      3. Filtering layers
      4. Spatial querying
      5. Writing advanced queries
    3. Modifying the attribute table
      1. Removing columns
      2. Joining tables
      3. Spatial joins
      4. Adding attribute data
    4. Understanding data providers
    5. Summary
  5. Creating Digital Maps
    1. Styling our data
      1. Styling raster data
      2. Styling vector data
        1. Mapping with categories
        2. Graduated mapping
    2. Understanding projections
      1. Plate Carrée - a simple example
      2. Going local with NAD83 / Conus Albers
      3. Choosing the right projection
    3. Preparing a map
      1. Rule-based styling
      2. Adding labels
      3. Creating additional thematics
    4. Creating a map
      1. Adding cartographic elements
    5. Summary
  6. Exporting Your Data
    1. Creating a printable map
      1. Clipping features
      2. Creating a background
      3. Removing dangling segments
      4. Exporting the map
      5. A good way for post-processing - SVG
    2. Sharing raw data
      1. Vector data exchange formats
        1. Shapefile
        2. WKT and WKB
        3. Markup languages
        4. GeoJSON
      2. Raster data exchange formats
        1. GeoTIFF
        2. Clipping rasters
        3. Other raster formats
    3. Summary
  7. Feeding a PostGIS Database
    1. A brief overview of databases
      1. Relational databases
      2. NoSQL databases
      3. Spatial databases
    2. Importing layers into PostGIS
      1. Importing vector data
      2. Spatial indexing
      3. Importing raster data
    3. Visualizing PostGIS layers in QGIS
      1. Basic PostGIS queries
    4. Summary
  8. A PostGIS Overview
    1. Customizing the database
      1. Securing our database
      2. Constraining tables
      3. Saving queries
    2. Optimizing queries
    3. Backing up our data
      1. Creating static backups
      2. Continuous archiving
    4. Summary
  9. Spatial Analysis in QGIS
    1. Preparing the workspace
      1. Laying down the rules
    2. Vector analysis
      1. Proximity analysis
      2. Understanding the overlay tools
      3. Towards some neighborhood analysis
    3. Building your models
    4. Using digital elevation models
      1. Filtering based on aspect
      2. Calculating walking times
    5. Summary
  10. Spatial Analysis on Steroids - Using PostGIS
    1. Delimiting quiet houses
      1. Proximity analysis in PostGIS
      2. Precision problems of buffering
      3. Querying distances effectively
      4. Saving the results
    2. Matching the rest of the criteria
      1. Counting nearby points
    3. Querying rasters
    4. Summary
  11. A Typical GIS Problem
    1. Outlining the problem
    2. Raster analysis
      1. Multi-criteria evaluation
      2. Creating the constraint mask
    3. Using fuzzy techniques in GIS
      1. Proximity analysis with rasters
      2. Fuzzifying crisp data
      3. Aggregating the results
    4. Calculating statistics
      1. Vectorizing suitable areas
      2. Using zonal statistics
      3. Accessing vector statistics
    5. Creating an atlas
    6. Summary
  12. Showcasing Your Data
    1. Spatial data on the web
      1. Understanding the basics of the web
      2. Spatial servers
    2. Using QGIS for publishing
    3. Using GeoServer
      1. General configuration
      2. GeoServer architecture
      3. Adding spatial data
      4. Tiling your maps
    4. Summary
  13. Styling Your Data in GeoServer
    1. Managing styles
    2. Writing SLD styles
      1. Styling vector layers
        1. Styling waters
        2. Styling polygons
        3. Creating labels
      2. Styling raster layers
    3. Using CSS in GeoServer
      1. Styling layers with CSS
        1. Creating complex styles
        2. Styling raster layers
    4. Summary
  14. Creating a Web Map
    1. Understanding the client side of the Web
      1. Creating a web page
        1. Writing HTML code
      2. Styling the elements
      3. Scripting your web page
    2. Creating web maps with Leaflet
      1. Creating a simple map
      2. Compositing layers
    3. Working with Leaflet plugins
      1. Loading raw vector data
      2. Styling vectors in Leaflet
      3. Annotating attributes with popups
      4. Using other projections
    4. Summary
  15. Appendix