Skip to content

Instantly share code, notes, and snippets.

@nickpeihl
Last active April 5, 2017 16:24
Show Gist options
  • Save nickpeihl/c4bc06c6216c37ec6dac to your computer and use it in GitHub Desktop.
Save nickpeihl/c4bc06c6216c37ec6dac to your computer and use it in GitHub Desktop.
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 Functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment