# Questions tagged [spatial-statistics]

The field of study concerning statistical methods that use space and spatial relationships (such as distance, area, volume, length, height, orientation, centrality and/or other spatial characteristics of data) directly in their mathematical computations.

670 questions
Filter by
Sorted by
Tagged with
55 views

### Computing spatial (zonal) statistics of gridded data (NetCDF file) for polygons in a shapefile (EU NUTS2 regions)

I have the shapefile of NUTS2 region, with crs:EPSG:4326 I also have a NetCDF file which is a 950*1000 cell. I want to compute mean per polygon based on the data in the NetCDF file with Python. I'm ...
• 1
25 views

### Calculating group area percentages in ArcGIS Pro using Summarize Within

I have a grid (vector file) in ArcGIS Pro, and I want to calculate the percentages of the area of different anthrome types in another vector file (Anthromes 12K DGG Dataverse) for each grid cell. I ...
24 views

### Classification in ENVI

I classified multiple images using ENVI modeler and I would like class statistics for each image. Is there a task available in ENVI modeler that can do this? I know I can right click each image and ...
1 vote
22 views

### Calculate correlation statistics between observed stream and GIS delineated stream

In delineating watersheds, I use publicly available terrain data. I usually opt for ALOS 30m, but sometimes have to compare with SRTM 1 and 3-arc-second resolutions to see which is more accurate at ...
1 vote
77 views

### Extracting min and max value from points shapefile

I have a DEM/grid with elevation values that's patchy and I have linear features crossing these areas. What I wanted to do is to measure the min and max elevation points falling along the line. My ...
• 21
25 views

### Rasterization (Vector to Raster) in QGIS overwrites Maxima values of the vector

I am working on macroseismic intensity maps in QGIS 3.30. My data are in the form of a point vector. In this case, each point has an attribute corresponding to the maximum intensity which was ...
70 views

### Calculation using exp() function in raster calculator of QGIS fails

I have been trying to use this expression in the QGIS raster calculator: 1 / (1 + exp(-(β0 + β1 * RasterX1 + β2 * RasterX2 + ... + βn * RasterXn))) The above expression has been replaced with the ...
1 vote
52 views

### QGIS - layout/ print composer and linking displayed maps

I wonder if it's possible to display a map in the layout/print composer when another is shown ? I have this layer where I've made some statistics with diagrams. It shows the percent of people that are ...
77 views

### Regarding Geographically Weighted Regression (GWR) for non-linear problems

I am new to this topic. I am referring to this Geographically Weighted Regression tutorial. From my understanding, GWR does a weighted regression to model the dependencies between exploratory and ...
1 vote
53 views

### How can I intersect two shapefiles without creating split features that have duplicated attributes in QGIS?

I am intersecting two shapefiles in QGIS: a city council map and the census blocks in the city's county with demographic variables (e.g., population). When I use the intersect tool in QGIS, the blocks ...
96 views

### Error viewing the result of ee.Algorithms.CrossCorrelation

I am facing an issue when using ee.Algorithms.CrossCorrelation in Google Earth Engine. I am using an LST image and an NDVI image as input. The final product seems to have a visualization error since ...
20 views

### Statistical variance of strata in carbon estimation areas

How do I determine statistical variance within project areas? I need a process to identify an area with similar raster data (ie soil moisture or soc) and elevation. What I want to do is determine the ...
95 views

### Getting null pixels during soil texture analysis

I am using 'OpenLandMap/SOL/SOL_TEXTURE-CLASS_USDA-TT_M/v02' band 'b0' when I run my analysis, why I am getting null pixels. Output Object (5 properties) 4: 67274 6: 963 7: 280852 9: 144241 null: ...
49 views

### Error in rep.int(sep, ncolumns - 1) : invalid 'times' value in bayesx function [R2BayesX package] in R

I am trying to run a STAR model within the R2BayesX package using the bayesx function. My model works with the cases of leptospirosis in Colombia ('observed' and 'expected') by department in a ...
139 views

### Spatial Autocorrelation in R

