Questions tagged [raster]

Raster is a data format consisting of regular grids of values, usually stored in an image-like format.

1,350 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
0answers
596 views

Parsing file format for attributes in Raster Product Format (RPF) maps and imagery?

I'm trying to implement an open-source NITF reader (using only java, no external libraries such as GDAL or NITRO), and its mostly going OK. However I'm having trouble understanding the RPF extensions, ...
6
votes
0answers
322 views

PostGIS issue with ST_Clip?

I'm trying to clip a raster using a polygon but I end up with a result that doesn't seem right and where some raster pixels are outside the polygon used for the clip. See image below where polygon is ...
6
votes
0answers
206 views

Packing squares polygons in a raster grid

In the green area of the raster I have to fit as many square polygons as possible, of three different sizes: 3x3 cell size 2x2 cell size 1x1 cell size With the fact that the approach should be ...
6
votes
1answer
473 views

Cellular Automata Markov for forecast LULC in R software

I would like to forecast land use changes by implementing the Cellular Automata (CA) Markov Chain models in R software. I have the classified LULC maps from 3 times periods (1992,2003,2014), and also ...
6
votes
0answers
741 views

Efficiently calculate distance between raster patch edges

I have a binary raster which I've classified into patches using raster::clump. I now want to efficiently calculate the edge-to-edge, i.e. minimum, pairwise distance between patches. I am currently ...
5
votes
0answers
51 views

Referencing an output in an expression in process modeler

In the process modeler, I'd like to reference an output of a previous step as one of the parameters of an algorithm. In this case, the previous step was clipping a large raster and I want to use the ...
5
votes
0answers
67 views

Robust formula to get row,column of raster given X,Y

I'm looking for a robust method to get the row and column of a pixel in a raster, given the coordinates of the origin and the cell spacing. This seems like a problem with an incredibly obvious ...
5
votes
0answers
392 views

Calculating average pixel value for each band across multiple raster layers?

I have a set of raster files that are essentially data sets of precipitation across a region. I have multiple raster files that are the outputs of different climate models. Each pixel in the raster ...
5
votes
0answers
371 views

Correctly handling climate projection data with R

EDIT: An example setup can be found here: The main file is extract_cordex.R I need to analyze climate data as part of my thesis, however I am not particularly trained in working with climate data and ...
5
votes
0answers
682 views

Setting band names when writing multiple layer rasters using GDAL with Python?

I want to write a raster file (using GDAL+Python) with multiply bands. However, I do not know how to named bands. Their names are always "Band 1", "Band 2", etc. I search and found a function that ...
5
votes
0answers
1k views

How do I export a 16-bit image from QGIS?

Could someone explain how to export from QGIS a 16bit image. I have imported data and coloured it as I want, but need to export it as a 16bit image, as 8bit is giving a terracing effect.I believe I ...
5
votes
0answers
435 views

QGIS Align Rasters how to retain pixel values?

I am attempting to align and then merge a number of rasters of the same resolution and extent, but where the pixels are slightly misaligned (creating small gaps when merged). This works fine using the ...
5
votes
0answers
408 views

Can extracting raster values work in polygons' CRS without raster resampling?

I am trying to extract raster values using polygon layer with different CRS. Raster is in WGS84 (EPSG:4326) and the polygons in UTM (EPSG:23031). 1. If I want to work in the projection of the ...
4
votes
1answer
60 views

Adding up several rasters to show the change

I want to add several images such that their change is shown in different colors. Such as the following in which I simply added two images in their grayscale. But I would like to have a colored ...
4
votes
0answers
70 views

QGIS rule based symbology for rasters in Atlas?

I'm making species distribution maps and have got the Atlas working perfectly using a polygon layer to show the quarter degree grid cells for species observation records. I have ~ 250 species. Problem ...
4
votes
0answers
71 views

Creating Raster that sums up input polygons using QGIS?

I am using QGIS and I have a shapefile with buildings. From these buildings, I have built Buffer with variegating radius. The Buffer also have data about the demand for Parking spots for each building....
4
votes
1answer
97 views

Calculating accumulated walking pace from starting location outwards using R?

