Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# More efficient intersection check. First, it creates a list of overlapping bounding boxes and then loops over it to check for actual intersections, potentially leaving some features untouched which saves time | |
# How to use: | |
# - change name and name2 variables so that they represent the layers you want to check for intersection | |
# - create a new integer field in layer "name", give it a value of 0 and enter the name in the variable below | |
# Importing dependencies for outside the QGIS Python console | |
from qgis.PyQt.QtCore import ( | |
QRectF,) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get stats for a raster along a line, e.g. height data along a hiking/running path. | |
# How to use: draw or import a line. Use the Points along geometry-tool to place points on the line.There is likely | |
# no benefit in putting the points closer together than the resolution of the height data raster. If you are asked to input the distance | |
# in degrees, you have to reproject the layer into a UTM-coordinate system. Then run the SAGA tool | |
# Add raster values to points (SAGA has to be activated under plugins). | |
from qgis.core import QgsProject | |
import math | |
# User input goes here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: Calculates the planform and profile curvature of a raster surface for a folder of .tif files. | |
# Requirements: Spatial Analyst Extension | |
# Import system modules | |
import arcpy | |
from arcpy import env | |
from arcpy.sa import * | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if necessary run: install.packages("scales","ggplot2",xml2","terra","sf","dplyr","lubridate","geosphere") | |
library(xml2) | |
library(terra) | |
library(sf) | |
library(dplyr) | |
library(lubridate) | |
library(geosphere) | |
library(ggplot2) | |
library(scales) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Importing dependencies for outside the QGIS Python console | |
from qgis.PyQt.QtCore import ( | |
QRectF,) | |
from qgis.core import ( | |
QgsProject, | |
QgsLayerTreeModel,QgsVectorLayer,QgsApplication, | |
QgsDataSourceUri, | |
QgsDistanceArea, #for area calculation | |
QgsCategorizedSymbolRenderer, | |
QgsClassificationRange, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Importing dependencies for outside the QGIS Python console | |
from qgis.PyQt.QtCore import ( | |
QRectF,) | |
from qgis.core import ( | |
QgsProject, | |
QgsLayerTreeModel,QgsVectorLayer,QgsApplication, | |
QgsDataSourceUri, | |
QgsDistanceArea, #for area calculation | |
QgsCategorizedSymbolRenderer, | |
QgsClassificationRange, |