Skip to content

Commit 5dfbaf8

Browse files
author
Scisco
committed
Merge pull request #83 from developmentseed/develop
version 0.7.0
2 parents 87784f3 + 507edb2 commit 5dfbaf8

27 files changed

+1406
-859
lines changed

.travis.yml

+28-25
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
11
language: python
2-
32
python:
4-
- '2.7'
5-
6-
# Setup anaconda
3+
- '2.7'
74
before_install:
8-
- sudo add-apt-repository -y ppa:ubuntugis/ppa
9-
- sudo apt-get update -qq
10-
- sudo apt-get install libgdal1h gdal-bin libgdal-dev libcurl4-gnutls-dev
11-
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
12-
- chmod +x miniconda.sh
13-
- ./miniconda.sh -b
14-
- export PATH=/home/travis/miniconda/bin:$PATH
15-
- conda update --yes conda
16-
# The next couple lines fix a crash with multiprocessing on Travis and are not specific to using Miniconda
17-
- sudo rm -rf /dev/shm
18-
- sudo ln -s /run/shm /dev/shm
19-
20-
# Install packages
5+
- sudo add-apt-repository -y ppa:ubuntugis/ppa
6+
- sudo apt-get update -qq
7+
- sudo apt-get install libgdal1h gdal-bin libgdal-dev libcurl4-gnutls-dev
8+
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
9+
- chmod +x miniconda.sh
10+
- "./miniconda.sh -b"
11+
- export PATH=/home/travis/miniconda/bin:$PATH
12+
- conda update --yes conda
13+
- sudo rm -rf /dev/shm
14+
- sudo ln -s /run/shm /dev/shm
2115
install:
22-
- conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy matplotlib scikit-image six nose dateutil
23-
- conda install --yes -c https://conda.binstar.org/osgeo gdal
24-
- pip install --install-option="--no-cython-compile" cython
25-
- pip uninstall requests --yes
26-
- pip install requests==2.5.3
27-
- pip install -r requirements/travis.txt
28-
16+
- conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy matplotlib scikit-image
17+
six nose dateutil
18+
- conda install --yes -c https://conda.binstar.org/osgeo gdal
19+
- pip install --install-option="--no-cython-compile" cython
20+
- pip uninstall requests --yes
21+
- pip install requests==2.5.3
22+
- pip install -r requirements/travis.txt
2923
script:
30-
- nosetests
24+
- nosetests
25+
deploy:
26+
provider: pypi
27+
user: devseed
28+
password:
29+
secure: WtawFW/999XYszmZfj1Qk82l00OSyP2JBVOOGCERrW1gVO7MYtYsgP31HKRSzNTCTHJNVDpdK4WZWY6zPQqC3l2UfWYYsvRn0hCoI8AJxE5VCUEg6Ccpe6fMJuhp1pq6Zy7yrfBSZcOB9aqSHLBJsunD2o3mNlTC8WV8vNK74ck=
30+
on:
31+
tags: true
32+
repo: developmentseed/landsat-util
33+
branch: master

CHANGES.txt

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
Changes
22
=======
33

4+
0.7.0 (2015-05-29)
5+
------------------
6+
- New documentation
7+
- Deployed to readthedocs
8+
- Automate deployment to pypi
9+
- Adds docker support
10+
- skip unzipping if images already unzipped
11+
- add force-unzip flag
12+
- fix a bug where multiple downloads was not followed by multiple process #81
13+
- fix a bug where if scenes was downloaded from google instead of aws, process failed #84
14+
- download band 8 when pansharpen fixes #73
15+
416
0.6.3 (2015-04-29)
517
------------------
618
- adjust lower rescaling bound, closes #66 for now

Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM ubuntu:14.10
2+
RUN apt-get -y update
3+
RUN apt-get install --yes python-pip python-numpy python-scipy libgdal-dev libatlas-base-dev gfortran libfreetype6-dev libglib2.0-dev zlib1g-dev python-pycurl
4+
RUN pip install landsat-util

README.rst

+17-160
Original file line numberDiff line numberDiff line change
@@ -4,183 +4,40 @@ Landsat-util
44
.. image:: https://travis-ci.org/developmentseed/landsat-util.svg?branch=v0.5
55
:target: https://travis-ci.org/developmentseed/landsat-util
66

7-
.. image:: https://pypip.in/version/landsat-util/badge.svg
8-
:target: https://pypi.python.org/pypi/landsat-util/
9-
:alt: Latest Version
7+
.. image:: https://badge.fury.io/py/landsat-util.svg
8+
:target: http://badge.fury.io/py/landsat-util
109

