Skip to main content

Questions tagged [layer-name]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
50 views

Datetime from attributetable to layername in QGIS with Python

I have several (point) layers and I want for all of them this > Take the first value of the "datetime" column and append it on the layername. These point layers come from gpx track ...
Immo Woschny's user avatar
1 vote
0 answers
53 views

How to reference tables in a GeoPackage after changing layer name in QGIS?

While developing a Geodatabase with a lot of tables, reports etc. I decided to rename some layers in QGIS to help my client use the database. Now all my expressions like get_feature() won't work ...
Stefan's user avatar
  • 74
6 votes
1 answer
216 views

PyQt signal when layer name is changed in PyQGIS

Use this when layers are added, deleted, or their order is changed. Can you get a signal when a layer name is changed? QgsProject.instance().legendLayersAdded.connect(self.polygonList) QgsProject....
Jihyun Kim's user avatar
0 votes
1 answer
221 views

Name output feature classes with feature names with ArcPy

I would like to have my output feature classes take on the name of the input features list that I am looping through. Example output FEMA_Clip_09302022 The code below is currently creating output ...
ben's user avatar
  • 1
6 votes
0 answers
296 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 ...
Andre Silva's user avatar
  • 10.3k
1 vote
1 answer
72 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. ...
miraculix's user avatar
  • 169
2 votes
1 answer
136 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 ...
Daniel_P_GEO's user avatar
1 vote
0 answers
696 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" ...
Basmo's user avatar
  • 21
1 vote
1 answer
2k 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 ...
jaysigg's user avatar
  • 507
4 votes
1 answer
633 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 ...
IKindaNeedAHand's user avatar
4 votes
1 answer
170 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 ...
Enzo Baldini's user avatar
  • 2,347
1 vote
1 answer
466 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 ...
Labguyvancouver's user avatar
1 vote
2 answers
764 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 ...
user179040's user avatar
0 votes
1 answer
300 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)....
Javad Koohpayma's user avatar
0 votes
0 answers
35 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 ...
Peter O'Donnell's user avatar
0 votes
3 answers
233 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 = ...
Bera's user avatar
  • 74.8k
2 votes
0 answers
329 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%]....
Juan Salvador's user avatar
1 vote
0 answers
85 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 ...
Mickael Clement's user avatar
1 vote
2 answers
629 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 ...
Shaun's user avatar
  • 59
3 votes
1 answer
694 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 ...
Goran's user avatar
  • 75
4 votes
1 answer
280 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 ...
ReutKeller's user avatar
  • 2,169
3 votes
1 answer
695 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 ...
ReutKeller's user avatar
  • 2,169
4 votes
2 answers
659 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?
Newton Monteiro's user avatar
2 votes
1 answer
2k 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 ...
foo's user avatar
  • 186
4 votes
1 answer
167 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 ...
Jochen Schwarze's user avatar
8 votes
2 answers
8k views

Getting layer by name using PyQGIS 3 [duplicate]

How do I get the layer by name using PyQGIS 3?
Alex Verb's user avatar
  • 135
4 votes
1 answer
345 views

"Out of Index" error when getting layers by name using PyQGIS

I have created a QGIS plugin and I am using the following code to get my layers by name from the layer panel on QGIS. Here is the simplified code: layer1 = QgsMapLayerRegistry.instance()....
Mar's user avatar
  • 1,119
6 votes
1 answer
3k 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 ...
SS_Rebelious's user avatar
  • 5,621
32 votes
1 answer
45k 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 ...
User123's user avatar
  • 2,986
16 votes
2 answers
21k 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 ...
jgpallero's user avatar
  • 749