Skip to content

Instantly share code, notes, and snippets.

Last active July 29, 2023 22:18
Show Gist options
  • Save dalekunce/0e6f7bfe8445ff3cc3dc to your computer and use it in GitHub Desktop.
Save dalekunce/0e6f7bfe8445ff3cc3dc to your computer and use it in GitHub Desktop.
Yosemite GIS Machine Setup

Mac OS X GIS Setup

OS X Preferences

# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true

#Disable ext change warning
defaults write FXEnableExtensionChangeWarning -bool false

#Use current directory as default search scope in Finder
defaults write FXDefaultSearchScope -string "SCcf"

#Show Path bar in Finder
defaults write ShowPathbar -bool true

#Show Status bar in Finder
defaults write ShowStatusBar -bool true

# Avoid creating .DS_Store files on network volumes
defaults write DSDontWriteNetworkStores -bool true

#You'll be able to install any app you want from here on, not just Mac App Store apps
sudo spctl --master-disable
sudo defaults write /var/db/SystemPolicy-prefs.plist enabled -string no
defaults write LSQuarantine -bool false

#Set the Dock to auto-hide"
defaults write autohide -bool true

#Disable backswipe in Chrome
defaults write AppleEnableSwipeNavigateWithScrolls -bool false

#fix spotlights privacy settings
curl -fsSL

#stop photos from starting
defaults -currentHost write disableHotPlug -bool true

####Set hostname

#mercator is a crappy projection but a good computer name
sudo scutil --set HostName mercator


###Xcode command line tools

xcode-select --install


ruby -e "$(curl -fsSL"
brew install git gist git-flow wget colordiff imagemagick python bash-completion

####Switch to zsh

curl -L | sh

####Configure .zshrc

git clone git:// ~/fonts
cd ~/fonts && ./
rm -r ~/fonts

wget -O ~/.zshrc
wget -O ~/.oh-my-zsh/themes/remy.zsh-theme

#syntax highlighting
git clone git:// ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting


####Setup Github

ssh-keygen -t rsa -b 4096 -C ""

#add the key to ssh-agent so you don't have to always type your password
eval "$(ssh-agent -s)"

#edit ~/.ssh/config on 10.12.2 or higher
vi ~/.ssh/config
Host *
 AddKeysToAgent yes
 UseKeychain yes
 IdentityFile ~/.ssh/id_rsa
#add the key to the agent
ssh-add -K ~/.ssh/id_rsa

#copy ssh key to
pbcopy < ~/.ssh/

#test connection
ssh -T

#set git config values
git config --global "Dale Kunce" &&
git config --global "" &&
git config --global github.user dalekunce &&
git config --global core.editor "atom" &&
git config --global color.ui true

git config --global github.token your_token_here

git config --global credential.helper osxkeychain

#github dir
mkdir ~/git

###Install MacApps

#install brew cask 
brew tap caskroom/cask

#set the app directory
export HOMEBREW_CASK_OPTS="--appdir=/Applications"

brew cask install java

#atom text editor
brew cask install atom

brew cask install google-chrome

#creative cloud and reader
brew cask install adobe-creative-cloud
brew cask install adobe-reader

#xquartz for xwindows stuff
brew cask install xquartz

#gimp for simple photo stuff
brew cask install gimp

#avast antivirus
brew cask install avast

#cyberduck for ftp and s3
brew install duck
brew cask install cyberduck

#google refine for big data analysis
brew cask install google-refine

#virtualbox for virtual machines
brew cask install virtualbox

#slack for team communication
brew cask install slack

#skype for more communication
brew cask install skype

#flux so you go to sleep at night
brew cask install flux

#spectacle for keyboard shortcuts for window management
brew cask install spectacle

#keka for unziping 7z files
brew cask install keka

#filesharing gdrive and dropbox
brew cask install google-drive
brew cask install dropbox

#switch to iterm2
brew cask install iterm2

#sometimes msoffice is terrible
brew cask install libreoffice


brew install node nvm
npm install -g bower wiredep forever turf topojson

GIS Stuff