11-
.. image:: https://pypip.in/download/landsat-util/badge.svg
10+
.. image:: https://img.shields.io/pypi/dm/landsat-util.svg
1211
:target: https://pypi.python.org/pypi/landsat-util/
1312
:alt: Downloads
1413

15-
.. image:: https://pypip.in/wheel/landsat-util/badge.svg
16-
:target: https://pypi.python.org/pypi/landsat-util/
17-
:alt: Wheel Status
18-
19-
.. image:: https://pypip.in/license/landsat-util/badge.svg
14+
.. image:: https://img.shields.io/pypi/l/landsat-util.svg
2015
:target: https://pypi.python.org/pypi/landsat-util/
2116
:alt: License
2217

23-
Landsat-util is a command line utility that makes it easy to search, download, and process Landsat imagery.
24-
25-
This tool uses Development Seed's `API for Landsat Metadata <https://github.com/developmentseed/landsat-api>`_.
26-
27-
This API is accessible here: https://api.developmentseed.org/landsat
28-
29-
You can also run your own API and connect it to this tool.
30-
31-
Installation
32-
============
33-
34-
**On Mac**
35-
36-
``$: pip install landsat-util``
37-
38-
**On Ubuntu 14.04**
39-
40-
Use pip to install landsat-util. If you are not using virtualenv, you might have to run ``pip`` as ``sudo``.
41-
42-
``$: sudo apt-get update``
43-
44-
``$: sudo apt-get install python-pip python-numpy python-scipy libgdal-dev libatlas-base-dev gfortran``
45-
46-
``$: pip install landsat-util``
47-
48-
**On Other systems**
49-
50-
Make sure Python setuptools is installed.
51-
52-
``$: python setup.py numpy six``
53-
54-
``$: python setup.py install``
55-
56-
57-
**To Upgrade**
58-
59-
``$: pip install -U landsat-util``
60-
61-
If you have installed previous version of landsat using brew, first run:
62-
63-
``$: brew uninstall landsat-util``
64-
65-
**To Test**
66-
67-
``$: pip install -U requirements/dev.txt``
68-
69-
``$: nosetests``
70-
71-
Or
72-
73-
``$: python setup.py test``
74-
75-
Overview: What can landsat-util do?
76-
====================================
77-
78-
Landsat-util has three main functions:
79-
80-
- **Search** for landsat tiles based on several search parameters.
81-
- **Download** landsat images.
82-
- **Image processing** and pan sharpening on landsat images.
83-
84-
These three functions have to be performed separately.
85-
86-
**Help**: Type ``landsat -h`` for detailed usage parameters.
87-
88-
Step 1: Search
89-
===============
90-
91-
Search returns information about all landsat tiles that match your criteria. This includes a link to an unprocessed preview of the tile. The most important result is the tile's *sceneID*, which you will need to download the tile (see step 2 below).
92-
93-
Search for landsat tiles in a given geographical region, using any of the following:
94-
95-
- **Paths and rows**: If you know the paths and rows you want to search for.
96-
- **Latidue and Longitude**: If you need the latitude and longitude of the point you want to search for.
97-
98-
Additionally filter your search using the following parameters:
99-
100-
- **Start and end dates** for when imagery was taken
101-
- **Maximum percent cloud cover** (default is 20%)
102-
103-
**Examples of search**:
104-
105-
Search by path and row:
106-
107-
``$: landsat search --cloud 4 --start "january 1 2014" --end "january 10 2014" -p 009,045``
108-
109-
Search by latitude and longitude:
110-
111-
``$: landsat search --lat 38.9004204 --lon -77.0237117``
112-
113-
114-
Step 2: Download
115-
=================
116-
117-
You can download tiles using their unique sceneID, which you get from landsat search.
118-
119-
Landsat-util will download a zip file that includes all the bands. You have the option of specifying the bands you want to down. In this case, landsat-util only downloads those bands if they are available online.
120-
121-
**Examples of download**:
122-
123-
Download images by their custom sceneID, which you get from landsat search:
124-
125-
``$: landsat download LC80090452014008LGN00``
126-
127-
Download only band 4, 3 and 2 for a particular sceneID:
12818

