O'Reilly logo

Building Mapping Applications with QGIS by Erik Westra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using memory-based layers

While a map layer would normally display geospatial data taken from an external data source such as a shapefile, a raster DEM file, or a database, it is also possible to create geospatial features directly from your Python code. For example, imagine that you write a program to display the halfway point along a road. This halfway point could be represented as a QgsPoint geometry, which would be displayed on the map using an appropriate marker symbol. Since you are calculating the point, this isn't a feature you would want to store in a shapefile or database. Rather, the feature is calculated and displayed when your program is run.

This is an ideal application for a memory-based layer. This type of layer stores geospatial ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required