Skip to content

Instantly share code, notes, and snippets.

View nickpeihl's full-sized avatar

Nick Peihl nickpeihl

View GitHub Profile
@nickpeihl
nickpeihl / README.md
Last active March 4, 2021 17:27
GIS in the Browser (or How to Drop Your ArcGIS License)

Here’s how to do GIS in the browser.

  1. Go to http://geojson.io/#map=11/48.5621/-122.9384
  2. Open Meta – Add map layer
  3. Copy and paste this link into the dialog box - http://sjcgis.org/arcgis/rest/services/Basemaps/Aerials_2013_WM/MapServer/tile/{z}/{y}/{x}
  4. Name it Aerials
  5. Open Meta – Add map layer again
  6. Copy and paste this link into the dialog box – http://sjcgis.org/arcgis/rest/services/Basemaps/Reference_Overlay_WM/MapServer/tile/{z}/{y}/{x}
  7. Name it Reference
  8. Draw shapes using the tools on the right side of the map
@nickpeihl
nickpeihl / naip.mapurl
Created October 20, 2015 21:54
NAIP mapurl for Geopaparazzi
url=http://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/ZZZ/YYY/XXX
minzoom=8
maxzoom=17
type=google
format=jpg
bounds=-122.330832,47.640989,-122.283883,47.662931
defaultzoom=15
mbtiles=defaulttiles/_naip-tile.mbtiles
description=USGS Ortho and Satellite Imagery
@nickpeihl
nickpeihl / README.md
Last active April 5, 2017 16:24
NDVI With ArcGIS Image Services and Geojson.io
  1. Go here: http://geojson.io/#map=18/34.12668/-84.11506

  2. Open the browser developer console - ctrl + shift + k on Firefox or ctrl + shift + i on Chrome.

  3. Type the following into the browser console: window.api.map.addLayer(L.tileLayer('http://tileify-ags.herokuapp.com/tiles/{z}/{x}/{y}?url=https%3A%2F%2Fgis.apfo.usda.gov%2Farcgis%2Frest%2Fservices%2FNAIP%2FGeorgia_2015_1m%2FImageServer&renderingRule=%7B%20%20%20%22rasterFunction%22%20%3A%20%22NDVI%22%2C%20%20%20%22rasterFunctionArguments%22%20%3A%20%7B%20%20%20%20%20%22VisibleBandID%22%20%3A%202%2C%20%20%20%20%20%22InfraredBandID%22%20%3A%203%20%20%20%7D%2C%20%20%20%22variableName%22%20%3A%20%22Raster%22%20%7D'));

  4. Try replacing the ArcGIS Image Service URL with a different URL from here. Be sure to encode the URL correctly. For help encoding go here

[More info on ArcGIS Image Service Raster

@nickpeihl
nickpeihl / Fire_Zones.geojson
Last active November 16, 2015 17:24
San Juan County Fire Zones
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nickpeihl
nickpeihl / 2013Aerials.md
Last active May 11, 2017 17:37
San Juan County 2013 aerial imagery formats available

San Juan County 2013 Aerial Imagery

sjcgis@sanjuanco.com

Mosaics

  • MrSID - 5.73 GB
  • ECW - 3.8 GB
  • GeoTIFF - 43.4 GB

Full Resolution

@nickpeihl
nickpeihl / index.html
Last active January 27, 2016 23:24
San Juan County Aerials in Mapbox-GL.js
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.5/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.5/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@nickpeihl
nickpeihl / index.html
Created January 25, 2016 17:02
ArcGIS Server San Juan County Streetmap in Mapbox-GL-JS
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.4/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.4/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@nickpeihl
nickpeihl / emptyTile
Created January 27, 2016 19:53
Missing or blank tile generation using Imagemagick
convert -size 256x256 -background "rgb(204,204,204)" -fill white -font "Century-Gothic-Bold-Italic" -pointsize 18 -gravity Center caption:"Map data not available. \n\nPlease zoom out or switch to a different basemap." missing.png
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.18.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.18.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@nickpeihl
nickpeihl / index.js
Created July 25, 2016 03:26
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
const yo = require('yo-yo')
const el = yo`
<svg class="w2" data-icon="dribbble" viewBox="0 0 32 32" style="fill:currentcolor">
<path d="M16 0 A16 16 0 0 0 0 16 A16 16 0 0 0 16 32 A16 16 0 0 0 32 16 A16 16 0 0 0 16 0 M5 11.5 A12 12 0 0 1 11 5 A46 46 0 0 1 13.5 9.25 A46 46 0 0 1 5 11.5 M15 4 A12 12 0 0 1 21.5 5.25 A46 46 0 0 1 17 7.75 A50 50 0 0 0 15 4 M4 16 A50 50 0 0 0 15 13 A46 46 0 0 1 16 15.5 A26 26 0 0 0 6 22.5 A12 12 0 0 1 4 16 M18.5 11.5 A50 50 0 0 0 25 8 A12 12 0 0 1 28 13.75 A26 26 0 0 0 19.75 14.5 A50 50 0 0 0 18.5 11.5 M17 19.5 A46 46 0 0 1 18 28 A12 12 0 0 1 8.75 25.5 A22 22 0 0 1 17 19.5 M20.75 18.25 A22 22 0 0 1 28 17.75 A12 12 0 0 1 22 26.5 A50 50 0 0 0 20.75 18.25"></path>