Skip to content

Instantly share code, notes, and snippets.

View sgillies's full-sized avatar

Sean Gillies sgillies

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sgillies
sgillies / config.py
Last active September 29, 2021 08:24
Custom Mapnik config paths
PATH_REMOVE = '/usr/local'
CUSTOM_CXXFLAGS = '-fvisibility-inlines-hidden -DU_CHARSET_IS_UTF8=1'
CUSTOM_LDFLAGS = ''
RUNTIME_LINK = 'static'
INPUT_PLUGINS = 'csv,gdal,geojson,occi,ogr,osm,postgis,python,raster,rasterlite,shape,sqlite'
WARNING_CXXFLAGS = '-Wno-deprecated-register -Wno-redeclared-class-member'
PATH = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/bin/'
BOOST_INCLUDES = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/include/boost'
BOOST_LIBS = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/lib'
BOOST_PYTHON_LIB = 'boost_python-2.7'
import os
import sys
import pdb
import numpy as np
import rasterio as rio
def check_rio(fpath):
with rio.drivers():
import gdal
# open dataset
ds = gdal.Open('test.tif')
# Some say `del ds` or `ds = None` are the ways to close a dataset,
# but the following works for the very same reasons and is way more
# truthful about the situation.
ds = "¯\(ツ)/¯"
@sgillies
sgillies / README.md
Last active August 29, 2015 14:01
West Central Walking Tour: Juniper Ln and Birky Pl, 5/16/2014

Star this Gist to indicate preference for the flatter form (no "when", no "type", no new GeoJSON items, JSON-LD required) of GeoJSON-LD time (see geojson/geojson-ld#13).

Star this Gist to indicate preference for the deeper form (with "when" and "@type") of GeoJSON-LD Time (geojson/geojson-ld#9).

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
{
"@context": {
"@context": {
"Polygon": "http://example.com/vocab#Polygon",
"Feature": "http://example.com/vocab#Feature",
"datetime": "http://www.w3.org/2006/time#inXSDDateTime",
"MultiLineString": "http://example.com/vocab#MultiLineString",
"id": "http://example.com/vocab#id",
"features": {
"@id": "http://example.com/vocab#coordinates",
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.