Sunday, April 19, 2015

Installing Python GIS Libraries on Ubuntu 14.04

I'm working my way through Python Geospatial Development, which as good fortune would have it, is the book we are using in my Introduction to GIS Algorithms and Programming course at George Mason University.  At the beginning of the course we were given a VirtualBox image of Ubuntu 12.04 with all the software and data files we need for the course preloaded.  Since I'm already running Ubuntu 14.04 as my regular desktop OS, I preferred to just install the packages (all of which are in the standard debian repositories) onto my desktop machines.

Here are the libraries we are using:
  • GDAL - The Geospatial Data Abstraction Library (see Python GDAL/OGR Cookbook for Python specific "recipes") for reading and writing geospatial data (GDAL for raster, OGR for vector).
  • pyproj - Performs cartographic transformations and geodetic computations.
  • Shapely - Manipulation and analysis of geometric objects in the Cartesian plane.
  • Mapnik - Toolkit for building mapping applications.
To install them for Python 2 on Ubuntu 14.04, run the following in a unix shell:
  • $ sudo apt-get install python-gdal
  • $ sudo apt-get install python-pyproj
  • $ sudo apt-get install python-shapely
  • $ sudo apt-get install python-mapnik2
Even on Ubuntu 15.04 Mapnik is only available for Python 2.  The other three libraries (gdal, pyproj, and shapely) are all available for Python 3.  This means that I will unfortunately have to use Python 2 for my mapping project.

I've now read the first eight chapters of Python Geospatial Development, which contain all the information I'll need for my project:
  • Chapter 1 - Geospatial Development Using Python
  • Chapter 2 - GIS
  • Chapter 3 - Python Libraries for Geospatial Development
  • Chapter 4 - Sources of Geospatial Data
  • Chapter 5 - Working with Geospatial Data in Python
  • Chapter 6 - GIS in the Database
  • Chapter 7 - Working with Spatial Data
  • Chapter 8 - Using Python and Mapnik to Produce Maps
It is often quite difficult to find good books about rapidly developing technologies like this, but this book does a good job.  The material is relevant, the presentation clear, and the examples both engaging and illuminating.

With background reading done and infrastructure setup, it is time to dig into the project.

16 comments:

  1. Thanks for sharing such a great information for Python. I learned with Dive into Python, and a french version of Thinking like a computer scientist.Thank you for sharing you blog..
    Best python Training Institute in Chennai

    ReplyDelete
  2. the blog is about the blog is about Python programmer #Python it is useful for students and Python Developers for more updates on python follow the link

    Python Online Training

    For more info on other technologies go with below links

    tableau online training hyderabad

    ServiceNow Online Training

    mulesoft Online Training

    ReplyDelete
  3. Thanks for sharing this, sure there are a number of best online Udemy courses regarding Python that can give us an idea about what Python is and how it works.

    ReplyDelete
  4. I learned a lot from this information. Thanks you. I want to share about best micronutrients for plants

    ReplyDelete
  5. Amazing, glad realm. I would at the rear of to write down when this as well - taking time and cement hard play a situation to make a comfortable article... anyway I put things off something over the top and in no way, shape or form appear to profit started. much thanks to you despite the fact that. thanks! Driver Toolkit License Key

    ReplyDelete
  6. much obliged to you for taking the length to examine this, I have a firm opinion roughly it and commend getting to know additional going vis- On the off chance that feasible, as you benefit speed, could you considerations refreshing your weblog long past helper assessment? it's miles the total obliging for me. thanks! Download Microsoft Office 2010 Full Crack + Keygen

    ReplyDelete
  7. Took me length to door all the explanation, but I actually partook in the article. It ended up being Very respecting me not entirely settled to all the analysts here! Its consistently accessible through now you can't unmarried-handedly be educated, yet with engaged! thanks! Happy Birthday Images With Quotes

    ReplyDelete
  8. Do you want to know about Gabi DeMartino Net Worth, early life, career, age, biography, and relationship status?

    ReplyDelete
  9. Great post, thanks for sharing valuable information, keep posting. Spoken English Training In Pune

    ReplyDelete

  10. Your article contains valuable knowledge and provides a helpful guide for installing Python GIS libraries on Ubuntu 14.04. It's great to see that you are utilizing resources such as the "Python Geospatial Development" book and taking an Introduction to GIS Algorithms and Programming course at George Mason University. Get know about python concept with Tigthning the grip on advanced Python Concepts: A Comprehensive Guide to Generators, Decorators, and Context Managers

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete