Skip to content

Instantly share code, notes, and snippets.

View AndreLester's full-sized avatar

André Kruger AndreLester

  • Private
  • Swellendam, South Africa
View GitHub Profile
@AndreLester
AndreLester / Methods.py
Created September 28, 2024 15:56
Returns all properties and methods of the specified object in a tabular form.
import math
from tabulate import tabulate
def methods(itarget, columns=4, private=False, search=None):
dtable = list()
itarget = dir(itarget)
methods = list()
for i, item in enumerate(itarget):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AndreLester
AndreLester / ConcaveHull.py
Last active September 28, 2024 03:31
Fast concave hull implementation in Python.
'''
Copyright (C) 2018 Andre Lester Kruger
ConcaveHull.py is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
ConcaveHull.py is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@AndreLester
AndreLester / Line Generator.py
Last active September 15, 2015 21:29
Create lines using a point from a shapefile and getting the ID's and angles from a CSV file
import math
from qgis.core import QgsFeature
pointLayerName = "point" #change to whatever name of point layer is
lineLayerName = "lines" #change to whatever name of line layer is
#be sure to draw one point, leave line layer empty
#find layer objects by name
layers = QgsMapLayerRegistry.instance().mapLayers()