Table of Contents for
Python Geospatial Development - Third Edition

Version ebook / Retour

Cover image for bash Cookbook, 2nd Edition Python Geospatial Development - Third Edition by Erik Westra Published by Packt Publishing, 2016
  1. Cover
  2. Table of Contents
  3. Python Geospatial Development Third Edition
  4. Python Geospatial Development Third Edition
  5. Credits
  6. About the Author
  7. About the Reviewer
  8. www.PacktPub.com
  9. Preface
  10. What you need for this book
  11. Who this book is for
  12. Conventions
  13. Reader feedback
  14. Customer support
  15. 1. Geospatial Development Using Python
  16. Geospatial development
  17. Applications of geospatial development
  18. Recent developments
  19. Summary
  20. 2. GIS
  21. GIS data formats
  22. Working with GIS data manually
  23. Summary
  24. 3. Python Libraries for Geospatial Development
  25. Dealing with projections
  26. Analyzing and manipulating Geospatial data
  27. Visualizing geospatial data
  28. Summary
  29. 4. Sources of Geospatial Data
  30. Sources of geospatial data in raster format
  31. Sources of other types of geospatial data
  32. Choosing your geospatial data source
  33. Summary
  34. 5. Working with Geospatial Data in Python
  35. Working with geospatial data
  36. Changing datums and projections
  37. Performing geospatial calculations
  38. Converting and standardizing units of geometry and distance
  39. Exercises
  40. Summary
  41. 6. Spatial Databases
  42. Spatial indexes
  43. Introducing PostGIS
  44. Setting up a database
  45. Using PostGIS
  46. Recommended best practices
  47. Summary
  48. 7. Using Python and Mapnik to Generate Maps
  49. Creating an example map
  50. Mapnik concepts
  51. Summary
  52. 8. Working with Spatial Data
  53. Designing and building the database
  54. Downloading and importing the data
  55. Implementing the DISTAL application
  56. Using DISTAL
  57. Summary
  58. 9. Improving the DISTAL Application
  59. Dealing with the scale problem
  60. Performance
  61. Summary
  62. 10. Tools for Web-based Geospatial Development
  63. A closer look at three specific tools and techniques
  64. Summary
  65. 11. Putting It All Together – a Complete Mapping System
  66. Designing the ShapeEditor
  67. Prerequisites
  68. Setting up the database
  69. Setting up the ShapeEditor project
  70. Defining the ShapeEditor's applications
  71. Creating the shared application
  72. Defining the data models
  73. Playing with the admin system
  74. Summary
  75. 12. ShapeEditor – Importing and Exporting Shapefiles
  76. Importing shapefiles
  77. Exporting shapefiles
  78. Summary
  79. 13. ShapeEditor – Selecting and Editing Features
  80. Editing features
  81. Adding features
  82. Deleting features
  83. Deleting shapefiles
  84. Using the ShapeEditor
  85. Further improvements and enhancements
  86. Summary
  87. Index

GIS data formats

A GIS data format specifies how geospatial data is stored in a file (or multiple files) on disk. The format describes the logical structure used to store geospatial data within the file(s).

Note

While we talk about storing information on disk, data formats can also be used to transmit geospatial information between computer systems. For example, a web service might provide map data on request, transmitting that data in a particular format.

A GIS data format will typically support:

  • Geospatial data describing geographical features.
  • Additional meta-data describing this data, including the datum and projection used, the coordinate system and units that the data is in, the date this file was last updated, and so on.
  • Attributes providing additional information about the geographical features that are being described. For example, a city feature may have attributes such as name, population, average temperature, and so on.
  • Display information, such as the color or line style to use when a feature is displayed.

There are two main types of GIS data: raster format data and vector format data. Raster formats are generally used to store bitmapped images, such as scanned paper maps or aerial photographs. Vector formats, on the other hand, represent spatial data using points, lines, and polygons. Vector formats are the most common type used by GIS applications as the data is smaller and easier to manipulate.

Some of the more common raster formats include:

  • Digital Raster Graphic (DRG): This format is used to store digital scans of paper maps
  • Digital Elevation Model (DEM): This is used to record elevation data
  • Band Interleaved by Line (BIL), Band Interleaved by Pixel (BIP), Band Sequential (BSQ): These data formats are typically used by remote sensing systems

Some of the more common vector formats include:

  • Shapefile: This is an open specification developed by a company called the Environmental Systems Research Institute (ESRI) for storing and exchanging GIS data. A shapefile actually consists of a collection of files all with the same base name, for example, hawaii.shp, hawaii.shx, hawaii.dbf, and so on.
  • Simple Features: This is an OpenGIS standard for storing geographical data (points, lines, and polygons) along with associated attributes.
  • TIGER/Line: This is a text-based format previously used by the US Census Bureau to describe geographic features such as roads, buildings, rivers, and coastlines. More recent data comes in the Shapefile format, so the TIGER/Line format is only used for earlier Census Bureau datasets.
  • Coverage: This is a proprietary data format used by ESRI's ARC/INFO system.

In addition to these "major" data formats, there are also so-called micro-formats, which are often used to represent individual pieces of geospatial data. These are often used to represent shapes within a running program or to transfer shapes from one program to another, but they aren't generally used to store data permanently. As you work with geospatial data, you are likely to encounter the following micro-formats:

  • Well-known Text (WKT): This is a simple text-based format for representing a single geographic feature such as a polygon or LineString
  • Well-known Binary (WKB): This alternative to WKT uses binary data rather than text to represent a single geographic feature
  • GeoJSON: This is an open format for encoding geographic data structures and is based on the JSON data interchange format
  • Geography Markup Language (GML): This is an XML-based open standard for exchanging GIS data

Whenever you work with geospatial data, you need to know which format the data is in so that you can extract the information you need from the file(s) and, where necessary, transform the data from one format to another.