1. Essential Python Geospatial Libraries

    Fri 12 July 2013
    cfarmer

    Just so I don’t forget, here is a list of really awesome Python libraries that I’m using these days to do lots of fun things with spatial data [UPDATE: I’ve added a few more]:

    • pandas - For data handling and munging
    • shapely - For geometry handling
    • cartopy - For plotting spatial data
    • rtree - For efficiently querying spatial data
    • nodebox-opengl - For playing around with animations
    • statsmodels - For models and stats in Python (otherwise I’d use R)
    • numpy - For pretty much anything that involves arrays
    • geopy - For geolocating and things like that
    • ipython - For a wondering interactive environment in which to play
    • freetype-py - For converting font glyphs to polygons (odd I know…)
    • ogr/gdal - For reading, writing, and transforming geospatial data formats
    • pyqgis - For anything and everything GIS
    • fiona - For making it easy to read/write geospatial data formats
    • matplotlib - For all my plotting needs
    • networkx - For working with networks (duh!)
    • pelican - For blogging about all this stuff…
    • pysal - For all your spatial econometrics needs (and more)
    • descartes - For plotting geometries in matplotlib

    Based on Twitter and some of the comments below, I should also add:

    • geographiclib - For solving geodesic problems
    • pyshp - For reading and writing shapefiles (in pure Python)
    • pyproj - For conversions between projections

    Any others I’ve missed?

    read more

    comments

  2. manageR and rpy2 installation problems

    Sat 06 October 2012
    cfarmer

    Unfortunately, I haven’t had much time recently to update or work on manageR, but I’m hoping that will change in the next few months… Having said that, there are quite a few people out there that have been having trouble installing manageR (and the required rpy2) on their system to get things working at all! I have had some individuals provide possible fixes and suggestions on how to get things working properly on various platforms, and I’m going to use this post to amalgamate them, and hopefully create a one stop post for all your rpy2 and manageR needs. I’m also hoping that people will post potential fixes in the comments to help others with more specific problems?

    read more

    comments

  3. Adding direct editing of geometry fields in QGIS

    Sat 12 March 2011
    cfarmer

    Being able to add/remove attributes isn’t actually a very new feature for QGIS at this point. However, to date non of the fTools functions (Vector menu) have taken advantage of this capability. If a tool needed to create a new field in the input vector layer, it simply wrote a new version of the vector layer to disk with the additional fields added. There have been several requests to allow some tools to add/update attributes directly on the input layers, so I went ahead and created a script to test this functionality out. I’ve provided a copy here for anyone who would like to test it out before I add it to QGIS permanently. Basically, the script will replace/update three of the Vector menu tools, including Analysis \> Sum line lengths, Analysis \> Points in polygon, and Geometry tools \> Add/Export geometry info.

    read more

    comments

  4. Because its Friday

    Sat 06 November 2010
    cfarmer

    My two favorite scientific programming languages are Python and R, each for their own specific strengths. I stick with R for most of my serious stats stuff, but for everyday processing, analysis, and GUI building, Python is my modus operandi. Lately however, I’ve been doing more and more things in Python… even the stats stuff. When doing statistical analysis in Python, I usually use the excellent rpy2 library to communicate between Python and R. As a result, I have put together quite a few little code snippets to work with R commands in Python. Recently, I decided to put ...

    read more

    comments

  5. Adding a bit of class(ification) to QGIS

    Wed 29 September 2010
    cfarmer

    In my last post, I implemented several classification algorithms for quantitative data which could be used directly from the Python console in QGIS. While this was a handy addition to my PyQGIS toolkit, it wasn’t quite handy enough for me, so I decided to (re)implement the same algorithms in C++ so that they could be added directly to the QGIS API. Before I did that however, I wanted to fix a few issues, and speed things up a bit, particularly for the Jenks Natural Breaks algorithm, which can be quite slow for large datasets.

    After porting everything over ...

    read more

    comments

  6. Playing around with classification algorithms: Python and QGIS

    Thu 23 September 2010
    cfarmer

    Data visualization is part of my everyday work-flow. More often than not, I’m playing around with my data in a GIS to tease out interesting or informative spatial patterns, or to ensure that I’m getting the results that I’m expecting. As a result, I am constantly trying out different classification schemes to help me generalize spatial patterns, highlight outliers and/or patterns, or just plain mess around with my data.

    read more

    comments

  7. Speeding up geoprocessing in QGIS

    Thu 01 April 2010
    cfarmer

    Last night I had an uncontrollable urge to make geopoprocessing in QGIS better, faster and more fun! I had come across a couple of posts (here, here) on the idea of a cascaded union operation, and since it has recently been added to GEOS (which QGIS uses for its geometry operations), I thought I’d give a much needed boost to the fTools union tool and related functions.

    read more

    comments

  8. QGIS developer meeting update

    Wed 11 November 2009
    cfarmer

    Last week I attended the 2009 QGIS Developers Meeting in Vienna, Austria. We all had a really good time, met many new people, and actually got a lot done in the process. There have been updates about the meeting (hackfest) on the QGIS blog, and Tim Sutton has written a few words about our progress as well. I’m not going to repeat what others have said, but I would like to give a quick update on the work that I was doing at the meeting, and show off the new geoprocessing features now available to all QGIS developers (Python and C++).

    read more

    comments

2 / 3

twitter

recent visitors