#install pip for easy install stuff
sudo easy_install pip

#install postgres and postgis using one brew formula
brew install postgis

#setup database

#pgadmin3 for db administration
brew cask install pgadmin3

#protobuf-c and osm2pgsql to import osm files to postgis
brew install protobuf-c osm2pgsql

#python dependencies for QGIS
brew install python3
brew install pkg-config freetype
pip3 install numpy matplotlib 

#install qgis and dependencies including gdal, gdal-filedb for esri, and orfeo-42 for image manipultion
brew tap osgeo/osgeo4mac
brew install gdal qgis

#esri file-gdb support
brew install gdal-fileGdb
wget -O /Library/Caches/Homebrew/
export GDAL_DRIVER_PATH=/usr/local/lib/gdalplugins

#install josm
brew cask install josm

#install google earth
brew cask install google-earth

#mapbox landsat-util
pip install landsat-util

#link the brew installed apps
brew linkapps


brew cleanup --force
rm -f -r /Library/Caches/Homebrew/*
Copy link

rbanick commented Jan 6, 2015

You need to brew install xquartz before installing qgis for the install to work successfully

Copy link

rbanick commented Jan 6, 2015

You will need to install the Numpy, Scipy, and matplotlib python libraries for some QGIS functions and extensions to work. These can be installed with the following commands:

### install numpy
pip install numpy

### install scipy
pip install scipy

### install matplotlib
pip install matplotlib

### install psycopg2
pip install psycopg2

Copy link

rbanick commented Jan 12, 2015

The correct command for installing Turf.js is npm install turf not npm install turfjs

Copy link

Need to brew install caskroom/cask/brew-cask before installing the Mac apps

Copy link

fixed both suggestions.

Copy link

rbanick commented Jan 19, 2015

just noting that I'm having problems with installing orfeo-42. Basic troubleshooting could not resolve -- not sure if this is a shared problem.

Copy link

rbanick commented Jan 19, 2015

brew install gdal-filedb does not appear to be an actual formula. @dalekunce can you revise to whatever the correct formula is?

Copy link

rbanick commented Jan 21, 2015

Some additional goodies here, makes for an interesting read. I like the PG aliases.

Copy link

rbanick commented Jan 21, 2015

brew install gdal-filedb should read brew install gdal-fileGdb (capitol emphasis added)

You will also need to download the ESRI FileGDB API file ( from This requires logging in with an ESRI account.

Once the file is downloaded, move it to your /Library/Caches/Homebrew still as a .zip archive. The homebrew installer will access it there.

Once the homebrew process is complete, run the following code to add the FileGDB environment variable to GDAl's list. Otherwise GDAL will not recognize the file type:

export GDAL_DRIVER_PATH=/usr/local/lib/gdalplugins

Copy link

fixed support for file-gdb.

Copy link

the github repository with the YosemiteSanFranciscoFont is unavailable due to DMCA takedown

Copy link

added rasterio removed YosemiteSanFranciscoFont

Copy link

Recent upgrade of proj from 4.8.0 to 4.9.1, you may get this error:

open /usr/local/opt/qgis-28/

Dyld Error Message:
Library not loaded: /usr/local/lib/libproj.0.dylib
Referenced from: /usr/local/Cellar/qgis-28/2.8.0_2/
Reason: image not found

(Temporary) solution is to link missing file:

ln -sf /usr/local/lib/libproj.9.dylib /usr/local/lib/libproj.0.dylib

Related issue

Copy link

rbanick commented Jul 6, 2015

We should include the HXL toolkit on our standard install. There's lots of nifty humanitarian stuff in there.

pip install libhxl

Copy link

rbanick commented Aug 28, 2015

Gdal needs to be installed --with-postgresql to perform ogr2ogr operation on PostGIS databases

brew install gdal --with-postgresl

See for more details

Copy link

jnicho02 commented Jul 12, 2017

my brew install gdal-mrsid just asked for

...and should it go in ~/Library/Caches/Homebrew instead of /Library/Caches/Homebrew ? (i'm on macOS Sierra 10.12.5)

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