Hot answers tagged

17

Your script is missing the ds.FlushCache method, that saves to disk what you have in memory at the end of the modifications. See below a corrected version of your example. Notice that I also added two lines to set projection and geotransform as input import os import gdal file = "path+filename" ds = gdal.Open(file) band = ds.GetRasterBand(1) arr = band....


14

NDVI is defined for any two bands with near-infrared and infrared data (it is an empirical remote sensing index). As such, you can calculate it straight from the DNs. This is mostly OK if you are only classifying or analyzing vegetation on a single image without significant atmospheric effects (cirrus clouds...) However, if you are performing change ...


13

You may consider GRASS GIS which offers a rather complete processing chain for Landsat including radiance correction for Landsat 8. For details, see http://grasswiki.osgeo.org/wiki/LANDSAT Examples: Landsat 1-5,7,8 data import Auto-enhance colors, natural color composites Calculate Top-of-Atmosphere Reflectance and band-6 Temperature Haze removal ...


12

Have a look at nlayers(s). The returned number of layers will equal 28 - at least for the above example with 4 multi-layer objects encompassing 7 layers each. Applying stack to multiple multi-layer files results in one huge 'RasterStack' object, i.e. all the single multi-layer objects are appended to one another. If you would like to have separate stacks ...


11

You could try filling the gaps before you aggregate them by month. USGS published a LS7 SLC-off gap-filling algorithm. This algorithm was recreated for Google Earth Engine by Noel Gorelick: https://code.earthengine.google.com/d20cba5268ccbe117e2fc1c5fefc33f3 Building upon this Genadii Donchyts changed the algorithm for faster performance: https://code....


10

I would recommend using image segmentation with the free software SPRING, available from the Brazilian National Institute for Space Research. Documentation is available here and tutorials are available here. Image segmentation produces high classification accuracy compared to purely pixel based classification methods (e.g. ISODATA, Maximum Likelihood, etc). ...


10

The Scan Line Corrector in the ETM+ instrument onboard Landsat-7 suffered a (suspected) mechanical failure in 2003, so all subsequent images suffer from the striping you are seeing in your images. The Wikipedia page for the satellite has a good explanation. Destriping Landsat Images? addresses methods for de-striping the imagery, however, note that it is ...


10

It's going to be something like this, but you'll need to play with the threshold (10 in this example) to meet your needs. Watch out for ROIs that overlap a scene's footprint, but do not contain any valid pixels. Also watch out for ROIs that are very large or span multiple WRS cells. var ic = ee.ImageCollection("LANDSAT/LC08/C01/T1_RT_TOA"); // A polygon ...


9

You need to use the Composite Bands ArcGIS Geoprocessing tool. According to the ArcGIS Help, This tool can also create a raster dataset containing subset of the original raster dataset bands. This is useful if you need to create a new raster dataset with a specific band combination and order.


9

I've only worked with Landsat 7 imagery but I believe the same technique apply for composing: You need to create an RGB composite so use the Composite Bands tool (ArcToolbox -> Data Management Tools -> Raster -> Raster Processing -> Composite Bands) Add the three R G B bands in the RGB order: Band 4 (Red) Band 3 (Green) Band 2 (Blue) If you don't add them ...


9

The Landsat reflectance data you downloaded from USGS has been scaled using a scale factor of 0.0001. So multiplying the digital number by 0.0001 will give you a value between 0 and 1. The 2000 value you are talking about, i believe, is the saturate value (which should be 20000). See this document for more details: https://landsat.usgs.gov/sites/default/...


9

