Skip to content

Instantly share code, notes, and snippets.

View emxsys's full-sized avatar

Bruce Schubert emxsys

View GitHub Profile
@emxsys
emxsys / download_SRTMv4.md
Last active October 5, 2022 12:05
How to bulk download SRTMv4 DEMs from CGIAR-CSI

How to bulk download SRTMv4 from CGAIR-CSI with WGET

The SRTM digital elevation data provided on CGIAR-CSI has been processed to fill data voids and to facilitate its ease of use by a wide group of potential users. This data is provided in an effort to promote the use of geospatial science and applications for sustainable development and resource conservation in the developing world. Digital elevation models (DEM) for the entire globe, covering all of the countries of the world, are available for download at CGIAR-CSI.

Step 1. Get a bulk download link from CGIAR-CSI

@emxsys
emxsys / wget_google_drive_download.md
Last active April 23, 2024 18:47
Download Google Drive files with WGET

How to download files from Google Drive with WGET

Step 1. Get the ID of the file to download

  1. Get a shareable link from Google Drive by right-clicking the file and selecting Get Shareable Link.

  2. Examine the link to get the file's ID. Example:

    https://docs.google.com/open?id=[ID]

Step 2. Download the file with WGET

  1. Build the download URL using the ID obtained in Step 1. Example:
#!/bin/bash
set +x
# LandSat files
for file in /nas/data/imagery/i3/*.tif; do
input_file=${file}
base_file=`basename ${file}`
gtiff_file=gtif/${base_file%.*}.tif
if [ -s $gtiff_file ]
===============================================================================
Building libecwj 3.3 library on Unix to /usr/local/libecwj2-3.3
===============================================================================
See: https://trac.osgeo.org/gdal/wiki/ECW
Download locations:
- ftp://ftp.ii.net/pub/gentoo/distfiles/libecwj2-3.3-2006-09-06.zip
$ unzip libecwj2-3.3-2006-09-06.zip
Download cumulative patch from GDAL wiki: https://trac.osgeo.org/gdal/wiki/ECW
@emxsys
emxsys / build-libecwj2-3.3.sh
Created January 9, 2019 15:36
Building libecwj 3.3 library on Unix to /usr/local/libecwj2-3.3
#!/bin/bash
# ===============================================================================
# Building libecwj 3.3 library on Unix to /usr/local/libecwj2-3.3
# ===============================================================================
# Unzip the ECW library to the current folder
# - ftp://ftp.ii.net/pub/gentoo/distfiles/libecwj2-3.3-2006-09-06.zip
unzip libecwj2-3.3-2006-09-06.zip
@emxsys
emxsys / build-gdal-2.2.2.sh
Created January 9, 2019 15:34
Build GDAL 2.2.2 with ECW on Ubuntu
#!/bin/bash
# ===============================================================================
# GDAL 2.2.2 build instructions with ECW on Ubuntu
# ===============================================================================
# Downloads: http://download.osgeo.org/gdal
# - wget http://download.osgeo.org/gdal/2.2.2/gdal-2.2.2.tar.gz
rm -r gdal-2.2.2
tar -xzvf gdal-2.2.2.tar.gz
@emxsys
emxsys / webworldwind-example.html
Last active November 1, 2022 22:40
A complete 3D virtual globe example - HTML, JavaScript and CSS - using ESA-NASA Web WorldWind, Bootstrap and KnockoutJS featuring a 3D globe view, 2D map projections, markers and place name finder. Simply download and open this HTML file in your browser to run the app, or see http://worldwind.earth/sample-app.html for a preview and write-up.
<!DOCTYPE html>
<html lang="en">
<!--
A sample framework for the ESA-NASA WebWorldWind web applications.
Author: Bruce Schubert
License: MIT
See: https://worldwind.arc.nasa.gov/web/
-->
<head>
<meta charset="utf-8">
@emxsys
emxsys / curl.md
Created October 21, 2016 19:49 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin