Hot answers tagged

29

You could create a virtual mosaic from all Tiff files: gdalbuildvrt mosaic.vrt c:\data\....\*.tif and convert it afterwards: gdal_translate -of GTiff -co "COMPRESS=JPEG" -co "PHOTOMETRIC=YCBCR" -co "TILED=YES" mosaic.vrt mosaic.tif Keep an eye on all the GDAL creation parameters to compress your mosaic and use gdaladdo to add overviews. More info here: ...


19

The issue here is that mosaic and do.call are expecting a raster object in the list and not just character names of the raster that is contained in the "rasters1" vector. You are, in effect, asking to mosaic a name in a vector and not a raster object. # Create some example data require(raster) r <- raster(ncol=100, nrow=100) r1 <- crop(r, ...


10

As whuber mentioned, often statistics found in the raster properties are sometimes approximate or are out-of-date. They are predetermined properties that can be misleading to the actual raster values. Calculated your own min / max values from 100% of the actual data using NumPy arrays. See Working with NumPy in ArcGIS, and RasterToNumPyArray (arcpy). E.g.: ...


8

You can use r.patch for that (see help file) You probably want to set the region first to encompass all raster layers, after which you can use r.patch to 'mosaic' the layers. The following example is from the helpfile: export MAPS=`g.mlist type=rast sep=, pat="map_*"` g.region rast=$MAPS -p r.patch in=$MAPS out=mosaic Use the keyword export when you are ...


7

Sure, gdal_translate: gdal_translate in_file.tif out_file.tif -co "PROFILE=GeoTIFF" -co "TFW=YES" the above command should do the trick.


7

Your best bet would be to mosaic the raw red band and near infrared band images from which the NDVI images are derived. There are techniques for creating seamless mosaics for images, e.g. through the use of histogram matching and feathering techniques. For areas of overlap, the feathering method will calculate the output value as a weighted combination of ...


7

