You are previewing Python Geospatial Development Essentials.
O'Reilly logo
Python Geospatial Development Essentials

Book Description

Utilize Python with open source libraries to build a lightweight, portable, and customizable GIS desktop application

In Detail

This book provides you with the resources to successfully develop your own GIS application in Python. The book begins by walking you through the loading and saving of data structures before you start to build the look and feel of your application and create its interactive map window. You'll then move on to managing, editing, and analyzing spatial data from within the application and finish with instructions for packaging the application for distribution.

By the end of the book, you should be able to use your GIS application as a template for further development, with the potential to expand and customize it to suit your needs.

What You Will Learn

  • Design and structure a basic GIS application based on existing tools

  • Customize Tkinter application widgets to make your very own toolkit of flexible and reusable GIS widgets

  • Load, manipulate, and save spatial data, both vector and raster

  • Create an interactive and zoomable window for visualizing spatial data

  • Manage and organize spatial data

  • Create the beginnings of a comprehensive Python library for many types of geospatial tasks, and use this API as the engine behind your application

  • Package your final application into a lightweight and portable executable application

  • 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. Python Geospatial Development Essentials
      1. Table of Contents
      2. Python Geospatial Development 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. Errata
          3. Piracy
          4. Questions
      8. 1. Preparing to Build Your Own GIS Application
        1. Why reinvent the wheel?
        2. Setting up your computer
        3. Installing third-party packages
        4. Imagining the roadmap ahead
        5. Summary
      9. 2. Accessing Geodata
        1. The approach
        2. Vector data
          1. A data interface for vector data
            1. The vector data structure
            2. Computing bounding boxes
            3. Spatial indexing
          2. Loading vector files
            1. Shapefile
            2. GeoJSON
            3. File format not supported
          3. Saving vector data
            1. Shapefile
            2. GeoJSON
            3. File format not supported
        3. Raster data
          1. A data interface for raster data
            1. The raster data structure
            2. Positioning the raster in coordinate space
            3. Nodata masking
          2. Loading raster data
            1. GeoTIFF
            2. File format not supported
          3. Saving raster data
            1. GeoTIFF
            2. File format not supported
        4. Summary
      10. 3. Designing the Visual Look of Our Application
        1. Setting up the GUI package
        2. Creating the toolkit building blocks
          1. Themed styling
          2. Basic buttons
          3. Buttons with icons
          4. Toolbars
          5. The Ribbon tab system
          6. The bottom status bar
          7. The layers pane
          8. The Map widget
          9. Pop-up windows
          10. Dispatching heavy tasks to thread workers
        3. Using the toolkit to build the GUI
        4. Testing our application
        5. Summary
      11. 4. Rendering Our Geodata
        1. Rendering
          1. Installing PyAgg
          2. A sequence of layers
          3. The MapCanvas drawer
          4. Individual layer renderings
            1. Vector layers
            2. Raster layers
        2. Interactively rendering our maps
          1. Linking the MapView to the renderer
            1. Requesting to render a map
            2. Resizing the map in proportion to window resizing
          2. The LayersPane as a LayerGroup
          3. Adding layers
          4. Editing layers in the LayersPane widget
            1. Click-and-drag to rearrange the layer sequence
          5. Zooming the map image
            1. Map panning and one-time rectangle zoom
            2. A navigation toolbar
        3. Putting it all together
        4. Summary
      12. 5. Managing and Organizing Geographic Data
        1. Creating the management module
        2. Inspecting files
        3. Organizing files
          1. Vector data
            1. Splitting
            2. Merging
            3. Geometry cleaning
          2. Raster data
            1. Mosaicking
            2. Resampling
        4. Weaving functionality into the user interface
          1. Layer-specific right-click functions
            1. Defining the tool options windows
          2. Setting up the management tab
            1. Defining the tool options windows
        5. Summary
      13. 6. Analyzing Geographic Data
        1. Creating the analysis module
        2. Analyzing data
          1. Vector data
            1. Overlap summary
            2. Buffer
          2. Raster data
            1. Zonal statistics
        3. Weaving functionality into the user interface
          1. Layer-specific right-click functions
            1. Defining the tool options windows
          2. Setting up the analysis tab
            1. Defining the tool options window
        4. Summary
      14. 7. Packaging and Distributing Your Application
        1. Attaching an application logo
          1. The icon image file
          2. Assigning the icon
        2. The application start up script
        3. Packaging your application
          1. Installing py2exe
          2. Developing a packaging strategy
          3. Creating the build script
          4. Adding the visual C runtime DLL
        4. Creating an installer
          1. Installing Inno Setup
          2. Setting up your application's installer
        5. Summary
      15. 8. Looking Forward
        1. Improvements to the user interface
          1. Saving and loading user sessions
          2. File drag and drop
          3. GUI widgets
        2. Other variations of the user interface
        3. Adding more GIS functionality
          1. Basic GIS selections
          2. More advanced visualization
          3. Online data services
          4. Converting between raster and vector data
          5. Projections
          6. Geocoding
          7. Going the GDAL/NumPy/SciPy route
        4. Expanding to other platforms
          1. Touch devices
        5. Summary
      16. Index