For the record, here is a good way to do this: var imageCollection = ee.ImageCollection("LANDSAT/LT05/C01/T1"); var months = ee.List.sequence(1, 12); var composites = ee.ImageCollection.fromImages(months.map(function(m) { var filtered = imageCollection.filter(ee.Filter.calendarRange({ start: m, field: 'month' })); var composite = ee....


8

Bulk Download One can also follow the instructions given at Landsat Scenes: Bulk Download, part of USGS' EarthExplorer web-service. After selecting the scenes of interest within from either the USGS Global Visualisation Viewer or EarthExplorer, one has to save/create the scene IDs of interest as a list (each ID entry should be a single line) in a pure .txt ...


8

I just thought I'd add that there are some 'pure' Python solutions for several nodes in this workflow, also. Some file reading and basic processing: Spectral Python: http://spectralpython.sourceforge.net/ More classification than you'll find in pure remote sensing and GIS packages: http://scikit-learn.org/stable/ More links I can't share: 6S Python ...


8

The Supplementary Materials (SM) for the Science article provides references to a number of different journal-articles that outline various parts of the methodology. The SM can be found here Extending the time-series to include Landsat-5 (and potentially Landsat-8 to make the methodology something that can be rerun "easily") data will be a challenging task,...


8

Kogan (2004) (p. 2891) provides the following formula for the Vegetation Condition Index (VCI): VCI = 100 * (NDVI - NDVImin) / (NDVImax - NDVImin) where, NDVI = Smoothed weekly NDVI value NDVImin = Multiyear minimum NDVI value NDVImax = Multiyear maximum NDVI value As you know, NDVI ranges from -1 to 1 and functionally ranges from 0 - 1. VCI rescales ...


8

gnutls.h which is required is missing from the filesystem even if you install libcurl4-gnutls-dev which supposedly has the headers files for curl. to correct for that error run: # apt-get install libgnutls28-dev to add the missing header and pip finally to install pycurl and landsat-util


8

A major reason for having panchromatic bands covering a broad spectral range is a technical reason: most of the solar energy reflected by the Earth is in the NIR wavelength. As the aim of a single panchromatic band is to achieve a better spatial resolution, you can improve the signal-to-noise ratio if your total amount of energy is larger. Originally, ...


7

Take a look at i.landsat.rgb - Performs auto-balancing of colors for LANDSAT images, probably before running the pansharpening. You may also consider to convert the digital numbers of the individual channels to top-of-atmosphere radiance or reflectance with i.landsat.toar. See also http://grasswiki.osgeo.org/wiki/LANDSAT BTW: having a range of 0-65535 for ...


7

Overview One working approach inside GRASS-GIS version 7 to get an acceptable color-balanced composite image after Pan-sharpening is check if input data are 8-bit ranging inside [0, 255] if the data are inside [0, 255] proceed then to pan-sharpening (i.pansharpen) if the data are not inside [0, 255], rescale them to this range (r.rescale) pan-sharpen with ...


7

If you really want to use python, and you need functionality similar to GRASS, perhaps the easiest solution would be to use GRASS via Python. That isn't specific to Landsat8, but I don't think a processing solution should be tied that closely to a specific satellite. You could implement some simple wrappers / higher level functions if you're consistently ...


7

This varies greatly on the characteristics of the scene. Fire scar mapping studies using Landsat-5 TM have used the following three band combinations: Spain: Bands 4, 5, 7 CHUVIECO, E., and CONGALTON, R., 1988, Mapping and inventory of forest fires from digital processing of TM data. Geocarto International, 4, 41–53. Amazonia: Bands 3, 4, 5 PEREIRA, M. ...


7

Landsat and Modis are optical sensors, which means that they provide digital numbers of reflected materials that are within the electromagnetic spectrum. These values correspond to the wave length of the corresponding satellite band. To get elevation from just the raw values would be impossible. The only potential means to collect elevation information would ...


7

The three sensors are all slightly different. However the OLI/TIRs setup is a marked departure from the TM/ETM+ sensors. The changes are succintly summarised by Li et al. 2013 as the: replacing of whisk-broom scanners with two separate push-broom OLI and TIRS scanners, an extended number of spectral bands (two additional bands provided) and narrower ...


7

A brief explanation can be found in the pdf file 'Landsat 8 (L8) Data Users Handbook', available from landsat.usgs.gov. On page 9, first paragraph, it is said: The OLI panchromatic band, Band 8, is also narrower relative to the ETM+ panchromatic band to create greater contrast between vegetated areas and land without vegetation cover. This would be in ...


6

Let's narrow down the methods of classification to two major groups: object-oriented classification and pixel-based classification. The attached tables are from a publication titled Comparison of Pixel-Based and Object-Oriented Classification Approaches using Landsat-7 ETM sPECTRAL Bands. The highlighted row in Table 3 shows that object-oriented ...


6

Keep in mind - no one procedure is necessarily going to provide the "best result." Image interpretation is critical, both before and after classification. You will likely find urban areas misclassified as something else and non-urban areas classified as being urban. You have two basic approaches: 1) Supervised classification: this involves selecting ...


6

As you've probably found, removing clouds from Landsat imagery is not a trivial problem. There is a decent amount of scholarly research about methods for implementing masking and correction for clouds and their shadows. So due to the complexity of this issue, you probably won't find any one size fits all solutions that work perfectly out of the box. That ...


6

Satellite zenith angle Images from Landsat 1 - 7 are always nadir. In other words, their satellite zenith angle is close to 0°. Likewise, the _MTL.txt you posted corresponds to a Landsat 5 image, and so is a nadir image. Off-Nadir imagery has been introduced with Landsat 8. Landsat 8 images have a field NADIR_OFFNADIR in their _MTL.txt metadata. The ...


6

Manually using a stereoscope with a high enough resolution image, it is possible to estimate stand height. Although Landsat has a 30meter resolution and is too crude to estimate tree height. (LIDAR data would be necessary if your set on using Landsat) Depending upon the species your trying to measure NAIP imagery may be a better option, with a 1 meter ...


Only top voted, non community-wiki answers of a minimum length are eligible