Questions tagged [layers]
A layer is a collection of information. It contains specific elements of a gis in a specific presentation method (e.g raster or vector layer). Layers can be edited separately in order to create individual topics for a map.
2,298
questions
113
votes
5
answers
292k
views
Merging multiple vector layers to one layer using QGIS
I've imported several shapefiles which where exported from a Mapinfo .tab. Several .tab-files are imported resulting in 20+ layers.
Afterwards I want to export it to GeoJSON; but I'm reluctant to ...
66
votes
3
answers
95k
views
Layers with same coordinate system should align/overlap in ArcMap but do not?
I put 4 different layers into my ArcMap document, but only one of them will show up on the map! I should be seeing the other 3 layers as well. When I do a Zoom to layer, I can see one layer, but I ...
52
votes
5
answers
36k
views
Change style properties of several layers simultaneously?
I'm working on bulk data. I have a few hundred GeoTIFF images imported into a QGIS project, and I'd like to modify their layer properties - things like the no-data-value, transparency of certain pixel ...
40
votes
10
answers
53k
views
Georeferencing vector layer with control points using QGIS?
I have a non-georeferenced vector layer that I need to be georeferenced. With raster layers the task is easy and straightforward, but I have no idea what should I do with my vector layer. I have a few ...
39
votes
5
answers
28k
views
Iterating over map layers using PyQGIS
I'm having trouble figuring out how to iterate over map layers. I can access the currently highlighted layer in the table of contents via iface.activeLayer() but I want my code to operate on all ...
37
votes
6
answers
41k
views
Difference between map layer and spatial dataset (e.g. feature class, shapefile)?
What is the difference between a feature class and a feature layer?
To me they seem very similar in concept.
34
votes
0
answers
3k
views
Leaflet v1 plugin: layer control for ungrouped, grouped, and nested-grouped layers
I need a Leaflet plugin which extends L.Control.Layers. I have the following requirements:
works with Leaflet 1.x
handles ungrouped layers alongside grouped ones
handles nested layer groups
does not ...
33
votes
2
answers
25k
views
Filtering features in other layers of QGIS Atlas
I'm trying to use the QGIS Atlas tools to build student 'scattermaps', i.e. display the school and the students that attend that school, for 215 schools.
The schools layer is the coverage layer, and ...
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 ...
29
votes
3
answers
7k
views
Organization and tidiness of multiple copies of layers? [closed]
Back in the days when I was in the university I had a "Organization and tidiness" problem – I was unorganized and kept my layers in different folders without distinct names and hence had multiple ...
27
votes
5
answers
24k
views
Getting path of project or layer file in PyQGIS
I am generating new raster files from vector layers on a project. I would like to save them in the same directory as the project or layer files.
How do I find this path using PyQGIS?
27
votes
6
answers
51k
views
Changing data source for all layers in MXD?
I have an MXD. It connects to about 30 layers in one of our SDE databases. I want to change the SDE database they connect to.
Is there a way to do this without having to right-click every layer ...
26
votes
2
answers
36k
views
Setting layer transparency in QGIS 3
I just switched from QGIS 2.18 to version 3.0.3. In the earlier version, setting layer transparency was easily done with the "transparency" slider from the Layer properties->style tab. ...
25
votes
3
answers
22k
views
Making QGIS layer update from changed data source
I'm trying to get layers to update automatically when their data source changes. I'm using R to write a shapefile with an attribute, and colouring according to that attribute in QGIS.
I want to write ...
23
votes
4
answers
70k
views
Cutting/Clipping/Splitting polygon with another polygon from the same layer in QGIS
To not have overlapping polygons/features, I normally use one or more polygons to clip/shape other polygons. This is often much faster than tracing when adding polygons etc.
I cannot find this ...
22
votes
2
answers
41k
views
Adding shapefile or feature class as layer in ArcMap using ArcPy
I am trying to automate various tasks in ArcGIS Desktop (using ArcMap generally) with Python, and I keep needing a way to add a shapefile to the current map. (And then do stuff to it, but that's ...
22
votes
5
answers
28k
views
Using layer loadstart & loadend events in OpenLayers 3?
OpenLayers 2 has these layer events "loadstart & loadend."
What is equivalent to them in OpenLayers 3?
While a vector layer loads and is rendered, I need to show a loading icon.
21
votes
7
answers
18k
views
How to improve rendering performance of a very large shapefile?
I have a polygon shapefile that has a 100MB .dbf, and 500MB .shp file component. The reason it is so large, is that it is classified as a landbase for a whole district.
Everytime I view the file in ...
20
votes
3
answers
11k
views
Getting layer extent using PyQGIS
I'm trying to write a processing script using grass r.neighbors algorithm for rasters. When you use the GUI for this algorithm, you can leave the GRASS layer extent field blanc to use the minimal ...
19
votes
3
answers
8k
views
Duplicating layer in memory using PyQGIS
I have a layer in QGIS, and I want to duplicate it through a plugin so I can use the copy of it as I want, without modifying the original.
Of course layer2 = layer1 will not work, because everything ...
19
votes
3
answers
29k
views
How to perform a true GIS clip of polygons layer using a polygon layer in R?
I would like to do a true GIS Clip in R of soils polygons using a series of single boundary polygons, but I cannot find an R function to properly do it. It should work just like the clip function in ...
18
votes
2
answers
791
views
Showing the number of currently selected layers in QGIS
Although this should seem to be very straightforward, I cannot find out how to see the number of layers I have currently selected in QGIS. For example, in the example below I want to see somewhere in ...
17
votes
3
answers
8k
views
Using ArcPy to get layer symbology?
Since ArcGIS 10 comes with the ArcPy package, I'm wondering it is possible to use ArcPy functions to get Symbology (i.e color, width...) of a layer?
17
votes
1
answer
5k
views
Making layer or group private/hidden/invisible in Layers Panel of QGIS
I have a number of layers in the Layers Panel inside a group but I don't want them shown (there's quite a lot so it looks untidy). These layers are also joined to several others.
Is it possible to ...
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 ...
16
votes
3
answers
8k
views
Getting field names of layer using PyQGIS
How does one get a list of attributes/field names of a layer by means of PyQGIS 3?
If my layer has field names seen in the attribute table or properties. How can I use PyQGIS to give me a string list ...
16
votes
7
answers
35k
views
Getting extent of layer in QGIS
Is there a way to get the extent (bbox) of a vector layer in QGIS?
I see that I can update the extent, but I am looking for the actual coordinates of the extent.
16
votes
4
answers
10k
views
Adding layer to GeoPackage using PyQGIS
How to add layers (vector or raster to an existing GeoPackage)?
While loading an existing layer of a GeoPackage is quite trivial:
from qgis.utils import iface
path = '/home/matteo/geopackage.gpkg|...
16
votes
4
answers
2k
views
Compare similar lines and update layers
Here there are two layers with the representation of the streets and the idea is: We want to update the most recent layer (with the red line) with some of the data storaged in the other one (the light ...
15
votes
5
answers
27k
views
Removing feature layer using ArcPy script
I have an ArcPy based script where I'm trying to intersect two layers where one layer must have its centroid in the other layer.
Since I need to know that one layer (feature_layer below) includes the ...