Questions tagged [layer-name]
The layer-name tag has no usage guidance.
28
questions
6
votes
1
answer
73
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....
0
votes
1
answer
105
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 ...
6
votes
0
answers
271
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 ...
1
vote
1
answer
60
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. ...
2
votes
1
answer
95
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 ...
1
vote
0
answers
479
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" ...
1
vote
1
answer
972
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 ...
4
votes
1
answer
472
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 ...
4
votes
1
answer
142
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 ...
1
vote
1
answer
413
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 ...
1
vote
2
answers
531
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 ...
0
votes
1
answer
259
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)....
0
votes
0
answers
33
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 ...
0
votes
3
answers
168
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 = ...
2
votes
0
answers
284
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%]....
1
vote
0
answers
73
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 ...
1
vote
2
answers
410
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 ...
3
votes
1
answer
623
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 ...
4
votes
1
answer
212
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 ...
3
votes
1
answer
568
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 ...
4
votes
2
answers
569
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?
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 ...
4
votes
1
answer
151
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 ...
8
votes
2
answers
7k
views
Getting layer by name using PyQGIS 3 [duplicate]
How do I get the layer by name using PyQGIS 3?
4
votes
1
answer
327
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()....
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 ...
32
votes
1
answer
41k
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 ...
16
votes
2
answers
19k
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 ...