Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

0
votes
0answers
8 views

Unwanted artefacts working with Raster analysis

I am trying to make a simple slope map from a DEM (tif). I already tried with the different slope-tools in QGIS (GDAL, SAGA, GRASS) and also the 3D Analyst in ArcMap. Boths bring the same result: a ...
1
vote
1answer
20 views

How to convert Raster image to Shapefile WITHOUT flipping it upside down

I am using QGIS v 3.2.1 to convert Raster image to Shapefile Unfortunately the resulting shapefile is upside down. How to keep resulting shapefile right side up Here is animated gif (link on GitHub)...
1
vote
0answers
21 views

Can't get gdal_calc.py to work

I am new to python and QGIS (have some experience with arcpy). I am trying to multiply two .tif files together using gdal_calc.py but I can't get it to work. It just returns the error invalid syntax. ...
0
votes
0answers
18 views

How to get WYSIWYG of raster layer in print composer in QGIS? [duplicate]

I currently have a base raster layer from OSM Standard used in my project. In the regular editing platform for QGIS, the place identifiers for cities are easily readable. However, once I enter layout ...
0
votes
1answer
23 views

projectRaster() result does not have the same nrow and ncol, but has same resolution

I have a land use land cover (lulc) raster in WGS84 coordinate system shown below class : RasterLayer dimensions : 59575, 57541, 3428005075 (nrow, ncol, ncell) resolution : 0.000509, 0....
0
votes
0answers
21 views

Vector Tiles VS Raster Tiles for leaflet

I have downloaded many vector tiles in the mbtiles format from OpenMapTiles. The reason I did that is because I will be using them on a station that cannot have an internet connection at all. I would ...
2
votes
1answer
37 views

Efficiently read large tif raster to a numpy array with GDAL?

I have been using the Python GDAL API to read tif raster files as NumPy arrays. Previously, I simply read the raster into an array directly with GDAL: ds = gdal.Open('example.tif') fullarray = np....
0
votes
0answers
12 views

Clipping rasters with GDAL

I have this raster (land-and-water.tif): And this one (land-only.tif, black = no data): And I need this (black = no data): I'm trying to do it with GDAL. Here's what I tried so far: gdaltindex ...
1
vote
0answers
22 views

Reprojecting raster in QGIS gives nan

I'm trying to reproject raster layers in QGIS. At the moment they are in ESPG:4326 and I want to convert them to ESPG:54009. (Using Save As... and changing the CRS). However, this produces a layer of ...
0
votes
0answers
34 views

writeRaster() not writing datum information

I am trying to reproject a raster to the USGS version of the Albers Equal Area Conic projection. Following this post, which talks about projecting vectors by adding the +datum=NAD83 and writing it out,...
1
vote
0answers
20 views

Projection of raster to sinusoidal projection

I have my definitive raster shown below. This raster has the projection as mentioned here class : RasterLayer dimensions : 7276, 8330, 60609080 (nrow, ncol, ncell) resolution : 463.3127, ...
0
votes
0answers
14 views

Animation by overlapping several raster images using QGIS? [duplicate]

I´m looking for something to help me to make a movie (.avi) out of a series of raster files indicating different years. I´m using soil parameters, so the values are continuous and not discrete.
0
votes
0answers
10 views

Change raster values in relation to values of another raster in Python

I used 'gdal_rasterize' to create two rasters from shapes (raster 1 and raster 2) os.system('gdal_rasterize -burn 1 -at -a_srs EPSG:4326 -ts 25000 25000 ' + r'C:\shape.shp' + r' C:\raster.tif') ...
0
votes
0answers
27 views

How can I access my raster data from PostGIS

I made a PostGIS database where I stored some elevation raster data. Now I want to get the value of a point from the raster for given latitude and longitude. Therefore I printed out the SRID of my ...
-1
votes
0answers
17 views

Spatial correlation from multiple netcdfs

