Tutorials in C++

Tutorial 7 - Creating spatial datasets with the QGIS API

Hi all.This is a repost since the original article got deleted some
how. A while ago I decided to make some improvements to some of my code
that creates a shapefile. I was using shapelib which
is nice and simple and self contained, but I found it a little awkward
to add attributes to features in a flexible way. Since my application
use the QGIS libs anyway, I thought I may as well give using

Tutorial 6 - Working with vector attribute tables

In my last tutorial I showed you how to create temporary objects on the map canvas. Today I will giving you a basic introduction to using QgsFeatureAttribute - which allows your to retrieve the attributes for a feature in a vector layer. The attributes are descriptive data related to the geometry of the feature.

Note this is a repeat post since the original copy of this article disappeared from the blog.

First lets take a look at what we will achieve in this tutorial.

Tutorial 4 Adding rasters to the QGIS map canvas

In my last tutorial I showed you how to label vector features on the map canvas. Today we will take a brief look at how to add a raster map to the canvas.

Note his is a repeat post since the original version of this tutorial disappeared from this blog.

Tutorial 5: Creating temporary features on the map canvas

In my last tutorial I showed you how to add a raster layer to the map canvas. Today we will take a first look at managing transient objects on the map canvas. The QgsRubberBand class lets you draw lines and polygons on top of the map canvas, without them belonging to any data layer. This is typically useful for digitising and annotating maps. In a future tutorial I will show you how to do the same thing with point features.

Tutorial 3: Labelling map canvas features

In my last tutorial I briefly ran through using map tools to facilitate user interaction with the map canvas. Today we will take a brief look at labelling features.

Tutorial 2: Using MapTools with the QGIS Canvas API

Earlier this week I wrote up a simple tutorial showing the useage of the QgsMapCanvas api to create a simple application that loads a shapefile and displays the points in it. But what good is map that you can't interact with? Enter QgsMapTool - the base class for all tools that need to interact with the canvas.

Tutorial 1: Write a simple mapping application using the new QGIS Canvas API

Ok so not everyone wants a full blown GIS desktop application. Sometimes you want to just have a widget inside your application that displays a map while the main goal of the application lies elsewhere. Perhaps a database frontend with a map display?

Syndicate content