# Tag Info

### 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' ...
• 77.1k
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(...
• 13.7k
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 ...
• 49.7k
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: ...
• 13.1k
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 ...
• 49.7k
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 ...
• 376

### 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 ...
• 51.7k

### "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 ...

### 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.
• 2,928

### 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 ...
• 5,193

### Simplifying land cover classification in QGIS?

In QGIS I tried a majority filter (Processing>toolbox>geoalgorithms>filters) and also a sieve analysis (Raster>analysis). I found the Sieve function much easier to interpret and therefore get the ...

### Land Use classification and canopy cover using LT8 imagery and ground truth points in QGIS

First of all you cannot create a spectral signature from a point. You will need polygons (training areas). Since it seems that you very exactly know your study area, you could add a column to your ...
• 14.6k
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 ...
• 64.4k
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
• 66.4k
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" ...
• 73.8k
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 ...
• 40.9k
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 ...
• 533

### 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 ...
• 49.7k
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, ...
• 541

### 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) ...
• 123
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 ...
• 1,519

### 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 ...
• 51.7k

### 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 ...
• 13.4k

### 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 ...
• 3,171

### 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 ...
• 2,351
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::...
• 64.4k
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 ...
• 391

### 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 ...
• 40.9k