The best solution to this is making a list of the rasters, then passing this to a function based on the apply family The following code was pulled from a similar question wrapped into a function and should work for you mosaicList <- function(rasList){ #Internal function to make a list of raster objects from list of files. ListRasters <- function(...


7

You may see considerable benefit if you load them into a single virtual raster (vrt). You can do that through the processing toolbox, by searching for "build vrt"


6

The differences between Raster Datasets, Mosaic Datasets, and Raster Catalogs are explained well on the Esri help page. At the bottom has a chart that breaks everything down and list pros and cons of all three types. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Raster_data_organization/009t0000000n000000/


6

Another option is to build a Virtual Raster. You can perform this using GDAL, FWTools, or QGIS. Essentially, a virtual raster will make the mosaic, but as a pointer file, that brings in all the imagery. The file size stays relatively small, and the performance is good. I am using it to mosaic 5cm imagery, and I like the results.


6

I noticed the Mosaic To New Raster tool has a Mosaic Operator setting. The default is LAST, which states the output cell value of the overlapping areas will be the value from the last raster dataset mosaicked into that location. Settings are FIRST, LAST, BLEND, MEAN, MINIMUM, and MAXIMUM. I would try other settings or reorder your rasters in the Input ...


6

As the other replies say the statistics are likely out of date. If you prefer using ArcGIS try the Calculate Statistics tool in the Data Management toolbox. This should update the statistics for you.


6

Found a quick solution - replacing "-hidenodata" with "-srcnodata 0" in the .vrt build: gdalbuildvrt -srcnodata 0 mosaic.vrt geo_pict20140910_131*


6

Agree to the comment of @FelixIP, one possible solution is to first create a whole raster using RasterMosaicker transformer, then reproject and re-tile the Raster with RasterTiler transformer. This can be a ressource consuming approach, if you have many input tiles. Another approach is to apply nodata values with the RasterBandNodataSetter (Value = 0) or ...


5

The simplest way I can think of is to take the merged raster you have just made and save out the red band (perhaps using gdal_translate and the -b switch). Alternatively you could use QGIS' raster calculator to save only the red band as a new raster.


5

Chris, Maksim is right, you should be able to solve this problem by mosaicing each of your individual tiles into a single DEM. The problem that you have currently is that each of the individual DEMs has it's own display minimum and maximum values over which the same greyscale palette is being stretched. Consider, for one tile the 256 (perhaps more) grey ...


5

It seems that there are two things going on here. First, your tiles are not seamless, in that in the areas of overlap at the edges of the tiles, the elevations are not identical. I can confirm this as I digitized several points along the overlapping area and extracted the elevations in both raster DEMs and found this: In the case of the two tiles that you ...


5

Full credit to @Tom Higginbottom who answered the hard part but a small modification I made to fix the Error in compareRaster(x, extent = FALSE, rowcol = FALSE, orig = TRUE, : different origin Just added a raster_file <- projectRaster(raster_file, snap, method = "ngb") into the loop and created a snap raster, with a large extent that covers the whole ...


5

Solution 1 Create a loop to iterate through files: library(raster) raster_files <- list.files(mypath,full.names = T) #use pattern = '.tif$' or something else if you have multiple files in this folder r_name <- list.files(mypath,full.names = F) rList <- list() # to save raster values statList <- list() # to save data.frame with statistics ...


5

1st: The exact code you posted (https://code.earthengine.google.com/ce1a151ce06497b20cf1793715cb0120) did export the image correctly. So the error cannot be reproduced. May be, you changed the 'ROI' to a place where the filtered collection had no images. 2nd: There are no images because you filtered by cloud percentage, and so, it found images that suited ...


5

You need to change the Pixel Type (optional) to 32_Bit_Float or 64_Bit, if you want decimals: 32_BIT_FLOAT—A 32-bit data type supporting decimals 64_BIT—A 64-bit data type supporting decimals. By default it is 8_BIT_UNSIGNED, which means unsigned integer.


4

FME RasterMosaicker can accomplish this: You will have to modify these setting to suit your sampling and Interpolation. You should be be able to achieve something like this if your aerial photo have been ortho-rectified: It might take a few goes- best advice is to try a sample of 3-5 adjoining images and test. source of image (safe.com) and more ...


4

First, you are using R. R Studio is just an IDE for R so in the future please make this an R question. I will warn you that working with HDF files in R is a pain. In theory GDAL supports HDF5 so one could use readGDAL in the rgdal package. Depending on the source of the data readGDAL has a high fail rate making it less than reliable. Historically, there ...


4

I recommend creating a mosaic dataset within a file geodatabase. There are many advantages of working with this type of data model. For one, you can modify properties of the dataset once it is created to enhance rendering. You also have much finer control of how these data are served compared to a stand-alone raster dataset created using mosaic to new ...


4

Suggest you try building a virtual raster from the DEM TIFFs: Raster -> Miscellaneous -> Build Virtual Raster (Catalog). It seems to work with your sample data. Sorry, I just had to put some hillshade on the result. N.


4

I am a developer of the open-source GIS Whitebox GAT, which contains several image processing tools including a tool called Mosaic With Feathering. I doubt that it is as sophisticated as ERDAS or ENVI tools, but it will create a seamless mosaic using a feathering scheme. A detailed description of the process can be found in the linked tutorial. You can use ...


4

You're better off mosaicing first. It will save you time and effort to do so. Setting up a batch process in general usually takes a bit more time than firing off a single calculation on a single raster. This is especially true in ArcGIS, whose batch tools aren't always user friendly and are sometimes completely separate geoprocessing tools from the single-...


4

Use gdal_polygonize.py, ogr2ogr and ogrinfo in a loop. On linux (not tested): final=merged.shp for f in *.tif; do name=$(basename $f .tif) shp=${name}.shp gdal_polygonize.py $f -f "ESRI Shapefile" $shp ogrinfo $shp -sql "ALTER TABLE $name ADD COLUMN name character(30)" ogrinfo $shp -sql "UPDATE $name SET name='$name'" if [ -f $final ]...


4

The following code creates a list of mosaic images, where each mosaic image is constructed from images of a specified time interval. Within each time interval, the "least cloudy pixel", determined by ranking a vegetation index (NDVI), is returned. This code should work anywhere and for any time that the input data (Landsat 5) is available. var Date_Start = ...


4

I had the same problem when I created the 'Best Available Pixel' code (https://github.com/fitoprincipe/geebap), and I solved this way: Add a band in which the value of every pixel is the number of days since the Epoch (1970-01-01T00:00:00Z) Add a band with an encoded number for each collection and a property exposing the relation. For example, Landsat 5 TOA:...


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