Skip to content

Instantly share code, notes, and snippets.

View maptastik's full-sized avatar

Ryan Cooper maptastik

View GitHub Profile
CALL "C:\Program Files\QGIS 3.4\bin\o4w_env.bat"
CALL "C:\Program Files\QGIS 3.4\bin\py3_env.bat"
CALL "C:\Program Files\QGIS 3.4\bin\qt5_env.bat"
SET PYTHONPATH=C:\Program Files\QGIS 3.4\apps\qgis-ltr\python
ThomasG77 /
Created February 27, 2018 15:48
PyQGIS script to save/load/wipe XYZ sources in Browser Panel in QGIS3
# -*- coding: utf-8 -*-
Name : XYZ manager
Description : Script to save/load/wipe WYZ sources in QGIS 3.0
Date : February 27, 2017
copyright : (C) 2017 by Thomas Gratier
email :
pratos / condaenv.txt
Created November 30, 2016 07:01
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder
om-henners /
Created August 11, 2016 05:38
Quick sample of converting an ArcGIS feature class to a pandas dataframe using arcpy.
import arcpy
import pandas as pd
def build_df_from_arcpy(table, index_col=None):
Build a pandas dataframe from an ArcGIS Feature Class.
Uses the arcpy Search Cursor to loop over a feature class in pandas and
generate a pandas dataframe. If the dataset is a feature class with a
ansell /
Last active February 26, 2019 09:17 — forked from hewerthomn/
Installing PostgreSQL 9.4 and PostGIS on Ubuntu 14.04

Remove old PostGIS Installation

The first step is to remove older version of PostGIS if any.

sudo apt-get purge postgis

Setup repository

wget --quiet -O - | sudo apt-key add -
sudo sh -c 'echo "deb trusty-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
mikedillion / gist:a620dc6dbf4102c8f709
Created July 15, 2015 23:34
Potential maptimeLEX topics for Guerrilla Cartography, Water: An Atlas
- water scarcity
- fishing regions
- three dimensional view of life in a oceanic body (
- water polo, what happened? Why the helmets?
- That race that the Oracle guy loves so much. Vectors.
jczaplew /
Last active August 29, 2015 14:19
Rolling tiles with mapnik + tilestache instead of Tilemill

Rolling tiles sans Tilemill

Perhaps you've had problems programmatically creating tiles with Tilemill, or are concerned about the future stability of project (or you just like playing with geo software).

Install mapnik and TileStache

brew install mapnik --with-gdal --with-postgresql
sudo pip install -U PIL modestmaps simplejson werkzeug
git clone TileStache
cd TileStache