Chapter 7. Working with Spatial Data

In this chapter, we will apply and build on the knowledge we have gained in previous chapters to create a hypothetical web application called DISTAL (Distance-based Identification of Shorelines, Towns And Lakes). In the process of building this application, we will learn how to:

  • Work with substantial amounts of geo-spatial data stored in a database
  • Perform complex spatial database queries
  • Deal with accurate distance-based calculations and limiting queries by distance
  • Review and improve an application's design and implementation
  • Handle usability, quality, performance, and scalability issues

About DISTAL

The DISTAL application will have the following basic workflow:

  • The user starts by selecting the country they wish to work with:
About DISTAL
  • A simple map of the country is displayed:
About DISTAL
  • The user selects a desired radius in miles, and clicks on a point within the country:
About DISTAL
  • The system identifies all the cities and towns within the given radius of that point:
About DISTAL
  • Finally, the resulting features are displayed at a higher resolution for the user to view or print:
About DISTAL

While we haven't yet looked at the map-rendering and user-interface aspects of geo-spatial applications, we do know enough to proceed with a very simple implementation of the DISTAL system. In this implementation, we will make use of basic CGI scripts and a "black box" map-generator module, while focussing on the data storage and manipulation aspects of the DISTAL application.

Note that Chapter 8, Using Python and Mapnik to Generate Maps will look at the details of generating maps using the Mapnik map-rendering toolkit, while Chapter 9, Web Frameworks for Python Geo-Spatial Development will look at the user-interface aspects of building a sophisticated web-based geo-spatial application. If you wanted to, you could rewrite the DISTAL implementation using the information in the next two chapters to produce a more robust and fully-functioning version of the DISTAL application that can be deployed on the Internet.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.142.166