I have a point pattern with which I would like to test for spatial autocorrelation (Moran's I). All of the examples I have seen test for autocorrelation for some variable y, however, since I just have ...
90 views

### spdep::localmoran How to access classified cluster values?

I am trying to get a LISA cluster map similar to this one, eg showing the 'High-high', 'Low-Low'.. cllassified values. But, I can't figure out how to extract this classifications from the ...
• 3,376
35 views

### Can soil moisture values be calculated from only land surface temperature?

I'm working on a project that requires me to calculate soil moisture values at specific points under future climate scenarios. I have soil moisture values for the points from historical periods and ...
59 views

### Generate a height data table from 2 rasters at a given position - QGIS 3.32.0-Lima

I have two raster height maps and a (vector?) layer with points. The goal is to generate a statistic that looks something like this: Point 1: Layer 1: 100m Layer 2: 300m Point 2: Layer 1: 70m Layer 2: ...
255 views

### Computing grid cell statistics using LiDAR point cloud in QGIS

I have a LIDAR data .laz file of a DEM and a cell grid vector file. I want to compute grid cell statistics, like mean and variance using the LiDAR data. How can I do this in QGIS?
51 views

### Summary statistics for a set of polygons [closed]

I have a set of a few millions polygons on which I'd like to compute summary statistics. I do know that what is relevant will depend on my needs, but I wonder if there is some agreed upon summary ...
• 119
62 views

### QGIS: Calculating change in grid shapefile statics

I have two shapefiles which has two attribute information like below: fid DN 217536 2 217537 4 217538 6 217539 8 217540 10 217541 11 217852 3 217853 5 Both shapefiles have square grid of 250 ...
• 103
441 views

### Spatial autocorrelation between two variables using Python

I have two variables in the data for which I want to calculate the spatial autocorrelation. I want to check how they are spatially related with each other. I have already calculated the linear ...
• 31
87 views

### SatScan (and rsatscan) writing empty shapefile

This is a reinterpretation of a previous question I've asked, refining the problem statement after some more troubleshooting. I'm implementing SatScan (v9.6.1) in R using rsatscan (v1.0.3, downloaded ...
304 views

### Can we stack raster layers to an existing GeoPackage in R

Does the terra package supports the exportation of stack raster to GeoPackage? I'm trying export a stack raster to GeoPackage using the terra package but I'm only able to for one layer manually: ...
• 155
207 views

### Estimate PDSI value in GEE for a specific shapefile area

How can I estimate PDSI value in GEE for a specific shapefile area? I am having some problem in the code. var feature = ee.FeatureCollection(table); Map.addLayer(feature, {}, 'My Polygon'); var ...
1 vote
45 views

### How to get a mean value for several entries in the attribute table in QGIS

I have the following attribute table showing Drought Index values ("VHI_Index") and names of country districts ("NAME_3") in Ethiopia. There are multiple VHI values for every ...
• 11
1 vote
266 views

### Issue when running spatial weights matrix in R

I am trying to run my code in R for a spatial weights matrix, but the following error shows up. I think it's got something to do with my data, but I'm not sure how to resolve it. nb = st_contiguity(...
1 vote
33 views

### Estimating resolution interpolated from point samples

I have a series of data samples (actually satellite measurements), and I am interpolating the data to produce a raster. I can interpolate to any arbitrary resolution I like; but how can I estimate the ...
• 1,314
27 views

### Successfully mosaicking rasters in R, but the analysis is not showing values

I am mosaicking three rasters together. The raster are mosaicking together successfully and will plot but any analysis of the rasters returns NA. Here is the code: import <- raster("...
• 25
1 vote
34 views

### Identify largest class in area

I have a layer of polygons with different land uses, and another layer of polygons with administrative areas. I'm trying to find a way to determine which land use is dominant (in terms of area) in ...
• 6,904
147 views

### Standard deviation of interpolated data

I have a dataset with air-quality measurements in several points across one state, through several months. Thus, for each point I can calculate average, variance and so. My goal is to interpolate data ...
1 vote
23 views

### Number of categorical points in percentage within a polygon(s)

I have a point layer which has categorical values from 1-10, I would like to find the number of points both in count and percentage for each categorical value within a polygon (multipart polygons). ...
• 1,184
197 views

### Spatial Outliers Detection and Remove in R?

I have run my data in R, and created a distribution mapof my data (Clay Soil Property). I want to detect in a way the spatial outliers that i can see from the map, and remove them in order to execute ...
1 vote
371 views

### How Neighbor Contiguity Algorithm actually works

I want to identify neighbors based on queen or rook contiguities in a programming language that does not have the feature yet. I know that tools like spdep, pysal, geoda, and ArcGIS all implement this,...
• 179
730 views

### Calculating statistics of points within polygons of the same criterion in QGIS

In my QGIS 3.10 Project, I have one polygon layer and one point layer. Each of these layers has objects that belong to different categories based on some attributes: for simplicity, let's say RED and ...
• 53
1 vote
88 views

### Area of zonal statistics more than area of polygon

I have a polygon and a raster (0.5m resolution). The area of polygon is 6249 sq.m (This is obtained from QGIS Identify features option - Ellipsoidal area, Cartesian area is 0.0 sq.deg, please check ...
• 191
1 vote
296 views

### Calculate the number of pixels from a raster layer, fall within pixels of another raster layer?

I am pretty new to QGIS. I have a .tif file (Land-Ocean mask) with a high spatial resolution (150m) on a global scale. I would like to first resize it to 0.25-degree spatial resolution, and then ...
• 75
84 views

### Why does QGIS raster calculations interfere with grid cells?

I am working with some simple raster data on population counts in Nigeria in QGIS. I have two rasters, one for each gender, structured in 100x100m grid cells across the entirety of Nigeria. Each cell ...
• 31
289 views

### Interpolation with 10 data points

I have 9 data points showing groundwater level. The points are located in an approximately rectangular grid. The distance between the points is around 200-250 meters. Below you find a map of the ...
• 155
409 views

### Getting different Moran indexes?

I'm struggling to evaluate the spatial autocorrelation of several databases. These databases consist of coordinates and different environmental information associated with those coordinates. Strangely,...
• 115
1 vote
203 views

### Percentage of point features within polygon boundaries R

I am trying to create a histogram with the percentage of a concentration of points in a specific area. My data is someting like this: setwd("C:\\Users\\HP\\Desktop\\myrtos") getwd() library(...
• 39
100 views

### Correlation Chart Series Error in Google Earth Engine?

I'm going to get correlation series between LAI and FAPAR using NOAA AVHRR data by the below code in Google Earth Engine but returns error. Does anyone has idea? Error message: Error generating chart: ...
1 vote
78 views

### Approximate value of properties based on sold properties in the area

I have a polygon layer in QGIS containing the parcel data for a city and surroundings, and a point layer with information about properties that have been sold recently. Since there are far fewer ...
• 251
1 vote
653 views

### Treat NA as 0 in custom function for lapp in {terra} R library

I am trying to use the lapp function from the terra rstats library to do some raster-math. But when cells have NA in them, it is giving me the 'wrong' result. Here is my current function and result. a ...
1 vote
270 views

### Moran's I in panel data using contiguity matrix

I have some data in a panel format and want to run some spatial panel regression. In a cross-sectional framework, I would run a simple regression and test the spatial autocorrelation from the ...
• 203
718 views

### Calculating max and min pixel values for numerous overlaying rasters in QGIS

I have over 1000 interpolated raster layers. I'm trying to use QGIS 3.16 to create a confidence interval map by finding the difference between the highest and lowest values at each pixel and creating ...
• 149
1 vote
311 views

### GeoPandas Spatial Join with random samples

I have a geopandas DataFrame with Polygon geometry and another one with POINT geometry. I'd like to do a spatial join between them and randomly select a set of points that are within certain distance ...
• 483
482 views

### Rasterise a point pattern in R

I have a set of georeferenced points within an area for which I want to know the spatial distribution (sparse/clustered) according to a regular grid. I thought to describe the pattern using the Clark-...
• 305
361 views

### Google Earth Engine: Calculating image statistics for multiple study regions simultaneously

I am trying to calculate burned area for the districts of Punjab state. I have used following code var admin2 = ee.FeatureCollection("FAO/GAUL_SIMPLIFIED_500m/2015/level2"); var state = ...
• 131