Created
June 8, 2018 05:07
-
-
Save prl900/3758cbf2e7880c70cce5d876be1fd3c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 14, | |
| "metadata": { | |
| "remote": true | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "(8, 58233, 8765)\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "from gbdxtools.task import env\n", | |
| "from gbdxtools import CatalogImage\n", | |
| "\n", | |
| "catalog_id = env.inputs.get('catalog_id', '10300100631B5C00')\n", | |
| "\n", | |
| "image = CatalogImage(catalog_id, band_type=\"MS\")\n", | |
| "\n", | |
| "print image.shape" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 18, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "u'EPSG:4326'" | |
| ] | |
| }, | |
| "execution_count": 18, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "#Affine(2.016708587854833e-05, 0.0, 40.23778933291412, 0.0, -2.016708587854833e-05, 1.03885169)\n", | |
| "\n", | |
| "#gt = image.geotiff\n", | |
| "#h5 = image.to_hdf5\n", | |
| "#image.dtype\n", | |
| "\n", | |
| "image.affine\n", | |
| "image.proj" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 12, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "import numpy as np\n", | |
| "\n", | |
| "np.savez(\"test\", image[5,20000:30000,:])" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 13, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "./<br>\n", | |
| " <a href='./Imagery_and_AOIs.ipynb' target='_blank'>Imagery_and_AOIs.ipynb</a><br>\n", | |
| " <a href='./test.npz' target='_blank'>test.npz</a><br>\n", | |
| " <a href='./[email protected]' target='_blank'>[email protected]</a><br>\n", | |
| " <a href='./Imagery_and_AOIs-1.ipynb' target='_blank'>Imagery_and_AOIs-1.ipynb</a><br>\n", | |
| " <a href='./test.npy' target='_blank'>test.npy</a><br>\n", | |
| " <a href='./ports.json' target='_blank'>ports.json</a><br>\n", | |
| " <a href='./test' target='_blank'>test</a><br>\n", | |
| " <a href='./Calculating_NDVI_from_Imagery_Ndarray_Inserts.ipynb' target='_blank'>Calculating_NDVI_from_Imagery_Ndarray_Inserts.ipynb</a><br>\n", | |
| " <a href='./index.html' target='_blank'>index.html</a><br>\n", | |
| " <a href='./gbdx.pub' target='_blank'>gbdx.pub</a><br>\n", | |
| "./.cache/matplotlib/<br>\n", | |
| " <a href='./.cache/matplotlib/fontList.json' target='_blank'>fontList.json</a><br>\n", | |
| "./.ipynb_checkpoints/<br>\n", | |
| " <a href='./.ipynb_checkpoints/Imagery_and_AOIs-1-checkpoint.ipynb' target='_blank'>Imagery_and_AOIs-1-checkpoint.ipynb</a><br>\n", | |
| " <a href='./.ipynb_checkpoints/Calculating_NDVI_from_Imagery_Ndarray_Inserts-checkpoint.ipynb' target='_blank'>Calculating_NDVI_from_Imagery_Ndarray_Inserts-checkpoint.ipynb</a><br>\n", | |
| " <a href='./.ipynb_checkpoints/Imagery_and_AOIs-checkpoint.ipynb' target='_blank'>Imagery_and_AOIs-checkpoint.ipynb</a><br>\n", | |
| "./.ipython/profile_default/<br>\n", | |
| " <a href='./.ipython/profile_default/history.sqlite' target='_blank'>history.sqlite</a><br>\n", | |
| "./.ipython/profile_default/startup/<br>\n", | |
| " <a href='./.ipython/profile_default/startup/README' target='_blank'>README</a><br>\n", | |
| "./.jupyter/<br>\n", | |
| " <a href='./.jupyter/migrated' target='_blank'>migrated</a><br>\n", | |
| "./.local/share/jupyter/<br>\n", | |
| " <a href='./.local/share/jupyter/notebook_secret' target='_blank'>notebook_secret</a><br>\n", | |
| " <a href='./.local/share/jupyter/nbsignatures.db' target='_blank'>nbsignatures.db</a><br>\n", | |
| "./.local/share/jupyter/runtime/<br>\n", | |
| " <a href='./.local/share/jupyter/runtime/nbserver-7.json' target='_blank'>nbserver-7.json</a><br>\n", | |
| " <a href='./.local/share/jupyter/runtime/kernel-1af1e3e3-f996-4694-8e63-dfaa072ffd44.json' target='_blank'>kernel-1af1e3e3-f996-4694-8e63-dfaa072ffd44.json</a><br>\n", | |
| " <a href='./.local/share/jupyter/runtime/notebook_cookie_secret' target='_blank'>notebook_cookie_secret</a><br>\n", | |
| " <a href='./.local/share/jupyter/runtime/kernel-0e4dc63c-ce93-499a-ae8c-4f315387a331.json' target='_blank'>kernel-0e4dc63c-ce93-499a-ae8c-4f315387a331.json</a><br>\n", | |
| " <a href='./.local/share/jupyter/runtime/kernel-ad67f8f6-4ac9-480e-901b-71c01137a609.json' target='_blank'>kernel-ad67f8f6-4ac9-480e-901b-71c01137a609.json</a><br>" | |
| ], | |
| "text/plain": [ | |
| "./\n", | |
| " Imagery_and_AOIs.ipynb\n", | |
| " test.npz\n", | |
| " [email protected]\n", | |
| " Imagery_and_AOIs-1.ipynb\n", | |
| " test.npy\n", | |
| " ports.json\n", | |
| " test\n", | |
| " Calculating_NDVI_from_Imagery_Ndarray_Inserts.ipynb\n", | |
| " index.html\n", | |
| " gbdx.pub\n", | |
| "./.cache/matplotlib/\n", | |
| " fontList.json\n", | |
| "./.ipynb_checkpoints/\n", | |
| " Imagery_and_AOIs-1-checkpoint.ipynb\n", | |
| " Calculating_NDVI_from_Imagery_Ndarray_Inserts-checkpoint.ipynb\n", | |
| " Imagery_and_AOIs-checkpoint.ipynb\n", | |
| "./.ipython/profile_default/\n", | |
| " history.sqlite\n", | |
| "./.ipython/profile_default/startup/\n", | |
| " README\n", | |
| "./.jupyter/\n", | |
| " migrated\n", | |
| "./.local/share/jupyter/\n", | |
| " notebook_secret\n", | |
| " nbsignatures.db\n", | |
| "./.local/share/jupyter/runtime/\n", | |
| " nbserver-7.json\n", | |
| " kernel-1af1e3e3-f996-4694-8e63-dfaa072ffd44.json\n", | |
| " notebook_cookie_secret\n", | |
| " kernel-0e4dc63c-ce93-499a-ae8c-4f315387a331.json\n", | |
| " kernel-ad67f8f6-4ac9-480e-901b-71c01137a609.json" | |
| ] | |
| }, | |
| "execution_count": 13, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "from IPython.display import FileLink, FileLinks\n", | |
| "FileLinks('.')" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [] | |
| } | |
| ], | |
| "metadata": { | |
| "hub": { | |
| "id": "5a105f0fc03a4879df5c0fdf", | |
| "published": false | |
| }, | |
| "juno_kernel": { | |
| "notify": { | |
| "type": "digitalglobe" | |
| } | |
| }, | |
| "kernelspec": { | |
| "display_name": "Python 2", | |
| "language": "python", | |
| "name": "python2" | |
| }, | |
| "language_info": { | |
| "codemirror_mode": { | |
| "name": "ipython", | |
| "version": 2 | |
| }, | |
| "file_extension": ".py", | |
| "mimetype": "text/x-python", | |
| "name": "python", | |
| "nbconvert_exporter": "python", | |
| "pygments_lexer": "ipython2", | |
| "version": "2.7.14" | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 2 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment