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
# -*- coding: utf-8 -*- | |
"""distribution_yaml.py: Converts Paths and GBDs to dicts, then to a yaml file. | |
This script 'walks' through a folder structure (including ESRI Geodatabases) | |
and outputs a .yaml pseudo-schema of the directory-tree and geodatabase(s). | |
MIT License (MIT) | |
Copyright (C) 2015 Garin Wally / Windfall Spatial | |
This code was modified from code by Blake Miller, found here: |
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
# -*- coding: utf-8 -*- | |
""" | |
hellfire.py | |
This script serves as a double-click DLL dependency-diagnostics utility. | |
Usage: | |
1. Place this script in a folder containing one or many DLL(s) to test | |
2. Double-click this script | |
3. Read the Windows error-popup |
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
"""Addition to geopandas.io.sql.py | |
by Garin Wally / Windfall Spatial, Nov 10, 2015 | |
""" | |
# Place with the other imports | |
import shapely.wkt | |
def read_spatialite(sql, con, geom_col, crs=None, index_col=None, | |
coerce_float=True, params=None): | |
""" |
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
# A short gist derrived from dlsw on how to test if a DLL is on your PATH. (Best with try/except blocks) | |
import os | |
from ctypes import WinDLL | |
from _ctypes import FreeLibrary # DON'T FORGET THE '_' | |
dll = "mod_spatialite.dll" # or whatever DLL your heart desires | |
assert not dll in os.listdir(os.getcwd()) # Ensures that the DLL will not false-positive load because it's in the current working dir | |
loaded_dll = WinDLL(dll) # Attempt to load DLL. If the DLL is not on PATH or in os.getcwd() it will raise a WindowsError | |
FreeLibrary(loaded_dll._handle) # if successful, we should be good neigbors and unload it | |
del loaded_dll # completely rid of the memory instance |
NewerOlder