Skip to content

Instantly share code, notes, and snippets.

View emxsys's full-sized avatar

Bruce Schubert emxsys

View GitHub Profile
@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
@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 / 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 / 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
===============================================================================
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
#!/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 ]
@emxsys
emxsys / wget_google_drive_download.md
Last active May 8, 2024 11:06
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:
@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

Run Selected File

You must add worldwind.jar to the classpaths in WorldWindJava\nbproject\ide-file-targets.xml

<?xml version="1.0" encoding="UTF-8"?>
<project basedir=".." name="WorldWindJava-IDE">
    <!-- TODO: edit the following target according to your needs -->
    <!-- (more info: http://www.netbeans.org/kb/articles/freeform-config.html#runsingle) -->
    <target name="run-selected-file-in-src">
        <fail unless="run.class">Must set property 'run.class'</fail>
@emxsys
emxsys / imagery_server.md
Last active April 5, 2019 23:34
How to setup a NASA imagery server

How to setup a NASA WorldWind imagery server

Introduction

This guide shows how to create a WMS server using Apache, MapServer and imagery data sets curated by NASA. This WMS server serves as a model for a production MapServer instance to be deployed on an a network.

The guide contains a brief overview of how the WorldWind clients make requests, followed by instructions for setting up the Apache web server, MapServer and the Apache caching.

Overview

WorldWind clients consume imagery data in PNG, JPEG and DDS formats obtained from a MapServer instance via OGC WMS requests. The NASA WorldWind imagery server provides Blue Marble and Landsat7 imagery to WorldWind clients as the core imagery services