Questions tagged [raster]

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

1,628 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
0answers
675 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, ...
8
votes
0answers
2k views

Exporting 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 ...
8
votes
0answers
847 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 ...
7
votes
1answer
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 ...
6
votes
0answers
64 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 ...
6
votes
0answers
397 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
233 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
0answers
1k 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 ...
6
votes
1answer
477 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., ...
5
votes
1answer
120 views

Rasterize/Filter with Burn and Weight variables in QGIS

Using QGIS 3.10.1, I am attempting to rasterize some demographic polygons, and then apply a filter (Gaussian) to create a smooth/graduated surface. This works fine for some of my values (e.g. total ...
5
votes
0answers
76 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
1answer
119 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,...
5
votes
0answers
613 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
614 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 ...
5
votes
0answers
488 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
568 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
0answers
25 views

How to add raster value with specific equation?

I am trying to develop a raster layer with the interference of streetlight in this example: As you can see there are multiple buffer rings around a point layer. I actually want to transform this ...
4
votes
0answers
55 views

Same LiDAR data but different results in ArcMap and eCognition

I have generated raster layers based on LiDAR Number of Returns in both ArcMap and eCognition but the results are quite different. I ArcMap I used LAS point to Statistics to Raster Tool, in the ...
4
votes
0answers
117 views

Circular focal means with raster and NAs

I am trying to understand circular focal means using rasters having NA values. I made a couple of scenarios to better understand how to combine weight matrices and functions to summarize values. I am ...
4
votes
0answers
51 views

Setting default raster statistics extent in QGIS?

I recently found the setting in QGIS to rescale raster symbology using the current extent, which is really handy (Layer styling > Min/Max Value Settings). My question is - can the default extent be ...
4
votes
1answer
56 views

Aggregating multiple rasters within a polygon in PostGIS

I have several raster tables in PostGIS (four in fact but in this case let us assume there are just two) - same cell sizes, same alignment but with different types of value (e.g 3d_pot, 3d_area). ...
4
votes
0answers
386 views

Error using 'Clip raster by mask' in QGIS v3.8.2

I am attempting to clip a raster to a shapefile boundary (country boundary, 1 polygon) using the 'clip raster by mask' tool in QGIS v3.8.2. Both layers are in WGS84, so projection mismatch shouldn't ...
4
votes
0answers
74 views

Adding raster layers to an existing GeoPackage in R

I have a GPKG file with a few vector layers. I have a few processing steps in my script and every now and then a new layer is added to the file. This works fine for vector layers using something like ...
4
votes
0answers
607 views

Georeference an unreferenced image using rasterio in Python

I have unregistered/unreferenced 6 band TIFF images that I have been trying to export as georeferenced GeoTIFFs. The GPS coordinates of the corners of each image is known and each image is 1024 height ...
4
votes
1answer
71 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
84 views

What kind of resampling will give the highest quality when building pyramids?

The resampling setting of the pyramids builder of QGis povides several ways to do so : nearest, average, gauss, cubic, average_mp, average_magphase and mode. I am not a specialist in the subject. I ...
4
votes
0answers
200 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 ...
4
votes
0answers
528 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 ...
4
votes
0answers
106 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
195 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 ...
4
votes
0answers
73 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
0answers
763 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 ...
4
votes
0answers
408 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
290 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
446 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
66 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
126 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
295 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
0answers
411 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
465 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
1k 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
235 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
231 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
771 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
462 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
634 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
68 views

Extracting tree stems from LiDAR point clouds using 'bottom-up' approach

Let me preface by recognizing that there are some previous questions that are related but different than mine because they are focused specifically on tree crowns rather than stems here and here. I ...
3
votes
0answers
41 views

Extract pixel values in raster stack using shp

I am using the following code to extract mean pixel values over an area represented by a polygon: mean<-lapply(S2_stack, FUN=function (S2_stack) {data.frame(mean=extract(S2_stack, polygons2, fun=...

1
2 3 4 5
33