developmentseed / landsat-util

A utility to search, download and process Landsat 8 satellite imagery
Creative Commons Zero v1.0 Universal
689 stars 147 forks source link

LC81980292015263LGN00 clipped error #193

Open alx opened 8 years ago

alx commented 8 years ago

Command

/usr/local/bin/landsat download LC81980292015263LGN00 --dest=data -p --clip=1.3514147,43.5365284,1.3842081,43.5514638

Output


===> Source: AWS S3
===> Downloading: LC81980292015263LGN00_B4.TIF
   100%     63.5 MiB       2.1 MiB/s            0:00:00 ETA    
     stored at data/LC81980292015263LGN00
===> Downloading: LC81980292015263LGN00_B3.TIF
   100%     62.4 MiB       4.3 MiB/s            0:00:00 ETA    
     stored at data/LC81980292015263LGN00
===> Downloading: LC81980292015263LGN00_B2.TIF
   100%     59.9 MiB       1.9 MiB/s            0:00:00 ETA    
     stored at data/LC81980292015263LGN00
===> Downloading: LC81980292015263LGN00_BQA.TIF
   100%      5.3 MiB     780.1 KiB/s            0:00:00 ETA    
     stored at data/LC81980292015263LGN00
===> Downloading: LC81980292015263LGN00_MTL.txt
   100%      7.7 KiB       7.7 KiB/s            0:00:00 ETA    
     stored at data/LC81980292015263LGN00
Clipping
     Band 4
     Band 3
     Band 2
     Band QA
===> Image processing started for bands 4-3-2
===> Getting boundaries
===> Projecting
     band 4
     band 3
     band 2
===> Calculating cloud and snow coverage from QA band
     cloud/snow coverage: 0.0
===> Final Steps
     Color correcting band 4
Time spent : 85.60 seconds

Error

Traceback (most recent call last):
  File "/usr/local/bin/landsat", line 8, in <module>
    landsat.landsat.__main__()
  File "/usr/local/lib/python2.7/dist-packages/landsat/landsat.py", line 491, in __main__
    exit(*main(args))
  File "/usr/local/lib/python2.7/dist-packages/landsat/landsat.py", line 416, in main
    args.ndvigrey, bounds=bounds)
  File "/usr/local/lib/python2.7/dist-packages/landsat/landsat.py", line 479, in process_image
    return p.run()
  File "/usr/local/lib/python2.7/dist-packages/landsat/decorators.py", line 11, in wrapped_f
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/landsat/image.py", line 427, in run
    return self._write_to_file(new_bands, **rasterio_options)
  File "/usr/local/lib/python2.7/dist-packages/landsat/decorators.py", line 11, in wrapped_f
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/landsat/image.py", line 264, in _write_to_file
    band = self._color_correction(band, self.bands[i], 0, coverage)
  File "/usr/local/lib/python2.7/dist-packages/landsat/image.py", line 278, in _color_correction
    p_low, cloud_cut_low = self._percent_cut(band, low, 100 - (coverage * 3 / 4))
  File "/usr/local/lib/python2.7/dist-packages/landsat/image.py", line 288, in _percent_cut
    return numpy.percentile(color[numpy.logical_and(color > 0, color < 65535)], (low, high))
  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", line 3268, in percentile
    interpolation=interpolation)
  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", line 2997, in _ureduce
    r = func(a, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", line 3385, in _percentile
    x1 = take(ap, indices_below, axis=axis) * weights_below
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 124, in take
    return take(indices, axis, out, mode)
IndexError: cannot do a non-empty take from an empty axes.