PyQGIS Tutorial: Geometry Conversion

Sometimes when doing a GIS task, we need to convert a vector file in a certain geometry to another geometry such as polygon to polyline, ...