Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andybell
andybell / replaceZero.cal
Created November 18, 2015 22:23
field calculator replace zero values with null
# replace all zeros with <Null>, anything else keep the same
def replaceZero(value):
if value == 0:
return None
else:
return value
__esri_field_calculator_splitter__
replaceZero( !current_richness_Native_Fish!)
@andybell
andybell / pt_cloud_subset
Created November 3, 2015 20:14
quickly subset point cloud text file
#!/bin/bash
# uses grep wildcard to get a subset of a XYZ pointcloud
# usage: file_in, file_out, x, y
# echo arguments to the shell
echo $1 $2 $3 $4
in=$1
out=$2
x=$3
@andybell
andybell / index.html
Last active August 29, 2015 14:26
Reference Layer above polygon
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Unique Value Renderer</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css">
@andybell
andybell / Batch_geotif.sh
Created May 30, 2015 01:41
Batch GDAL tif to geotif
#copies all tifs in a folder and saves them as compressed geotifs
mkdir geotifs
for file in *.tif
do
#gdal_translate
gdal_translate -of GTiff -co "COMPRESS=LZW" $file geotifs/$file
done