Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Geospatial Analysis Cookbook

You're reading from  Python Geospatial Analysis Cookbook

Product type Book
Published in Nov 2015
Publisher
ISBN-13 9781783555079
Pages 310 pages
Edition 1st Edition
Languages
Toc

Table of Contents (20) Chapters close

Python Geospatial Analysis Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Setting Up Your Geospatial Python Environment 2. Working with Projections 3. Moving Spatial Data from One Format to Another 4. Working with PostGIS 5. Vector Analysis 6. Overlay Analysis 7. Raster Analysis 8. Network Routing Analysis 9. Topology Checking and Data Validation 10. Visualizing Your Analysis 11. Web Analysis with GeoDjango Other Geospatial Python Libraries
Mapping Icon Libraries
Index

Creating a Shapefile from point data stored in Microsoft Excel


Excel files are so common these days that often an analyst or developer receives an Excel file that needs to be mapped out. Sure, we could save these to a .csv file and then use the great Python standard csv module but this involves an extra manual step. We will take a look at how to read a very simple Excel file that contains a list of Europe's highest mountains. This data set is derived from http://www.geonames.org.

Getting ready

We are going to need one new Python library to read a Microsoft Excel file and this library is xlrd (http://www.python-excel.org).

Note

This library can only READ an Excel file; if you are looking to write out to an Excel file, download and install xlwt.

First, fire up you virtual environment from your workon pygeoan_cb Linux machine, run pip install xlrd, and you are off to the races.

To write out to a new Shapefile, we will use the pyshp library we installed in Chapter 1, Setting Up Your Geospatial Python...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}