Questions tagged [raster]

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

2,258 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
17 votes
0 answers
824 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, ...
user avatar
  • 12.5k
13 votes
0 answers
550 views

Remove reference to raster layer object PyQGIS

I am developing a plugin to load a set of raster files on QGIS. When there is a large number of files to be loaded, the main UI freezes. So I use QgsTask to move the creation of raster layers to a ...
user avatar
  • 136
8 votes
0 answers
116 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 ...
user avatar
7 votes
1 answer
2k views

Setting CRS of raster to EPSG 3035 using R

I am trying to set the CRS of a raster file with the following code: library(raster) r<-raster(xmn=0,xmx=10,ymn=0,ymx=10) crs(r)<-CRS("+init=epsg:3035") The warning message is: ...
user avatar
7 votes
0 answers
268 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 ...
user avatar
  • 239
7 votes
0 answers
537 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 ...
user avatar
7 votes
0 answers
874 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 ...
user avatar
  • 89
7 votes
1 answer
2k 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 ...
user avatar
  • 325
7 votes
0 answers
670 views

Using QGIS' "network protocol" to import data from OPeNDAP?

After looking at the OPeNDAP documentation I assumed I could import data into QGIS by downloading the .ascii file OPeNDAP generates. However the downloaded OPeNDAP .ascii doesn't seem to be compatible ...
user avatar
6 votes
0 answers
52 views

Adding raster value with specific equation using ArcMap

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 ...
user avatar
  • 73
6 votes
0 answers
691 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 ...
user avatar
6 votes
1 answer
503 views

Added raster layers with PyQGIS 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:/[...
user avatar
6 votes
0 answers
88 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 ...
user avatar
  • 12.4k
6 votes
0 answers
86 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 made a Buffer with variegating radius. The Buffer also have data about the demand for Parking spots for each ...
user avatar
  • 61
6 votes
1 answer
194 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,...
user avatar
  • 1,454
6 votes
0 answers
1k 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 ...
user avatar
  • 61
6 votes
0 answers
1k 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 ...
user avatar
  • 165
6 votes
0 answers
594 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 ...
user avatar
  • 61
6 votes
0 answers
293 views

Building raster (population density) dependend diagram in QGIS

I'm using QGIS and trying to solve the following problem. I got 2 layers: population density raster point layer with the information about number of people could be hosted/served etc in this points. ...
user avatar
6 votes
0 answers
1k 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 ...
user avatar
  • 1,105
5 votes
1 answer
412 views

Slow retrieve PostGIS raster value through ST_Value

I have a PostGIS DB containing a set of daily raster data from 1981 up to 2021. The inserted raster tile size is 83x90. Problem: I wanna query the data through ST_Value for a specified Lat Lon, ...
user avatar
  • 93
5 votes
1 answer
250 views

Optimizing pixel extraction from GeoTiff using Python

I am creating IDF Curves for work using python and 30-minute rainfall rate rasters. There are 24 rasters per day and about two decades worth of data. I basically input lat/lon coordinates and my ...
user avatar
  • 448
5 votes
0 answers
70 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 ...
user avatar
5 votes
0 answers
136 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 ...
user avatar
  • 1,776
5 votes
1 answer
217 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). ...
user avatar
5 votes
0 answers
1k 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 ...
user avatar
5 votes
1 answer
826 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 ...
user avatar
5 votes
0 answers
260 views

Finding Raster Pixel Neighbors using GDAL?

I'm new to GDAL Python, and I'm working on a little recursive algorithm which requires finding the neighbors of a a pixel on a DEM raster. I've been able to do this by creating a little PixelLite ...
user avatar
  • 53
5 votes
0 answers
538 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 ...
user avatar
5 votes
0 answers
957 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 ...
user avatar
  • 213
5 votes
0 answers
202 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. The ...
user avatar
5 votes
0 answers
321 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 ...
user avatar
5 votes
0 answers
534 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 ...
user avatar
  • 51
5 votes
0 answers
355 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 ...
user avatar
5 votes
0 answers
678 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 ...
user avatar
5 votes
0 answers
115 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 ...
user avatar
  • 526
5 votes
0 answers
178 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)*...
user avatar
  • 149
5 votes
1 answer
203 views

ArcGIS Online Image Offset

I have three geo-referenced images of a museum layout that I have been able to offset by "x" number of meters in ArcScene and ArcGIS Pro. I want to publish the three images online and have ...
user avatar
  • 419
5 votes
0 answers
438 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 ...
user avatar
  • 1,425
4 votes
0 answers
1k views

Cloud-Optimized GeoTIFF overlay on Leaflet?

I want to load external Cloud-Optimized GeoTIFF files onto a Leaflet map as overlays, and manipulate the colors based on user input. I've found examples online that appear to to this exact thing, but ...
user avatar
  • 585
4 votes
0 answers
373 views

Plot polygon on rasterio window

I'm trying to plot several polygons on a raster. Several posts suggest to use matplotlib and descartes like this one: Plot shapefile on top of raster using plot and imshow from matplotlib My polygons ...
user avatar
  • 359
4 votes
1 answer
362 views

Dealing with no-data values in raster calculator of QGIS

I am trying to patch two rasters with raster calculator but I am not finding the way to work with no-data values. Lager@1 has some information I need as first option, this has as no-data -9999 (...
user avatar
  • 3,089
4 votes
1 answer
275 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=...
user avatar
  • 1,058
4 votes
1 answer
203 views

Loading raster to R from PostgreSQL via pgGetRast takes a lot of time

I wrote R code in R Studio to load a raster (stored in PostgreSQL) to R. The database is stored here: C:\Program Files\PostgreSQL\ The following versions are installed on the computer: R version 3.4....
user avatar
  • 85
4 votes
0 answers
1k views

How to store large time series of raster images

I've got a large time-series of rasters, derived from satellite images. Each raster is about 2000 x 2000 pixels, and I've got about 10,000 individual images. I'm trying to work out what the best way ...
user avatar
  • 3,866
4 votes
0 answers
585 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 ...
user avatar
4 votes
0 answers
284 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 ...
user avatar
4 votes
0 answers
143 views

LasDatasetToRaster does nothing to the Raster Layer

I have been trying to figure out how to clip and rasterize a LiDAR map file programmatically (Not through arcpy) I use C# but read many languages. So far I have been able to access and assign the LASD ...
user avatar
4 votes
1 answer
1k views

How to "mosaic" rasters and keep attributes

I have numerous individual 10m Raster files (with both quantitative and qualitative data) for each state and need to combine them into a national dataset. However, when using a mosaic it seems that ...
user avatar
4 votes
0 answers
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. ...
user avatar
  • 249

1
2 3 4 5
46