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 toppics for a map.

Filter by
Sorted by
Tagged with
61
votes
3answers
76k 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 ...
38
votes
6answers
35k 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.
30
votes
4answers
19k views

Iterating over map layers in QGIS Python?

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 ...
29
votes
5answers
16k 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 ...
28
votes
8answers
30k 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 ...
28
votes
3answers
6k 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 ...
25
votes
7answers
45k 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 ...
25
votes
3answers
10k views

How to refer to another layer in the field calculator?

Is there a way to select an attribute from a polygon layer and insert the value into a virtual field of a point layer using "within" in the field calculator? CASE WHEN within($geometry, ...
20
votes
6answers
15k 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
2answers
32k views

Adding shapefile or feature class as layer in ArcGIS Desktop using Python/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 ...
18
votes
5answers
21k 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.
18
votes
0answers
1k 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 ...
16
votes
3answers
6k 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?
16
votes
4answers
752 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
2answers
17k 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 ...
13
votes
4answers
9k 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?
13
votes
5answers
18k 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 ...
13
votes
5answers
17k views

Z-index in OpenLayers 3: layer ordering in OL3

Is there a method to change Z-indexes of layers in OpenLayers3 like it was in old version? map.setLayerIndex(markers, 99); //set the marker layer to an arbitrarily high layer index I need to change ...
13
votes
1answer
11k views

Use python to add layers to TOC

I've been battling with adding layers to the TOC for some time now. I have managed to single layers added but need to loop through a folder and add all layers. Shapefiles I cannot get to add at all. ...
13
votes
2answers
8k views

Make a Qgis layer update from a 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 ...
12
votes
1answer
14k views

How to add feature class to MXD with ArcPy (Python)? [duplicate]

I am using ArcGIS 10.1 and I am trying to add a feature class that I create to an MXD, so that I can join to it. This all needs to be done using Python. Is this possible?
12
votes
3answers
1k views

Create Layer from Selected Features tool: How is the list of features stored?

In ArcGIS Desktop, there is a tool called Create Layer from Selected Features. Using this tool, I can convert a selection to a layer in ArcMap. It's my guess that there is a "list of features" that ...
12
votes
4answers
1k views

How many layers are too many layers in ArcMap?

I work on ArcGIS using a Citrix virtual software connection at work. It is dreadfully slow at times, and without any changes to the MXDs I'm working on, one minute ArcMap can be operating at a ...
12
votes
1answer
4k views

Sort layers in QGIS table of contents?

When I load a bunch of layers into QGIS from PostGIS, they seem to load in reverse alphabetical order. Is there any tools or plugins that allow you to quickly sort the QGIS TOC in a different order? ...
11
votes
2answers
14k views

Changing data source path involving feature dataset in *.lyr files using ArcPy?

How can one change the source data paths for every layer file in folder X using arcpy? I've followed Updating and fixing data sources with arcpy.mapping as best I can, yet all I get is an unhelpful ...
11
votes
3answers
2k views

How to ignore “handle bad layers” in QGIS?

I have a QGIS (2.14.3-Essen) project that I use both at work and at home. I keep all but two layers with the project. The two remaining layers are very large - a DEM and hillshade totaling more than ...
11
votes
1answer
472 views

How to speed up simultaneous working with PostGIS layers in QGIS?

we are working on one big layer at the same time (10-20 people). Some of us use QGIS 2.8.1 and the other 2.6. The user with 2.8 have a lot of crashes (QGIS). The 2.6 users don't have this crashes but ...
10
votes
3answers
21k 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 actually coordinates of the extent.
10
votes
7answers
44k views

How to export/save a layer composition to GeoTiff?

I want to export/save a QGIS composition of raster/vector layers to a GEOTIFF or ECW raster with high resolution (20 000 * 20 000 Pixel).
10
votes
2answers
26k views

Leaflet: How to move the layer-control menu?

This might be a silly question, but I could not find a documented way to achieve this. I'd like to freely position the layer-control menu, probably to the top left near the default zoom-in/out button....
10
votes
2answers
9k views

How does Zonal Statistics work exactly?

I'm a bit confused on how the zonal statistics tools work in QGIS (either the 'Zonal Statistics' tool under the Raster tools from the QGIS geoalgorithms toolbox or the 'Raster statistics from polygons'...
9
votes
3answers
12k views

How to get names of all layers in a store in GeoServer using OpenLayers

I have strict requirement to retrieve names of all layers in a GeoServer store using OpenLayers. I've gone through the post here, but it doesn't answer my question. I've also gone through GeoServer's ...
9
votes
1answer
7k views

Delete layer from ArcMap using Python

Problem: I'm trying to loop through all my layers looking for layer named "CADAnnotation". If the layer exists then remove the layer from the mxd Notes: Running from Stand-Alone script (ie. NOT ...
9
votes
1answer
440 views

Editing shp layers style simultaneously in QGIS?

I have some polygons in a shp file that I need to change their line width. I head joined them in one group Is there a way to change the line with for all of the layer in the group simultaneously and ...
9
votes
1answer
874 views

Is it possible to have dynamic layer names in QGIS project?

I have a QGIS project with layers, based on PostGIS SQL queries that use current date. Since the data in the database changes, these queries return different data every new day. Is it possible to ...
9
votes
1answer
2k views

QGIS/PostGIS layer styles

I've made a plugin asking for login credentials to a DB. Once logged in, the plugin is loading some layers from the DB. In the DB there are both admin and "normal" users. I've saved two styles to the ...
9
votes
2answers
2k views

Data Source of layer changing after copy/paste in Table of Contents of ArcMap?

I run into this situation all the time; I often just copy layers and groups of layers in the TOC of one Map Document and paste then into the TOC of another Map Document. For the most part this ...
8
votes
3answers
11k views

What is Python equivalent of ModelBuilder's Iterate Feature Selection?

My data consists of two featureclasses: Points = points representing trees Polygons = Polygons representing % canopy area by area. Each polygon in the FC has a % canopy measurement in the attributes....
8
votes
1answer
1k views

Changing display name of layer with PyQGIS?

I did a batch processing of several vector layers and now the display name for every file is "dissolved" when accessing the layer.name() function in QGIS. I read in this answer from underdark to ...
8
votes
1answer
6k views

what dictates the drawing order of overlapping features with in the same layer/feature class in ArcGIS?

I know that in ArcGIS drawing order is controlled by layers, and if I want to make some features be drawn on top of other features I can use definition queries to separate them into different layers ...
8
votes
2answers
4k views

How to copy a group of layers between QGIS projects?

In ArcGIS I am used to being able to have a couple of MXD documents open and copy-paste groups of layers from one MXD's table of contents to another. This can save a LOT of time ensuring consistent ...
8
votes
2answers
6k views

Turning on labels of layer using ArcPy?

I am unable to turn on the labels within my Python script: import arcpy mxd = arcpy.mapping.MapDocument(r"Mypathhere") #Map document reference layer = arcpy.mapping.ListLayers(mxd, "Layername")[0] #...
8
votes
2answers
2k views

Force geometry type in mixed geometry WFS layer in QGIS?

I have an external WFS source serving mixed geometry types - in other words, I have no control of the source. When adding the layer QGIS sets the geometry type to line and thus I am unable to style ...
8
votes
1answer
797 views

Getting layer IDs using ArcPy?

I am working in an ArcMap session, I've checked the option to get an ID for each of the layers in my document, so anyone has it. Now, what I need is a way to get these values within a python script (...
7
votes
2answers
1k views

Displaying legend item as polyline instead of polygon in ArcMap?

I am using ArcMap 10.1 and am trying to create a legend that will display a polygon layer as a single line.
7
votes
2answers
7k views

How to get layer type in OpenLayers 3?

I would like to iterate through all of the added layers in an ol.Map instance and only select the vector layers. So far I could get the individual layers with the a property of the resulting object of ...
7
votes
2answers
2k views

Symbols above labels in map QGIS

I didn't find any answer to this question. In this post it is said that labels are by default on top of everything else: How to place labels under a vector layer?. But it was for 2.2, and years went ...
7
votes
1answer
6k views

Using ArcPy to rename MXD layers?

I have a MXD with some layers that have parentheses in them. I'd like to rename them via script. Is this a valid approach? import re map = arcpy.mapping.MapDocument("CURRENT") layers = arcpy.mapping....
7
votes
2answers
11k views

Using Google Maps as layer in ArcMap?

Can I use Google Maps as a layer in ArcMap? Is it possible?
7
votes
2answers
5k views

Activating layer by its name in PyQGIS?

I'm writing a script that requires the attributes of different layers to work, and I would like to know how to call a layer that is not the currently active one and get its features. For example, I ...