Goal In R, I would like to calculate an accumulated cost surface around a starting location, with the cost representing the time (say, hours) to walk from the location outwards in all directions (say,...
4
votes
0answers
301 views

QGIS Zonal Statistics for polygons is missing results?

I am carrying out an analysis using QGIS 2.14.1 where I am dealing with point data that have been randomly displaced by either up to 2 Km or 5 Km. I have generated a buffer of the appropriate radius ...
4
votes
0answers
230 views

Mapcache zooming problem

I am using mapcache for caching map raster data. Everything works fine except the map zooming, because at the some zoom level i am getting pink tiling images. This is my mapcache xml file: <?xml ...
4
votes
0answers
321 views

gdal_translate slightly changes output pixel values

I have used this batch script for /r %%g in (*.jp2) do gdal_translate -co COMPRESS=LZW -co NUM_THREADS=ALL_CPUS %%g %%~dpng.tif to recursively convert all my .jp2 files in .tif files. However, the ...
4
votes
0answers
58 views

Why do I get a memory allocation error when selecting rasters by ID in PostGIS?

The Problem I have about 256000 tiles in a table of GDEM v2 at 1 arcsecond resolution. I'm on an Ubuntu server running Postgres 9.5.5 and PostGIS 2.2. The table has a GIST index on the convex hull of ...
4
votes
0answers
103 views

QGIS integer raster stats calculation error

I am comparing two raster temperature files generated from two different sources that use different algorithms. One of them is provided as a floating point (temp(C)) and the other is integer (temp(C)*...
4
votes
0answers
224 views

Creating polygons from points using lines as barriers

This question is similar to a previous post where the member asked if it were possible to create Theissen (Voronoi) polygons from lines: Creating Thiessen (Voronoi) polygons using lines (rather than ...
4
votes
1answer
345 views

extract() in R raster package slow with non-native format

I've noticed that running extract takes very different amounts of time depending on whether or not the raster is in memory, on disk in the Native format (.grd), or on disk in another format (e.g., ...
4
votes
0answers
364 views

Calculating the maximum remoteness from of the boundary of a polygon (i.e. the radius of the largest circle inscribed in this polygon)

I have two related tasks. How is it possible to solve them (or at the at least the first one, which is the principle task) in ArcGIS or QGIS ? Task 1. How to find a radius of a largest circle ...
4
votes
0answers
2k views

Clipping raster brick object in R

I have MODIS NDVI TIFF files for a year I want to first clip it with a irregular polygon (not by its extent only) of my study area and save it as a multi band raster in TIFF format The TIFF image are ...
4
votes
0answers
388 views

Aligning two raster layers in QGIS?

I am teaching myself GIS in baby steps, I recently acquired aerial imagery (employing RGB and NIR-GB sensors) using a small UAV with the intent of generating a map in a small plot of land. After ...
4
votes
0answers
866 views

Crop raster based on another raster R

library(raster) How can one clip one raster based on another raster? RasA: class : RasterLayer dimensions : 459, 533, 244647 (nrow, ncol, ncell) resolution : 10000, 10000 (x, y) extent ...
4
votes
0answers
215 views

Stretch to MinMax results in blank render output in QGIS?

I am a new QGIS user, and I can't figure out if I encountered a bug. If I have a multi-layer image, and "Multiband color" -> "Stretch to MinMax" selected I get the following behaviour. QGIS takes a ...
4
votes
0answers
1k views

How to avoid “Unable to compute a transformation between pixel/line”?

I am trying to re-project from Equi-rectangular to the NASA global EASE grid (Equal Area Scalable Earth) grid 1383 586 with a ~25 km cylindrical projection (ESPG=3410). The file is provided as HDF5. ...
4
votes
0answers
214 views

How to set m parameter of clusterR function in R?

I want to manage a clustered computation on raster and thus use the "clusterR" function in R (package 'raster'). However, there's a tuning m parameter to set, but the only explanation about this ...
4
votes
0answers
753 views

Problem loading output layer QGIS

Every time I run operations with temporary file output from the graphical modeler, I get the following error message: Oooops! The following output layers could not be open CLIP: C:\Users\Amine\...
4
votes
0answers
391 views

How to sort legend values efficiently in QGIS print composer?

Using QGIS 2.0, I have a vertical color legend for raster values, created in the print composer. I want the values sorted in descending order from top to bottom, which appears to be the reverse of the ...
4
votes
0answers
617 views

How to create raster attribute table to a raster data using gdal python?

I classified a remote sensing data and saved it as a raster using Gdal python. I want to create a raster attribute table for this classified result.. my classified raster has five classes with 1,2,3,4,...
4
votes
1answer
1k views

Counting and rasterizing polygon overlaps in QGIS?

I have a large number of polygons that are overlapping. I'd like to create a heat map and plan on using raster calculation to do this. My plan: to give each polygon a raster value of 1, and adding ...
3
votes
0answers
37 views

Pyqgis: Added raster layers do not show up

I have a list ("datList") with names of raster layers which I want to add. When I add raster layers in the python console everything works fine: for da in datListe: layerDir = "C:/[path]/" + da ...
3
votes
1answer
62 views

Merging many rasters with Python script within QGIS using GDAL?

I have many rasters that im trying to combine in order to produce contours. They are in the .bil format so I understand that i need to translate them using gdal first but none of my attempts have ...
3
votes
0answers
27 views

Raster statistics per latitude cross-section

I want a profile graph with biomass volume across a landscape's latitude. Im using ArcGis Pro 2.3.3. It's hard to explain so I'll provide a rough sketch of the desired result: The sketch shows a ...
3
votes
0answers
303 views

QGIS 3.4.2 not loading .tif files correctly

I have a surface which has been exported from Civil3D and added to both QGIS 2.18 and 3.4.2 When added they both look very different and the imported image and values in 3.4.2 is not very helpful in ...
3
votes
0answers
128 views

Could not allocate required memory for image

I'm trying to export a 24k image (export set to 1650DPI) using the "export as image" function but I keep getting the "Could not allocate required memory for image" warning. I don't understand why ...
3
votes
0answers
120 views

Identification of roof peaks on a Raster in Qgis

I am trying to map all the flat roofs of a city. After processing my data I have a huge raster with the zones that are flat (=1) and not flat (=0). I can overlap the roof polygons over this raster and ...
3
votes
0answers
345 views

Merging two overlapping rasters

There are two rasters A and B. A is smaller but within B and since A has more up-to-date pixel values, I was able to merge A and B with "Mosaic raster layers" tool in QGIS which replaces B pixel ...
3
votes
0answers
89 views

Calculating albedo using NAIP imagery?

I am attempting to calculate albedo using NAIP imagery 4 bands (visible-NIR). Zhao et al 2015 used quick bird imagery to calculate albedo using the following equation: Albedo = -1.694(band1(blue))+2....
3
votes
0answers
59 views

Raster NoData Value

So over the years working with elevation and image rasters in various formats I always kind of ignore the value of No Data. I usually just let the software/vendor/someone else decide on the value for ...
3
votes
1answer
121 views

Masking LiDAR points to create DEM in ArcGIS Pro with ArcPy?

I have an irregular LiDAR point cloud dataset, so when I try to create a DEM or DSM, the points are connected across the irregular edges of the LiDAR point cloud. I thought that creating a mask ...
3
votes
0answers
56 views

Is there a tool in QGIS similar to ArcGIS Combine?

I am looking for a tool in QGIS 2.18 similar to the Combine tool in ArcGIS for rasters. I have four different raster layers that I would like to combine into a single raster that has values that ...
3
votes
0answers
120 views

Problem with encoding when clipping raster

I am using QGIS 2.18 on a Linux Mint computer using UTF8. I downloaded solar radiation raster data from PVGIS. The files are encoded as us-ascii (according to the linux command tool file -bi). Opening ...
3
votes
1answer
260 views

TIN interpolation problem

I made a TIN interpolation of some height points but the resulting raster appears with some weird lines (like in the pic) What can i do to avoid this result? Here are the input parameters. Sorry ...
3
votes
0answers
523 views

Add color palette to grey-scale land cover GeoTIFF

I have a single band grey shade tiff image which does not have a a color palette associated with it. I need to open up the symbology and assign a color to each unique landcover class. I am looking ...
3
votes
0answers
411 views

Clipping tiled raster with polygon using PostGIS?

I have a table in postgis with a tiled raster and a table with polygons overlaying the raster. I want to get the number of pixels for each category (pixel value) that fall inside a specific polygon. ...