Book Image

Python Geospatial Analysis Essentials

By : Erik Westra
Book Image

Python Geospatial Analysis Essentials

By: Erik Westra

Overview of this book

Table of Contents (13 chapters)
Python Geospatial Analysis Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Next steps


While the shapeToMap.py program has been kept deliberately simple to make it easier to understand, there is a lot that can be done to improve this program and make it more useful. You might like to try challenging yourself by implementing the following new features:

  • Add an optional labelHalo entry to each map layer, which is used to draw a halo around the label text.

  • Add a labelPlacement entry to the map layer, to make it easy to control the label placement options.

  • Add a labelAllowOverlap entry to the map layer, which controls whether or not the labels are allowed to overlap.

  • Add a filter entry to the map layer, which is used to build a mapnik.Filter() expression to limit the set of features displayed within the map layer.

  • Add an option to dynamically calculate the visible extent of the map based on the bounding box for each feature. This would allow you to generate the map without having to calculate the bounds beforehand.

  • Add a call to os.system("open map.png") (for Mac OS X) or...