I wonder if I can make cross sections of GIS data (other than height). An example:

I have a shapefile of a city with building plots and attribute values of the plot size. I want to choose a random line on my map (for example: from the centre of the city to the suburb) and consider it as a cross section. Can I create a line graph that shows me the evolution of the plot size along this line?

Or a list of the shapes and their attributes ordered along the line?

2 Answers 2


If you know how to do a cross section with heights (using a DEM raster), then you know how to do it with any other variable.

All you need to do is convert your data ( the buildings polygons) in raster using the desired field. And then use it in the profile plugin.


A rough and ready approach to this could utilise Excel (or any other spreadsheet package) for the graph component:

  1. Create a polygon buffer from a point inside the CBD, when I've done this kind of thing before I've used 100 meter increments;
  2. Update the lots data with the buffer value;
  3. Define a transect through the city - again, when I've done this before I used the polygon select in QGIS. I used that approach to "dodge" around park land or similar features along the transect - although you could also just create a new polygon layer;
  4. Select all the lots falling within the transect;
  5. Export the selection as CSV to Excel, and order the lots by buffer distance... Graph

Cleaning - you may wish to remove all null values from the selected data before graphing as these could effect the overall distribution.

Edit You could use the Group function in Excel to generate an average, min or max of the values within each buffer distance - these could be graphed together to indicate variance within the value. This approach would work well if your transect crosses over any pockets of higher density (for example) as the max values would pick up the building heights.

For presentation:

1) Map with the transect and potentially selected lots shown;

2) Graph - save the final graph from Excel as a Pdf*, and insert that into the final QGIS layout

  • A Pdf from Excel can be opened in Inkscape / Illustrator and further edited - it also gives you the option to save the graph as a png with a higher dpi (say 600), which means that the image is nice and sharp.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.