Skip to content

Instantly share code, notes, and snippets.

View siiinc's full-sized avatar

Jerry Rumbolt siiinc

  • Maxar Inc
View GitHub Profile

How to get only the gdal sub directory into a desired directory

Steps...

  • git clone --depth 1 https://github.com/OSGeo/gdal.git trunk
  • cd trunk
  • git filter-branch --prune-empty --subdirectory-filter gdal/ HEAD
@siiinc
siiinc / recent_tmux_on_aws_ec2.md
Last active May 5, 2021 18:59
recent tumx on ec2

TMUX on AWS EC2 is old circa v1.8

Here is how to get a later version (v2.6)

# install deps
sudo yum -y install gcc kernel-devel make ncurses-devel git

# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
@siiinc
siiinc / pip_install_global_option.md
Last active March 30, 2017 17:40
pip install gdal with global options

If on Fedora make sure that gcc-c++ redhat-rpm-config are installed

pip install --global-option build_ext --global-option '--include-dirs=/usr/local/opt/gdal2/include' --global-option '--library-dirs=/usr/local/opt/gdal2/lib' GDAL

@siiinc
siiinc / build_boost_mac.md
Last active June 29, 2017 22:55
build_boost

Mac

If you want to build with a special compiler (i.e., brew installed clang) you can do the ./bootstrap.sh and then update the project-config.jam file to reference the compiler you want to use.

# Automatically generated by bootstrap.sh

import option ;
import feature ;

# Compiler configuration. This definition will be used unless
# you already have defined some toolsets in your user-config.jam

Install JAVA and GDAL with Java SWIG bindings

brew tap caskroom/cask
brew install Caskroom/cask/java
export JAVA_HOME=$(/usr/libexec/java_home -v1.8)
brew tap osgeo/osgeo4mac
brew install osgeo/osgeo4mac/gdal2 --with-swig-java

or

sudo yum install python-devel gcc gcc-c++
wget --http-user='user' --http-password='passwd' http://artifactory.geobigdata.io:8080/artifactory/gbdx-generic-local/gdal-2.1-4_4_23-31_54_amzn1_x86_64-0.1-28.x86_64.rpm
sudo yum localinstall gdal-2.1-4_4_23-31_54_amzn1_x86_64-0.1-28.x86_64.rpm
source /etc/profile.d/gdal-2.1.sh
virtualenv gdalenv
source gdalenv/bin/activate
#!/bin/bash
# derived from https://bitbucket.org/bfx/jdk-download
if [ "$#" -lt 1 ]; then
echo -e "Download the oracle JDK from command line\n"
echo -e " $0 <version> <platform> [<build>]\n"
echo " <version> Something like 8u40"
echo " <build> The internal build number used by oracle, to avoid guessing and"
echo -e " trying to download starting from 99 to 1 (build 0, really?!!)\n"
@siiinc
siiinc / readme.md
Created September 1, 2016 05:37 — forked from AsgerPetersen/readme.md
PyCharm remote debug of QGIS on OSX

Based heavily on this old guide by TimLinux http://linfiniti.com/2012/09/remote-debugging-qgis-plugins-using-pycharm/

  • In PyCharm click menu "Run -> Edit Configurations" (Or click Edit Configurations in the dropdown in the toolbar)
  • Click the plus to add a new "Python Remote Debug" config
  • Name the config. Use port 53100 (Could probably be any high port)
  • Add to the python code:
import sys
sys.path.append('/Applications/PyCharm.app/Contents/debug-eggs/pycharm-debug.egg')
@siiinc
siiinc / jai-image-io_el_linux_x64_howto.md
Last active August 11, 2025 17:10
Getting native JAI image-io to work on linux x64

Make sure you are logged in as a user who can sudo

  1. cd ~/Downloads && wget http://download.java.net/media/jai-imageio/builds/release/1.1/jai_imageio-1_1-lib-linux-amd64.tar.gz && tar -zxvf jai_imageio-1_1-lib-linux-amd64.tar.gz && sudo cp jai_imageio-1_1/lib/*.jar /usr/java/latest/jre/lib/ext/ && sudo cp jai_imageio-1_1/lib/*.so /usr/java/latest/jre/lib/amd64/

  2. cd ~/Downloads &amp;&amp; wget http://download.java.net/media/jai/builds/release/1_1_3/jai-1_1_3-lib-linux-amd64.tar.gz &amp;&amp; tar -zxvf jai-1_1_3-lib-linux-amd64.tar.gz &amp;&amp; sudo cp jai-1_1_3/lib/*.jar /usr/java/latest/jre/lib/ext/ &amp;&amp; sudo cp jai-1_1_3/lib/*.so /usr/java/latest/jre/lib/amd64/