Skip to content

Instantly share code, notes, and snippets.

View maptastik's full-sized avatar

Ryan Cooper maptastik

View GitHub Profile
@maptastik
maptastik / error
Last active August 29, 2015 14:25
Troubleshooting errors while trying to install pip
PS C:\Python27\ArcGIS10.2\Lib\site-packages> python get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 20204, in <module>
main()
File "get-pip.py", line 152, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip
File "c:\users\ryanco~1\appdata\local\temp\tmpbwqs3j\pip.zip\pip\__init__.py", line 13, in <module>
File "c:\users\ryanco~1\appdata\local\temp\tmpbwqs3j\pip.zip\pip\utils\__init__.py", line 22, in <module>
@maptastik
maptastik / 4hksq0i0.ldo.txt
Last active August 29, 2015 14:25
BCC Routes
[user]
name = maptastik
email = [email protected]
[core]
autocrlf = input
safecrlf = false
[filter "lfs"]
clean = git lfs clean %f
smudge = git lfs smudge %f
required = true
@maptastik
maptastik / app.js
Created August 1, 2015 02:17
Lexington Parcels - Tilemill Method
// Mapbox access token. You'll want to use your own
L.mapbox.accessToken = 'pk.eyJ1IjoibWFwdGFzdGlrIiwiYSI6IjNPMkREV1kifQ.2KGPFZD0QaGfvYzXYotTXQ';
// Initialize the map, set the minimum and maximum zoom, and specify starting zoom and center
var map = L.map('map', {
minZoom: 11,
maxZoom: 16
}).setView([38.046441, -84.497019], 11);
// Add Stamen Toner basemap
@maptastik
maptastik / README.md
Created August 2, 2015 21:57
Lexington Parcels - Vector Tiles w/ Mapbox Studio

I'm sure there are more effective ways of doing this...

@maptastik
maptastik / index.html
Last active August 29, 2015 14:27
500-502 E 3rd Street Before and After
<!DOCTYPE html>
<html>
<head>
<title>500-502 E 3rd Street Collapse - Juxtaposition</title>
</head>
<body>
<!-- Begin JuxtaposeJS div -->
<div class="juxtapose" data-startingposition="50" data-showlabels="true" data-showcredits="true" data-animate="true">
<!-- Left image -->
@maptastik
maptastik / README.md
Last active October 1, 2023 12:44
Constructing the URL for files on Google Drive

First things first, you'll need to make sure your data are in a folder within your Google Drive rather than the root directory. Once you've added your data file to that folder, make sure that folder and the file are shareable.

These steps assume you're working through Google Drive in your browser:

  1. Navigate to the folder in your Google Drive.
  2. Examine the URL of the folder. It should look something like https://drive.google.com/drive/u/0/folders/<folder ID>. The folder ID should be a string of numbers and letter rather than the name you gave the folder.
  3. Generate the URL of your file. The URL consists of three (3) parts that you'll put together:
  4. https://googledrive.com/host/
  5. folder ID
  6. /your file
@maptastik
maptastik / README.md
Created September 2, 2015 03:33
First D3 Building Block
@maptastik
maptastik / README.md
Last active September 4, 2015 20:30
Using Imagery from ArcGIS REST WMTS

For using LFUCG 2013 aerial imagery in OSM iD Editor

  1. http://gis.lexingtonky.gov/lfucggis/rest/services/aerial2013/ImageServer
  2. Click WMTS
  3. Under <TileMatrixSetLink> get the base URL template, http://gis.lexingtonky.gov/lfucggis/rest/services/aerial2013/ImageServer/WMTS/tile/1.0.0/aerial2013/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}
  4. {Style} = default, {TileMatrixSet} = default028mm, {TileMatrix} = a number 0-9 (likely 9 because it's the clearest zoomed in), {TileRow} = {y}, {TileCol} = {x}

Other LFUCG REST services: http://gis.lexingtonky.gov/lfucggis/rest/services

@maptastik
maptastik / index.html
Created September 5, 2015 05:43
Commonwealth Stadium - Alternative Configuration, 1973 map w/ slider
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Commonwealth Stadium - Alternative Configuration, 1973</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.mapbox.com/mapbox.js/v2.2.2/mapbox.js'></script>
<link href='https://api.mapbox.com/mapbox.js/v2.2.2/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@maptastik
maptastik / README.md
Created September 10, 2015 18:30
Add a layer to QGIS from an ArcGIS REST service
  1. Go to a REST service page and pick a layer
  1. Copy the URI
  2. In QGIS, click Add Vector Layer
  3. In the dialog box, select the Protocol option.
  4. Paste the service URI into the URI field
  5. To the end of the the URI paste query?where=objectid+%3D+objectid&outfields=*&f=json
  6. Click Open

This method works best for services with <1000 features.