Below is my code for calculating correlation of geotiffs: library(raster) library(ggplot2) userpath <- "F:\\userpath" r <- raster() A <- stack(list.files(path = userpath, pattern = 'file1*...
1
vote
1answer
21 views

Resize rasters to add empty data around edges

I have a set of DEMs that have different extents due to different data being available at each of the sample points these DEMs were generated from. I need to use these to create a set of uniformly ...
1
vote
0answers
5 views

Setting COLORRANGE for rasters with variable minimum and maximum value in MapServer?

I have a series of rasters picturing the same phenomenon/product eg. the accumulated precipitation and I use the same mapfile for all. Naturally the minimum is always zero but maximum is variable from ...
0
votes
0answers
23 views

Flood TIFF layer does not show full max and min values [on hold]

I have set up a raster layer using a TIFF file for surface water flooding. The layer indicates the minimum and maximum flood range of 0.102624m – 0.47962m under the Layer Properties Histogram, but I ...
0
votes
1answer
28 views

Running a function on subset of a raster image instead of whole image in R

I have a wide swath raster image. I want to detect cloudy pixels based on criteria such that a pixel in raster layer only consider its 25*25 neighborhood not the entire image. My problem is here that ...
2
votes
0answers
48 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 ...
0
votes
1answer
21 views

Converting 13 band .tif images to RGB using QGIS?

I have sentinel 2 images. Each image has 13 bands (bands are not individual images). I wanted to convert them to only RGB images and store them in a file to use for another purpose. I have tried ...
0
votes
2answers
74 views

Correlation between raster pixels within each polygon

I have two raster layers with the same extent, CRS, and resolution, and a shapefile consisting of a number of polygons. I would like to calculate the Pearson correlation between the two rasters within ...
0
votes
0answers
15 views

Clip raster by mask layer gdalwarp error in QGIS

I've been trying to find why my gdalwarp isn't allowing me to clip a raster to the shape of a shapefile. GDAL command: gdalwarp -ot Byte -of GTiff -cutline /Users/johnmorris/Desktop/Geodata/...
1
vote
1answer
12 views

How to merge single band chunked raster tiles with ST_Union in PostGIS

I have written the code below to select specific polygons and determine which grid tiles they intersect via a lookup table. Then depending on the grid tiles I want to merge the associated raster tiles ...
0
votes
2answers
24 views

How to assign raster layer's colors to polygons in QGIS?

I have a georeferenced raster file showing parcels of a town with different colors (yellow for the category single-household residential, green for agricultural areas, etc.). I also have the shapes of ...
0
votes
0answers
12 views

Could not list layers for this store, an error occurred retrieving them: Failed to create reader from file:

I am trying to add an ImageMosaic Store in GeoServer from orthomosaic .png files (4096 by 4096 pixels, 2000 by 2000 metres) with associated .pgw and .prj files and I get the following error: ...
0
votes
1answer
25 views

Apply mann-kendall analysis on stacked raster in R as a function

I want to run a mann-kendall trend analysis with pre-whitening on a stacked raster and then save the resulting tau, sen-slope and p_value. I am currently doing this by looping through every pixel but ...
0
votes
0answers
21 views

Saving rasters in Arcpy loop

I'm trying to do Map Algebra on a bunch of rasters by iterating through a for loop and saving them in an empty geodatabase. However, they aren't saving properly. Only the last raster is created and it ...
-1
votes
0answers
37 views

Reclassifying raster with ArcPy? [closed]

I have a raster which originates from a large tiff file being clipped and resampled. The resulting raster resampled_raster retains the same projection and opens up just fine in arcmap. I would like ...
0
votes
0answers
13 views

How to get WYSIWYG of raster layer into layout mode in QGIS? [duplicate]

I currently have a base raster layer from OSM Standard used in my project. In the regular editing platform for QGIS, the place identifiers for cities are easily readable. However, once I enter layout ...
0
votes
1answer
40 views

Filling no data value in raster using ArcGIS Desktop?

I have a raster with no data values, I want to give them values according to values around them. If a no data pixel is surrounded by 8 pixels whose values are 1 then the no data pixel should adopt ...
1
vote
1answer
37 views

How to extract values from .tiff file using R?

Maybe a rather simple question, but I could not find an answer. I am trying to extract long, lat, value from a .tiff file of a map of Africa with long/lat and soil acidity as the values. Here is some ...
0
votes
0answers
15 views

crosstab() rasters in R

I am having a hard time understanding the contigency table produced by crosstab() between two different rasters. Say the command is crosstab(r1,r2) [r1] [r2] Count 0 0 3456 1 41 ...
0
votes
0answers
27 views

Separating overlapping polygons into a new shapefile

I am currently working on building a model so that my process is easier to follow so the solution would preferably be something I can add to modelbuilder. I have a shapefile of polygons that represent ...
0
votes
1answer
19 views

Extracting raster values and creating new raster in QGIS is not working as intended

I am trying to extract certain values from a raster image in order to create a new raster which should then only contain the specified values. I have a single band raster showing forest loss from 2000 ...
0
votes
0answers
24 views

Opening National Land Cover data?

How do I open the National Land Cover data in QGIS 3.0? Attached is an image of the files. It looks like it's an .rrd file.
0
votes
2answers
31 views

TypeError: 'int' object is not iterable in reclassifying raster using arcpy

I am trying to reclassify a raster, using arcpy in Python. My code is below from osgeo import gdal import arcpy from arcpy import env from arcpy.sa import * raster_file = 'M:/tgopalakrishna\Data\...
1
vote
1answer
66 views

Lost pixels during a raster merge with gdalbuildvrt

I'm trying to merge some rasters with gdalbuildvrt in a python script: rasters = glob.glob('/{0}/ndvi_masked/*.tif'.format(path)) gdal_cmd = 'gdalbuildvrt -q -vrtnodata "0" -overwrite {0}.vrt'....
4
votes
1answer
39 views

How can I estimate a Least Cost Path in Google Earth Engine?

I'm using Google Earth Engine to estimate walking time based on slope, using the Google tutorial and this example based on a DEM. My code actually runs, but I don't know what units the output raster ...
0
votes
2answers
30 views

Adjusting the extent of raster

I have a netcdf file which I converted using Make NetCDF Raster. Unfortunately, the x and y are not, I think, properly define. One way to solve this is by correcting the extent (I am not sure here) ...
1
vote
2answers
26 views

Creating precipitation raster map in GRASS GIS?

I am trying to create a potential erosion map of my basin for which I require a rainfall distribution map. I have 3 stations' rainfall data for the year 2007- 2015. How do I create a rainfall map in ...
3
votes
1answer
34 views

Raster representation in arcpy/numpy

I have a .tif raster file which contains integer values at 1, 2, 3, 4 and 5. Importing this file into ArcMap also shows a number of cells with Nodata value where the above classes are not present. I ...
4
votes
2answers
81 views

Generating random points inside raster boundary using R?

I have a projected raster shown in the image below (left). I want to generate random points inside the raster like the middle image. However, the result I am getting is the same as the image on the ...
1
vote
0answers
40 views

Creating rasters with exactly 1km x 1km resolution in QGIS?

I am using QGIS 2.18.11. I want to create grids with cell size that is exactly 1km by 1km using Raster>Conversion>Rasterize(Vector to Raster) and Raster>Grid(Interpolation). My area of interest is ...
1
vote
1answer
19 views

Copy raw rasters referenced by a Mosaic Dataset in ArcGIS Pro 2.2.1

Is there a tool in ArcGIS Pro 2.2.1 that allows me to select and copy the raw underlying rasters referenced by a Mosaic Dataset to a folder?
0
votes
0answers
30 views

Rasterio Raster merge - horrible result

I am merging .DEM files from CUGIR NY repository, and need to merge files into one larger image for the whole of NY city. I use python 3.6 + rasterio; It works perfectly for all but one file - "The ...
1
vote
1answer
25 views

Reprojecting raster between laea and lon/lat alignment issues

This is a follow-up post to a recent question on StackOverflow. I'm now facing a GIS problem rather than a coding one. I'm working with a DEM from this source, which has the following projection ...
0
votes
2answers
38 views

Clipping a raster with shapefile and export the raster with shapefile extent

I am clipping a raster file with a shapefile grid and I want to save each raster subset individually with the polygon spatial extent. To select the extent of each polygon, first I select the polygon ...
0
votes
0answers
11 views

mosaic rasters retaining original symbology

I am trying to produce an animation of surface runoff flow in ArcGIS 10.4 showing buildings change their colors when runoff of certain depth hits them (e.g., when flow depth<=10 cm, building remain ...
1
vote
0answers
19 views

Identifying source of reference mosaic dataset in ArcPy?

I want to check the source mosaic dataset for a reference mosaic dataset within Python. Using: arcpy.Describe(reference_mosaic).referenced I can confirm that the reference mosaic is indeed a ...