This task is based on my answer to this question from gis.stackexchange.com. Sometimes it happens that, when importing external files in QGIS (typically .CSV files), the fields specifying the longitude and latitude coordinates are accidentally inverted: this behavior will produce a different result in respect of the desired output. If we don’t want to repeat the same procedure, we may run a […]Read more "How to invert lon/lat coordinates in QGIS using Python"
This task is based on my answer to this question poped up on gis.stackexchange.com. We start from one point vector layer and one line vector layer: the goal for this task is to literally “snap” the line vector layer to the nearest points on the basis of a searching distance (i.e. we want to snap the line to the points which are […]Read more "How to snap lines to points in QGIS using Python"
Creating a layer using Python is quite simple. In the following steps, we’ll create a vector layer in memory and display it on the map. First of all, enable the Python Console from the Plugins Menu (it is available in the QGIS main window). A point is created as follows: The result is: We have just […]Read more "How to create a layer in QGIS using Python"