• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
North River Geographic Systems Inc

North River Geographic Systems Inc

Geospatial Problem Solving

  • Home
  • About NRGS
  • Training
  • Blog
  • Resources
    • QGIS Tutorials and Hacks
    • GDAL Tutorials and Hacks
    • PostGIS Tutorials and Hacks
    • GRASS Tutorials and Hacks
    • OSM Tutorials and Hacks
  • Services
    • Support and Services
    • Tennessee NG911 Address Server
    • Forestry Database Services
    • Conservation GIS
  • Portfolio
  • Show Search
Hide Search

Upcoming fun in QGIS 2.8: Define your own Python Functions

I wrestled with this blog post quite a bit. One of the spots I’ve fallen short in my GIS life has been programming. I’ve done the whole path of AML, Avenue, some dive into VB, mix in some shell scripting….then python. Toss all of that out now as history except for python. It takes me about a day to get back into python mode because it’s just a tool I use occasionally. I need to use it more – but another story for another time.

Anyone else ever type pythong?

Anyway – When ArcGIS 10 came out I started working my way through ArcPy. When QGIS 2.6 came out I decided to start working my way through plugins and the python console. My goal is to write a plugin. I’ve got an itch to scratch on a project and I think this is going to be my outlet.

I started playing with QGIS 2.8 and found something nifty in the field calculator and the expression editor: Functions. You can write your own in python. Of course no matter what I say at this point at best I’m only badly repeating what The Great Nathan has already written:

A new feature for QGIS 2.8 is a function editor for expressions. Being able to define your own custom functions has be possible for a while now, over a year, I even have a plugin (Expressions+) that adds some extra ones, however it wasn’t easy for new users and required you to create files that lived on python path while also editing the startup.py file for QGIS so that functions got registed at start up. Way too much effort for my liking.

Complete with Video From Nathan:

So as I always say – learn some python and that’s actually not a wasted thing to do. Of course as I look back I do wonder what is next “thing” I might need to learn.

…and as I always say – It’s nice to use qgis. If for nothing else because I can email the developers. I can say “HEY WHAT ABOUT…..” and they will respond back with “You’re insane” (no one has ever done that) or “Hey that’s a half decent idea that won’t wreck the project”.

Intro to QGIS class is now online!

Primary Sidebar

Calendar

July 2022
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031
« Jun    

What we talk about

addresses ArcGIS ASPRS Athens Atlanta Beer Cartography Chattanooga Community Conference Data Do Some Good Education ESRI Forestry FOSS4G foss4gna Fulcrum gaurisa ga urisa Gdal Georgia GeoServer GIS GISP Google GRASS Lidar MAGS open source OpenStreetMap osgeo OSM postgis Python QGIS raleigh Rambling Small Business Tennessee TNGIC Topology Training URISA usvi

North River Geographic Systems Inc

  • Home
  • About NRGS
  • Training
  • Blog
  • Resources
  • Services
  • Portfolio