Skip to main content
17 votes

Using CASE statements to sort multiple values in QGIS Field Calculator

Use like this: CASE WHEN "stat_land_" IN ('A1', 'A2', 'A9', 'E', 'E2') THEN 'Residential' WHEN "stat_land_" IN ('C', 'C1') THEN 'Vacant Land' ...
Kadir Şahbaz's user avatar
7 votes
Accepted

Extract one class from global LULC in google earth engine

There is a lot of ways to do this. If you want to preserve class ID, you need to mask the desired class. For example: var crop_mask = cover.eq(13); // create a mask for crops var crop = cover.mask(...
aldo_tapia's user avatar
  • 13.8k
6 votes
Accepted

Is Landsat 30m resolution satellite images accurate enough to map land cover on a 40 km² watershed?

The size of the area is not the primary issue for the selection of a satellite sensor resolution. You should rather think about the size of the objects that you are mapping and their contrast with the ...
radouxju's user avatar
  • 49.9k
6 votes
Accepted

Calculating block statistics from land cover raster using R?

You can use the aggregate function in the raster package to do this. For example, to produce a raster at half the resolution of the original, showing the proportion of cells covered with land class 1: ...
dbaston's user avatar
  • 13.2k
5 votes
Accepted

Appropriate CRS for land-use change within EU?

ETRS 89 refers to a Geographic Coordinate System, while UTM 32 is a Projected Coordinate System. I would discard both because UTM only cover approximately 6 degrees of longitude before you start to ...
radouxju's user avatar
  • 49.9k
4 votes
Accepted

Replacing values of raster in R to produce landuse-like raster map?

You must invert your order: Z <- runif(100, 0, 2) Z[Z>0.12]<-3 Z[Z==0.12]<-2 Z[Z<0.12]<-1 Your problem was due to in the first sentence (Z[Z<0.12]<-1) you made values ...
MarujoRe's user avatar
  • 376
4 votes

Sentinel-2 images

It is always preferable to use bottom of atmosphere reflectance (BOA) products (e.g. L2A) instead of top of atmosphere (TOA) reflectance products (e.g. L1C). For example, the image below shows a L1C ...
Aaron's user avatar
  • 51.8k
4 votes

"Image.select: Pattern 'blue' did not match any bands" error during LULC change detection using Earth Engine

The problem is that there are no images available from 1900 - 1990; thus, the classifier outputs an error when it tries to classify an empty image. An easy fix would be to simply change the startyear ...
Jonathan V. Solórzano's user avatar
4 votes

Looking for QGIS equivalent of ArcGIS "Group values" tool

We can use Reclassify by table. In this example values 1,2,4 are set to 1; value 3 is set to 2, and all other values are set to null.
Cushen's user avatar
  • 3,197
3 votes

Calculating block statistics from land cover raster using R?

I agree that raster::aggregate() works well in most cases, especially when a user-defined function is involved as in the answer given by @dbaston. However, you might want to have a look at the velox ...
fdetsch's user avatar
  • 5,213
3 votes
Accepted

Getting Land Use data from National Land Cover dataset

It looks like the @data@attributes element is metadata about the data set as a whole, not the particular extract. I tried get_nlcd with a smaller polygon region and the table in @data@attributes was ...
Spacedman's user avatar
  • 66.5k
3 votes

Creating a series of buffers along a stream polygon at set intervals in ArcGIS Pro

Forget about rectangles, they are only possible if river is straight line. Just split your lines at equal interval (Generate Points Along line and Split by points) and run Euclidean allocation: ...
FelixIP's user avatar
  • 23.3k
3 votes
Accepted

Looking for QGIS equivalent of ArcGIS "Group values" tool

Open the layer symbology Select the classes you wish to group Right click to change label for all of the classes at once Do the same for the colour The classes will appear merged in the legend
user2856's user avatar
  • 69.6k
3 votes
Accepted

Calculating percentage of landuse type within buffer using Python

You can use geopandas with union and groupby: import geopandas as gpd landuse = gpd.read_file(r"/home/bera/Desktop/gistest/my_riks_smallsample.shp") landuse_class_field = "kkod" ...
Bera's user avatar
  • 77.8k
2 votes
Accepted

Where on-line can I find a GIS land use .lyr that shows standard colors for each land use code?

