Hot answers tagged

11

I had the same issue some months ago. Use gdal_merge to generate a new file from the 3 independent rasters. In OSGeo4W command line you can do this: gdal_merge.bat -separate -of GTiff -o output.tif input1.tif input2.tif input3.tif In QGIS you can do the same with a GUI in the raster plugin "merge" tool. Hope this helps.


8

You could try "Raster -> Miscellaneous -> Merge" which is a front-end for GDAL's merge_raster.py. It's part of GdalTools plugin that you may have to enable from the "Plugins -> Manage plugins..." dialogue.


6

The Gdal_translate utility can be used. The documentation mentions: ...to convert raster data between different formats, potentially performing some operations like subsettings, resampling, and rescaling pixels in the process. It also has an option for bands, where you selects which bands you want to operate on. So if you want to export just the ...


5

What you want to do is Set Raster Properties in a script or change it manually in ArcCatalog. This will not create a new raster or even take very long. In python it's a bit tricky: import sys, os, arcpy InFolder = sys.argv[1] arcpy.env.workspace = InFolder for Ras in arcpy.ListRasters(): arcpy.AddMessage("Processing " + Ras) ...


5

I don't know how GDAL handles JPEG compression on a four band raster, it does not make much sense to me, JPEG is meant to be used against RGB (three band) or gray (one band) images. When you gdal_translate it you can also shave off the fourth band with, I believe, -b 1 -b 2 -b 3


3

It depends upon the intended use of the Landsat data. Generally speaking, if you are doing multi-temporal analyses, you need atmospherically corrected data, otherwise DN format is sufficient. I would recommend reading the following landmark paper on the subject: Song, C., Woodcock, C. E., Seto, K. C., Lenney, M. P., & Macomber, S. A. (2001). ...


3

You will not be able to generate the NDVI from Landsat Look images. These are generated from the visible bands to "simulate natural color" In order to get the image with all bands, including red and near infrared, download it from another source - for example the USGS EarthExplorer For Landsat 8 the NDVI is calculated as (band5 - band4) / (band5 + band4). ...


3

With a multi-band raster input, ArcGIS will only process the first band: Multiband raster data When a multiband raster is used as input, most Spatial Analyst tools operate only on the first band. The exceptions are certain tools in the Multivariate and Extraction toolsets which do process each of the bands in a multiband input and can create a ...


3

Use gdalbuildvrt fiveband.vrt -separate dem.tif threebandalpha.tif gdal_translate fiveband.vrt fiveband.tif If you application uses GDAL, you can just open the vrt.


3

