Look at this existing tutorial https://lerryws.xyz/posts/PyQGIS-in-Jupyter-Notebook
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 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
namespace CSharpFromPythonNamespace | |
{ | |
public class CSharpFromPythonClass | |
{ | |
public string Hi(string x) | |
{ | |
return "Hi " + x; | |
} | |
public static string Hello(string x) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 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
import os | |
import shutil | |
import numpy | |
import pygeoprocessing | |
import pygeoprocessing.routing | |
from osgeo import gdal | |
def doit(dem_path, flow_dir_weights, watershed_source_vector, workspace): |
This file contains 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
from glob import glob | |
import multiprocessing | |
from concurrent.futures import ProcessPoolExecutor | |
import cv2 | |
from PIL import Image | |
import imagehash | |
from tqdm import tqdm |
This file contains 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
CREATE OR REPLACE FUNCTION voronoi(table_name text,geom_col text) returns SETOF record as $$ | |
############################################################################# | |
# | |
# Voronoi diagram calculator/ Delaunay triangulator | |
# Translated to Python by Bill Simons | |
# September, 2005 | |
# | |
# Additional changes by Carson Farmer added November 2010 | |
# |