I did not see any standards for land use classification in general because it depends on each country's standard. You need to refer to the standards applied in Ministry of land or Land Bureau in the ...
ahmadhanb's user avatar
  • 41.4k
2 votes
Accepted

Molusce crashes QGIS when starting the changes raster calculation

The solution is the reclassification of values! After searching the answer also on YouTube I got responded by a user which wrote me: An additional tip: a friend had labeled categories in their ...
mazinga's user avatar
  • 533
2 votes

How do I classify a highly heterogeneous built-up area?

There are two facets for this issues: one is conceptual and the other is technical. The conceptual issue is that you need to define what you mean by built up area in your legend. A good starting ...
radouxju's user avatar
  • 49.9k
2 votes
Accepted

How do I classify a highly heterogeneous built-up area?

That would likely be your best bet, outside of object-based classification. However, another option would be to use a more advanced algorithm for classification, such as the Support Vector Machine, ...
nboyko's user avatar
  • 551
2 votes

QGIS, Buffer, and Land Use around coordinate points

This is a common procedure for landscape ecology. The LecoS plugin allows you to calculate the amount (among other metrics) of each land use class (the different values of your land use raster) ...
kdarras's user avatar
  • 123
2 votes
Accepted

Calculate land use percentage within an area?

You can divide the area of the land use features by the area of the basin, then multiply by 100 to derive percent. If the area of your land use features or the basin are not already in the attribute ...
reevesii's user avatar
  • 1,529
2 votes

Random Forest Classification of Landsat8 Image gives invalid/noise output

You stated: I used randomly generated points and collected pixels from Maximum Likelihood Classification from ArcGIS 10.3 which was used as training dataset. I suspect creating training data ...
Aaron's user avatar
  • 51.8k
2 votes

Crop data for Europe / Germany

You should almost certainly start your research by looking at the INSPIRE geoportal ~ http://inspire-geoportal.ec.europa.eu/discovery/ Any public body in German that has any data that falls under the ...
nmtoken's user avatar
  • 13.6k
2 votes

interpreting Normalized Differentiated Bareness Index and Normalized Differentiated Impervious Surfaces Index?

The word normalized means fitting all your observations between -1 and 1, hence all normalized indexes will have this range. As for literature: Use of Normalized Difference Bareness Index in Quickly ...
Roberto Ribeiro's user avatar
2 votes

Merge adjacent polygons into a land use map

Assuming you already have an attribute field containing the area of your polygons in your data, this could be the workflow: Choose the "Select features by value" function in the toolbar, in the popup ...
tallistroan's user avatar
  • 2,351
2 votes
Accepted

How to get R to recognize a discrete raster layer

You can use levelplot from the rasterVis package to plot with categorical labels: > r = raster(matrix(sample(1:3,25,TRUE),5,5)) > levels(r)=data.frame(ID=1:3, code=LETTERS[1:3]) > rasterVis::...
Spacedman's user avatar
  • 66.5k
2 votes
Accepted

2 raster files, find suitable area

you can reclassify both rasters and sum them. Example: Reclassify Urban to 1 and others to 0. Same for the 2nd layer. High flood 1, others 0. So if you sum rasters the area under 2 value will be ...
GeoF's user avatar
  • 391
2 votes

Calculate land cover for grid cells in QGIS

You can use Raster layer zonal statistics in which you can select the land cover raster layer as input file, and use the shapefile as zone layer. It will calculate the area (in the raster unit) of ...
ahmadhanb's user avatar
  • 41.4k
2 votes

Why using buffers in land use / land cover classification task?

Specifically about the tutorial provided as example: The positive buffer along Slovenia borders is being applied possibly to avoid empty pixels in the edge of corresponding patches (i.e, pixels only ...
Andre Silva's user avatar
  • 10.3k
2 votes

Using R to sum raster pixels of specific values

It is just a matter of writing a function that returns the proportions and using lapply to apply it to the list returned from exact_extract. Add libraries and create example data library(sf) library(...
Jeffrey Evans's user avatar
2 votes
Accepted

Importing landuse (raster) to polygon using ArcGIS Pro

You can polygonize the raster, clip it by boundary, and then get the land area of each land use per boundary. Tabulate Area in ArcGIS is the closest tool I can think of.
BallpenMan's user avatar
  • 1,217

Only top scored, non community-wiki answers of a minimum length are eligible