129-
``$: landsat download LC80090452014008LGN00 --bands 432``
130-
131-
Download multiple sceneIDs:
132-
133-
``$: landsat download LC80090452014008LGN00 LC80090452015008LGN00 LC80090452013008LGN00``
134-
135-
Step 3: Image processing
136-
=========================
137-
138-
You can process your downloaded tiles with our custom image processing algorithms. In addition, you can choose to pansharpen your images and specify which bands to process.
139-
140-
**Examples of image processing**:
141-
142-
Process images that are already downloaded. Remember, the program accepts both zip files and unzipped folders:
143-
144-
``$: landsat process path/to/LC80090452014008LGN00.tar.bz``
145-
146-
If unzipped:
147-
148-
``$: landsat process path/to/LC80090452014008LGN00``
149-
150-
Specify bands 3, 5 and 1:
151-
152-
``$: landsat process path/to/LC80090452014008LGN00 --bands 351``
153-
154-
Process *and* pansharpen a downloaded image:
155-
156-
``$: landsat process path/to/LC80090452014008LGN00.tar.bz --pansharpen``
157-
158-
159-
Important Notes
160-
===============
19+
Landsat-util is a command line utility that makes it easy to search, download, and process Landsat imagery.
16120

162-
- All downloaded and processed images are stored at your home directory in landsat forlder: ``~/landsat``
21+
Docs
22+
+++++
16323

164-
- The image thumbnail web address that is included in the results can be used to make sure that clouds are not obscuring the subject of interest. Run the search again if you need to narrow down your result and then start downloading images. Each image is usually more than 700mb and it might takes a very long time if there are too many images to download
24+
For full documentation visit: http://landsat-util.readthedocs.org/
16525

166-
- Image processing is a very heavy and resource consuming task. Each process takes about 5-10 mins. We recommend that you run the processes in smaller badges. Pansharpening, while increasing image resolution 2x, substantially increases processing time.
26+
To run the documentation locally::
16727

168-
- Landsat-util requires at least 2GB of Memory (RAM).
28+
$ cd docs
29+
$ make html
16930

170-
Recently Added
171-
+++++++++++++++
31+
Recently Added Features
32+
+++++++++++++++++++++++
17233

17334
- Add longitude latitude search
17435
- Improve console output
17536
- Add more color options such as false color, true color, etc.
17637

38+
Change Log
39+
+++++++++
40+
41+
See `CHANGES.txt <CHANGES.rst>`_.
17742

178-
To Do List
179-
++++++++++
18043

181-
- Add Sphinx Documentation
182-
- Add capacity for NDVI output
183-
- Add alternative projections (currently only option is default web-mercator; EPSG: 3857)
184-
- Connect search to Google Address API
185-
- Include 16-bit image variant in output
186-
- Add support for color correct looping over multiple compressed inputs (currently just 1)

Vagrantfile

-37
This file was deleted.

docs/Makefile

+20-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1919
# the i18n builder cannot share the environment and doctrees with the others
2020
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
2121

22-
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
22+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
2323

2424
help:
2525
@echo "Please use \`make <target>' where <target> is one of"
@@ -30,6 +30,7 @@ help:
3030
@echo " json to make JSON files"
3131
@echo " htmlhelp to make HTML files and a HTML help project"
3232
@echo " qthelp to make HTML files and a qthelp project"
33+
@echo " applehelp to make an Apple Help Book"
3334
@echo " devhelp to make HTML files and a Devhelp project"
3435
@echo " epub to make an epub"
3536
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@@ -45,6 +46,7 @@ help:
4546
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
4647
@echo " linkcheck to check all external links for integrity"
4748
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
49+
@echo " coverage to run coverage check of the documentation (if enabled)"
4850

4951
clean:
5052
rm -rf $(BUILDDIR)/*
@@ -85,17 +87,25 @@ qthelp:
8587
@echo
8688
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
8789
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
88-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/landsat.qhcp"
90+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Landsat-util.qhcp"
8991
@echo "To view the help file:"
90-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/landsat.qhc"
92+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Landsat-util.qhc"
93+
94+
applehelp:
95+
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
96+
@echo
97+
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
98+
@echo "N.B. You won't be able to view it unless you put it in" \
99+
"~/Library/Documentation/Help or install it in your application" \
100+
"bundle."
91101

92102
devhelp:
93103
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
94104
@echo
95105
@echo "Build finished."
96106
@echo "To view the help file:"
97-
@echo "# mkdir -p $$HOME/.local/share/devhelp/landsat"
98-
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/landsat"
107+
@echo "# mkdir -p $$HOME/.local/share/devhelp/Landsat-util"
108+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Landsat-util"
99109
@echo "# devhelp"
100110

101111
epub:
@@ -166,6 +176,11 @@ doctest:
166176
@echo "Testing of doctests in the sources finished, look at the " \
167177
"results in $(BUILDDIR)/doctest/output.txt."
168178

179+
coverage:
180+
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
181+
@echo "Testing of coverage in the sources finished, look at the " \
182+
"results in $(BUILDDIR)/coverage/python.txt."
183+
169184
xml:
170185
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
171186
@echo

0 commit comments

Comments
 (0)