1. 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

  2. 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

  3. pgRouting, OpenStreetMap, and QGIS

    Thu 14 October 2010
    cfarmer

    I mentioned a few posts back that there was a great resource for downloading OpenStreetMap data, and that it was relatively easy to import osm data into PostgreSQL/PostGIS for use with pgRouting to calculate shortest paths and various other network-based operations. In this post, I’ll outline the steps required to get all this up and going, and provide a quick example to show how this can be combined with QGIS to visualise the computed shortest path directly.

    read more

    comments

  4. 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

  5. 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

9 / 13

twitter

recent visitors