Skip to main content

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.

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 ...
Tom W's user avatar
  • 429
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.
Mariam Malak's user avatar
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 ...
youzer's user avatar
  • 574
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 ...
Clement's user avatar
  • 765
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 ...
Ril8772's user avatar
  • 375
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 ...
user29199's user avatar
  • 191
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 ...
Sytze's user avatar
  • 771
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?
VietThanh Le's user avatar
  • 1,470
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 ...
Joseph's user avatar
  • 76k
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
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 ...
grego's user avatar
  • 1,063
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.
ustroetz's user avatar
  • 8,024
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|...
matteo's user avatar
  • 3,304
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 ...
Jhonatan Oliveira's user avatar
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 ...
nicksan's user avatar
  • 1,716

15 30 50 per page