Questions tagged [layer-name]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5 votes
0 answers
199 views

Making layer names in legend permanent using PyQGIS

While constructing a legend in Print Layout, I modify the names of the layers just in the legend, but not in the Layers panel (works as expected). Reproducible code is at bottom. However, after I ...
user avatar
  • 9,901
1 vote
1 answer
39 views

Set name for layer is not applied when it is loaded into QGIS window with modeler

I have added a script via the modeler. When executing the same code in the script, the layers are no longer added with the specified names in QGIS but with the name of tool that was automated. ...
user avatar
  • 159
0 votes
0 answers
19 views

Change namedlayer and remove classe

How do I change the name of the layer, for example reseau_routier to Réseau routier and remove the class that was created, or vice versa, if this is not possible? I would like to be able to modify ...
user avatar
2 votes
1 answer
61 views

Getting all layer names from opened .qgz project file using PyQGIS

I have several .qgz project in different directories. I would like to get all the (displayed) layer names from each project. I tried several forms of code to get it from documentation, but it only ...
user avatar
1 vote
0 answers
95 views

Finding current layer name in QGIS field calculator

How do I find the current layer name in the QGIS field calculator ? My goal is to mass process multiple layers and retrieve codes written in their names. I've find the "base_name_file" ...
user avatar
  • 21
1 vote
1 answer
250 views

Batch proceeding with using expressions : naming the output derived by the input layername with changing one specific substring (QGIS 3.16 / Win10)

I'd like to run different batch processes and want to name the output derived by the input layername with only changing one specific substring when doing batch processes. I will conduct different ...
user avatar
  • 447
4 votes
1 answer
197 views

Retrieving layer name through part of its name with PyQGIS

I'm trying to edit various layers through a plugin. Since I (and others) will be using it for multiple projects with similar structures, I need to be able to retrieve the layer's name considering it ...
user avatar
4 votes
1 answer
78 views

How do I trim the first 5 characters of several layernames at once?

Due to a clip-batchprocess and the tool "package layers" I end up with a geopackage with several layernames that start with "clip_". I would like to trim all the layernames by the ...
user avatar
  • 1,943
1 vote
1 answer
178 views

Band Names in Google Earth Engine - Modis LST data

I am working with some modis LST data, and am running into the following problem: I am running two functions on the data, which I will need to combine later. For that reason, the band names need to be ...
user avatar
1 vote
2 answers
224 views

QGIS function layer_name in fieldcalculator batch-mode

Working with QGIS 3.10, I want to use the @layer_name function in batch mode for all layers in a project. In individual cases, I do this via the field calculator. I also found the script for the field ...
user avatar
0 votes
1 answer
109 views

Display layer with its date in GEE

I want to display the image with its date as the layer name, but the following code does not work. var s2 = ee.ImageCollection('COPERNICUS/S2_SR').filterBounds(roi).filterDate(startdate, enddate)....
user avatar
0 votes
0 answers
27 views

Naming and Extracting shapefiles using value from attribute table using ArcGIS Pro ModelBuilder

I am working with ModelBuilder in ArcGIS Pro to create a process that will select a distinct shapefile from a feature class and create a new layer. This new layer will then be used to clip and extract ...
user avatar
0 votes
3 answers
70 views

Changing name layer from geoprocessing output

How can I change the name for geoprocessing output map layers, for example: out_diss = 'ogr:dbname=\'C:/GIS/data/testdata/output.gpkg\' table=\"ak_riks_dissolved\" (geom)' dissolved = ...
user avatar
  • 52.5k
2 votes
0 answers
208 views

Printing layer name using label element in Print Composer in QGIS 3.12?

I'm trying to print the layer name using a label in print composer in QGIS 3.12. It's not responding to layer_property(@layer_id, 'name'), or [%layer_property( @layer_id, 'name')%] or [%@layer_name%]....
user avatar
1 vote
0 answers
43 views

Loop on table to create Dynamic Layers

I am receiving a table with customer names, group of customers and some data. I need to create dynamically Layers of these groups, then add these customer to these respective groups, then display a ...
user avatar
1 vote
2 answers
97 views

Adding polygon name as field to all points inside polygon in QGIS

I have a single polygon layer with multiple blocks features named "block 1" to "block 40". Within these polygons there is a single layer with multiple points. I want these points ...
user avatar
  • 49
3 votes
1 answer
421 views

Using Rule-based/Geometry generator style in QGIS

I have layer for comments in qgis, symbology style is rule based with Geometry generator. Problem is with displaying name in layers tab because the line before text is too long How do I solve the ...
user avatar
  • 65
4 votes
1 answer
84 views

Create Paired images by "Near" date

I have code the retrieve images from sentinel 1 and sentinel 2, calcultes NDVI for sentinel 2 and then pair manually two images that I choose according to their dates. My qiestion is if there is any ...
user avatar
  • 1,817
3 votes
1 answer
299 views

Give names to images based on the date

I have a code that calculates NDVI , add the layer and export it. I have another piece of code that I thought that will change the name of each image I have to the date, but for some reason it doesn ...
user avatar
  • 1,817
4 votes
2 answers
421 views

Obtaining date data from layer name in QGIS

I have a column with name of the satellites image background (Landsat, Sentinel), in this name I have a date information into the text. How do I extract the date data from this text?
user avatar
2 votes
1 answer
1k views

Layer names changed after reclassification of rasterstack, R

Following one of my previous questions about looping through a rasterstack (here), I now face a different issue. My initial rasterstack had dates as names (e.g. X2000_05_08.1) and I reclassified it in ...
user avatar
  • 186
4 votes
1 answer
117 views

Store human readable layer name in QGIS style files?

QGIS 2 and 3 as well seem not to store the Layer name (set via Layer Properties | Source | Settings | Layer name or via 'Rename' in the layers context menu) in styles files. I.e. if i have a PostGIS ...
user avatar
3 votes
1 answer
2k views

Getting list of layers names using PyQGIS

To get the list of TOC layer names I used the approach suggested here: for layer in QgsMapLayerRegistry.instance().mapLayers().values(): print layer.name() But this method is not reliable due to ...
user avatar
  • 5,541
29 votes
1 answer
34k views

Getting layer by name in PyQGIS

I have a plugin which finds buffer for list of cities, provided the distance. The state and city names are taken from the attribute table and gets filtered accordingly. What I want is my plugin should ...
user avatar
  • 2,876
16 votes
2 answers
15k views

Getting list of layer names using PyQGIS [duplicate]

I need a list containing the names of all the layers in a QGIS session. I did the task as layersNames = [] for i in self.iface.mapCanvas().layers(): layersNames.append(str(i.name())) but this has ...
user avatar
  • 719