Skip to content

Instantly share code, notes, and snippets.

View samuelschumacher's full-sized avatar

Samuel samuelschumacher

  • Wisconsin State Cartographer's Office
  • Madison, Wisconsin, USA
View GitHub Profile
From 'Using_tickets_12_08_2011' -
Google Chrome - No sound files
Safari - No mouseover
Internet Explorer - No sound files
@samuelschumacher
samuelschumacher / header-footer.html
Created January 26, 2015 19:33
Custom Tile zooms
import arcpy
arcpy.CheckOutExtension("spatial")
HC_DEM1 = "HC_DEM1"
p11 = "p11"
p11_dem = "C:\\Users\BRKA001\\DOCUMENTS\\bk_tests\\testrun.mdb\\p11_dem"
arcpy.gp.ExtractByMask_sa(HC_DEM1,p11,p11_dem)
GPS1448
GPS1536
GPS1563
GPS1751
GPS1846
GPS1874
GPS1875
GPS1998
GPS2213
GPS2471
@samuelschumacher
samuelschumacher / 4-3.py
Created January 21, 2015 03:02
Geocomputing - Lab 4
import os
#The only thing new about this program is the fact that instead of calling getvar directly,
#the function cuantos is called. cuantos() prompts the user for the number of conversions
#they would like to make and utilizes a while loop that adds 1 to the count variable 'a'.
#Once this variable is equal to the repetititon number (rep), the program exits the while
#loop. In case of failure, the entire cuantos() function is within a while loop, which is
#by default True. This means that it will loop itself infinitely if no break is encountered.
#A break is only encountered in the event of the successful run of getvar for the number of
#iterations specified by rep, so any failure would be greeted with an error prompt and restart.
def cuantos():
@samuelschumacher
samuelschumacher / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@samuelschumacher
samuelschumacher / Installation - Linux
Last active November 13, 2015 18:17
Serving Vector Tiles from a Linux Server- Tilestache + PostgreSQL + Mapnik + Leaflet
From https://github.com/NelsonMinar/vector-river-map (Could be great for PLSSFinder reset, includes basemap and server configuration)
We should set up an NGINX server if we reconfigure the Ubuntu Servers.
Mapbox studio creates vector tiles using protocol buffer format. This is efficient, but also not supported by tilestache currently. We can, however, render JSONs from a postgres database and use the cartoCSS from mapbox for styling.
If one would like to open a project created from a different machine, paths must be changed in the following files (using LCFRstyle4 and LCFRtiles for example, your names may vary):
LCFRstyle4.tm2/project.yml
LCFRstyle4.tm2/project.xml