I would recommend calculating soil moisture indices from Landsat TM bands. MTRI has an interesting article on creating soil moisture index (SMI) from Landsat TM 5. Also, I would recommend exploring soil moisture estimates using TM band 6 (Thermal IR). Attached is a good tutorial on calculating indices from Landsat TM bands using ArcGIS 9.x (as you ...


3

To create a NDVI image you need to use the channels for red and near infrared (NIR) reflectance. The red channel is usually in a wavelength range between 0.6-0.7µm and the near infrared channel in a range between 0.7-1.10µm. So if one of your 6 files is in one of these widths you can use it for the calculation. In QGIS there are two ways to calculate the ...


2

Building on FelixIP's answer, the following method checks for 1) zero values in a 200x200m area located at the center of the image and 2) corrupt rasters that will not read. The bad files are added to one of two lists based on the problem. Efficiency is good, with the script scanning ~2 tiles/sec. import arcpy, os, numpy arcpy.env.workspace = ...


2

Replace point coordinates below by raster extent centre point coordinates p=arcpy.Point() with arcpy.da.UpdateCursor(pntFile,("SHAPE@XY",theFLD)) as rows: for row in rows: XY=row[0] p.X,p.Y=XY myArray = arcpy.RasterToNumPyArray(raster,p,1,1,-9999) ...


2

I believe that you can use tree different procedures that theoretical should work. Raster calculater where you can use this expression SETNULL([raster] == value, [raster]) Reclassify where you should only reclass the value that you want. And using ArcPy you can use this script that I've found here http://gis.stackexchange.com/a/24578/47790 import arcpy ...


2

If you go to the raster properties, and if the symbology is set as RGB composite (which it seems to be), you can check the Display Background Values (RGB) box and set whatever you like as a hollow background. So just set 0 0 0 as the background value and you should be in business.


2

I think the easiest way to achieve this would be to create a null condition raster first, then use that raster to assign the NoData values to each band seperately. Try running the Con function to create the null condition raster. nullCondition = Con(((band1 == 0) & (band2 == 0) & (band3 == 0)), 1, 0) Then use the null condition raster to assign ...


2

According to NASA, a spectral radiometer is a multispectral sensor. Spectroradiometer—A radiometer that measures the intensity of radiation in multiple wavelength bands (i.e., multispectral). Many times the bands are of high-spectral resolution, designed for remotely sensing specific geophysical parameters Perhaps you're thinking of a spectrometer, ...


2

Enable the GDALTools plugin (Plugins->Manage Plugins... menu) and use the Merge tool (Raster->Miscellaneous menu) and tick the Layer stack option.


2

Well I figured it out! Hopefully this will help someone else! Add your Raster and Polygon to clip to. Open the Image Analysis Toolbar (Go to > Windows > Image Analysis) Select your Raster in Image Analysis then Select your polygon to clip to. Select the Clip Icon. Then Right click on your new raster in the Table of Contents and Export Data. I used TIFF ...


2

Your values aren't in 0,255 since they are UInt16. You can try rescaling to 0,255 (GDAL works it out by default from input min/max and output default 0,255): gdal_translate -b 1 -b 2 -b 3 -mask "none" "input.tif" "output.tif" -scale Note you can add params if the defaults aren't sensible: -scale [src_min src_max [dst_min dst_max]] ...


1

What is your background in the principles of remote sensing? There are many existing vegetation indices, such as the most simple and common NDVI, that do what you are asking. Generally you should have an idea what index you are going to use based on the objectives of your analysis. Before you create an index, it's also best practice to convert DNs to ...


1

To elaborate on @Stacky's comment: When opening the Layer Properties dialog box for a multiband raster and selecting the Symbology tab, the options available are "Stretched" and "RGB Composite". "Stretched" is useful when only a single band from the raster is needed, but "RGB Composite" is obviously appropriate for a raster with RGB bands. At the top of ...


1

You need to select the "Show All" box in the Index Options GUI.


1

The short answer is that you can't. The documentation says: The Advanced Wide Field Sensor (AWiFS), on-board IRS-P6 operates in four spectral bands in green (0.52-0.59µm), red (0.62-0.68µm), near infrared (0.77-0.86µm) and short wave infrared (1.55-1.70µm) Since the data does not have the regular 3 bands, you cannot get a True color composite of ...


1

If you have an NDVI and you can see the broad scale variations from one row to the next, then I would extract from the NDVI all pixels that are between some medium to high thresholds = only the pixels that show the vienyard rows themselves with the broad scale variations. All ground pixels will be NULL. Then I would use an interpolation function such as the ...


1

It sounds like you just want to play with the symbology of the rasters you have created. You can interact with the histograms of the greyscale single-band indices or the RGB layers themselves in QGIS. See this manual page about changing symbology: http://docs.qgis.org/2.8/en/docs/training_manual/rasters/changing_symbology.html


1

I would just add all of the rasters to a mosaic dataset (requires at least an ArcGIS Standard license), without any conversion. If you want to add info about the date, you can add a field to the attribute table of the mosaic's footprints (not even necessary if the name of the raster file is enough: it is added to the attribute table of the footprints when ...


1

I don't know about QGIS, but in ArcMap you could use Extract Values To Table (Geostatistical Analyst) You simply give the grid .shp and land-use class raster and the results is a table with unique values within each cell. All you have to do is to calculate the counts and percentages, preferably in R or some other statistical software (or by hand if you ...


1

You could create a GDALDataset with as many bands as you have raster bands, then copy the data from each of your bands into the corresponding band in the GDALDataset. Here's some example code in C++ (since that's where I'm most familiar with GDAL). //create the dataset const char *filename = "example.tif"; GDALDriver *pDriverTiff = ...


1

I dont think there´s a faster way to do that, but what you can do is a list in a table with the name of each multilayerraster with an identifier (column names: id & name, in this order). So you can write this: #load the table with the name of the image & id list<-read.table("Table.txt",header=T) # select "automatic" correlative id id<-id+1 ...



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