Questions tagged [vector-layer]

A vector layer represents geographic data whose features are given by sequences of points. (Contrast with a raster, which is a grid of values.)

117 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
524 views

QGIS Simple fill symbology for vector layer not exporting to pdf

I'm trying to use simple fill i.e. Diagonal X, on vector layers, the layers look fine on the composer when zoomed out (for example to a scale of 1:6,000) however when I export to pdf the distance ...
J.Tea's user avatar
  • 61
5 votes
0 answers
763 views

OpenLayers: Performance on satellite hybrid map (raster tiles, vector tiles, vector labels)

I've got a map with three kinds of layers, each of which serving a somewhat different function: TileLayer: raster tiled map from an XYZ source (as .png) to show photographs in the background ...
Moehrengulasch's user avatar
4 votes
0 answers
49 views

Splitting vector layer based on shortest distance to feature in another layer in QGIS

I have two shapefiles of Europe. One is a highly accurate shape of the continent, the other is a map of countries in Europe in 1500, containing the names of all countries as attributes. Sadly, the ...
TVLuke's user avatar
  • 41
4 votes
1 answer
470 views

How to load valid PostgreSQL QgsVectorLayer

Note: This is NOT a closed question. The following links does NOT provide an answer to the solution: Add PostGIS layer to QGIS via Python Console The Vector layer still remains invalid with the ...
user908759's user avatar
3 votes
0 answers
70 views

Using get_feature() function on layer while editing in QGIS

In QGIS, I am trying to update a feature based on entries made on a nested form (relation). Considering: Layer1 has Field1 that should capture the value of Field 2, and field in Layer2 Layer2 is ...
Horizen's user avatar
  • 567
3 votes
0 answers
114 views

Apply custom colors for new vector layers in QGIS

I am trying to have a custom color palette applied when new vector layers are added. This is for use within a default project or template. But every time I load a vector layer, it chooses from the &...
sa967's user avatar
  • 31
3 votes
0 answers
61 views

Prioritize label rendering

It seems that by default, vector layer labels only render after everything else is loaded. Some wms/wmts feeds being very slow, this means you have to wait for a while before you can see your labels, ...
ChameleonScales's user avatar
3 votes
0 answers
755 views

Changing color of each selected feature based on expression using PyQGIS?

Code below changes the color of all the selected features based on the last condition it satisfied instead of changing the color of the feature which satisfied the condition. for f in FEATURES: ...
Chetan Vashisth's user avatar
3 votes
0 answers
1k views

GeoServer 2.9.2 database connection pooling/thread locking issue

I am mocking GetMap requests. Scenario is that 50 users use only "database layers". Each user "sends" 8 GetMap requests every ~22s for ~300s which sums up to 5200 GetMap requests for vector data. ...
user435421's user avatar
2 votes
0 answers
69 views

Advanced digitizing tools - snapping last vertex to right angle

My aim is to snap last vertex to the right angle using advanced digitizing tools. I'm running QGIS 3.30 with 'snap to common angles' on - see the picture below. Any ideas?
Adam's user avatar
  • 155
2 votes
0 answers
181 views

Exporting vector layer as TIFF using PyQGIS

I have a layer named 'result' which I want to export as a georeferenced TIFF file. I have a layer named 'layer' which is just a vector polygon (it has to be there). The best code I've found to do ...
Alex Fidalgo's user avatar
2 votes
0 answers
177 views

Distance along line network between set of points to set of hubs

I am trying to measure distance between towns (light grey in attached screenshot) and their district capitals (light purple) along usable roads (dashed blue). I used the GRASS v.distance plugin to ...
Diana's user avatar
  • 21
2 votes
0 answers
163 views

Adding multiple vector files in a folder as an input in QGIS processing modeler using iterator tool

I have shapefiles in a folder that I intend to use as an input in QGIS Processing Modeler. I would like to iterate within the folder to add each of the shapefiles as an input. It did it in ArcGIS ...
user8160648's user avatar
2 votes
0 answers
2k views

Use Angular 8 and OpenLayers 3 in order to draw and delete temporary vector layers from a map

I have a project built with Angular 8 and OpenLayers 3. I want to be able to draw and also delete Polygons from a map. I tried to port this working example into my project. These are the interacting ...
yeaaaahhhh..hamf hamf's user avatar
2 votes
0 answers
62 views

Error when using v.net in GRASS GIS

I'm new to using GRASS GIS and GIS in general. I have a point layer and a line layer which I added on to the layer tree using two .shp files. I need to use v.net tool to create a network by connecting ...
Nandula's user avatar
  • 783
2 votes
0 answers
588 views

CRS Options Missing

I'm very new to GIS and am trying to use QGIS 3.4.8 to map some spatial data for a larger project. I've been using OpenStreetMap as my basemap, managed to load in my vector layers and for a few days I ...
AlexP's user avatar
  • 21
2 votes
0 answers
48 views

Identify same entities across time period

I have a few election district boundaries layers across several different elections, and I am trying to ascertain whether/how much the district boundaries have changed over time. They are labeled ...
Glen Ng's user avatar
  • 21
2 votes
0 answers
169 views

Inverting shapefile in QGIS 2.18?

I asked a question earlier about how to invert my file "hydropolys.shp" from a vector of ocean and seas to a vector of land and got sent to here, but I am experiencing issues where using the "...
user137875's user avatar
2 votes
0 answers
350 views

automatically georeference QgsGeometry.fromPoint features on creation

Is there a way to automatically georeference fromPoint features upon creation? I use this layer URI: self.pinLayer = QgsVectorLayer( "Point?crs=epsg:3857&field=id:integer&...
cmon_sig's user avatar
2 votes
0 answers
139 views

PyQgis How could I open the "identify results" dock using "onSelectionChange()"

Using iface.mapCanvas().selectionChanged.connect(function) I'd like to open the Identify result dock for the selected feature as shown below: it could be manually done by selecting the feature with ...
Thriskel's user avatar
  • 355
2 votes
0 answers
976 views

Copy polygons to another layer with different attribute

I am working in QGIS 3.0.2-Girona. I am digitizing images in which there are rocks that can be encrusted, totally or partially, by algae. I want to have a polygon for the rock and one for the algae. ...
Filippo's user avatar
  • 289
2 votes
0 answers
151 views

Insert point layer as input for GRASS viewshed in QGIS 3.2 modeler

I’m building a QGIS (3.2 Bonn) tool for my colleagues using graphical modeler. The tool should get 3 inputs: DEM raster layer, vector layer of points, vector layer of a point of interest (POI). The ...
user88484's user avatar
  • 1,779
2 votes
2 answers
5k views

Add a vector GeoJSON layer in OpenLayers 5.1.3

I am trying to add a simple capitals GeoJSON vector layer to my map for basics learning, without managing to get it to work. I spent hours of roaming the documentation API. As follow is my script: ...
Alexis Cazorla's user avatar
2 votes
0 answers
264 views

QGIS Python layerModified signal: how to find the id of modified feature

With this code on a vectorLayer v_layer: QObject.connect(v_layer, SIGNAL("layerModified()"), self.interceptModify) I can intercept when a geometry is changed, but how do i find which feature has ...
Luca Guida's user avatar
2 votes
0 answers
54 views

Updating master layer with data imported from GPS in QGIS?

All the data I import comes in from GPX files in dribs and drabs. I load the file into a new layer using GPSTool or "Add Vector Layer" but neither of these give me any control over the fields created ...
Russell Fulton's user avatar
2 votes
0 answers
211 views

Vector layer parameter in QGIS script takes wrong layer

I have 6 postgis layers in my QGIS project and all of them have the same data source but different joined data. When accessing these layers from a python script with a vector layer parameter (like ...
DMS02's user avatar
  • 607
2 votes
0 answers
153 views

Openlayers 3 screws up rendering of vector data on high zoom

I'm working on a web app that needs to show a lot of detail. It's also loading a geoJSON file as background, but I have problems with it when zooming in. It's like the vector renderer doesn't find ...
sanderd17's user avatar
  • 171
1 vote
0 answers
32 views

QGIS doesn't render QgsCategorizedSymbolRenderer

I'm trying to use QgsCategorizedSymbolRenderer to control the appearance of symbols in a vector layer. To create a simple layer (with circles of different colors), I'm using the following snippet: vl =...
sergiojones's user avatar
1 vote
0 answers
33 views

Classify vector layer by area quantiles in QGIS

I have a vector layer with aroud 400 features, each having an assigned value (here displayed as a label). I want to classify it into 5 groups (10%/20%/40%/20%/10% of the total area) based on the ...
t3ahunt3r's user avatar
1 vote
0 answers
39 views

Saving layers with diferent types to a single GPX file

I have the following twos methods to save a vector layer in the project folder The first one is generic and the second calls the first to save specifically a GPX file In order to export one group of ...
Marcelo Franco Patané Júnior's user avatar
1 vote
0 answers
57 views

Exporting vector layer with symbology using PyQGIS

I want to export vector layer with symbology on PyQGIS. So, like the code below, I try export to .kml with symbologyExport = QgsVectorFileWriter.FeatureSymbology. But It couldn't export with symbology....
qgisWorker's user avatar
1 vote
0 answers
82 views

Usage of QgsVectorFileWriter.ActionOnExistingFile() in PyQGIS

I am currently trying to find a way to overwrite a CSV file saved in my QGIS project as a component in my larger project to save files. The end goal is that the CSV is 1) saved if the project has not ...
CaptainDang's user avatar
1 vote
0 answers
113 views

Choropleth map layer in OpenLayers

I tried to mimic the solution from Creating choropleth map using OpenLayers?. My implementation is as follows: const temperatureSource = new VectorSource({ features: tempData .filter((_, ...
Aayush Subedi's user avatar
1 vote
0 answers
47 views

Ordnance Survey vector maps not connected to QGIS

Following the query here: Connecting QGIS to OS Vector Tile API I tried to make the steps as per this thread but for the 3.12 version. The situation looks like you see below: I have an error despite ...
Geographos's user avatar
  • 4,087
1 vote
2 answers
144 views

Random forest/Maxent environmental predictor layers using vector data, in GEE

I am attempting to use a vector layer as a predictor environmental layer for use in classification/predictor models (eg Random Forest/Maxent). I have attempted to include a bathymetric substrate layer,...
Jcd's user avatar
  • 21
1 vote
0 answers
40 views

Difference in performance executing process on layer from project or file

Is there any difference between loading layer into processing algorithm from file or from current project? I have a custom processing algorithm which crashes QGIS (depending on the machine - ...
Kubson's user avatar
  • 614
1 vote
0 answers
264 views

QGIS Vector Layers not showing up?

I'm IT dept for a company and we've been roped into helping with this issue but we have no actual knowledge of the workings of QGIS outside of installing it... We have one user who can open QGIS ...
Michael Fotheringham's user avatar
1 vote
0 answers
158 views

Measuring real distance in QGIS

I created the linear shapefile of an ancient Roman Road (via Flaminia), and I would like to compare the linear total distance with the real one: Roman engineers and Gromatici measured the roads with a ...
Germana's user avatar
  • 11
1 vote
0 answers
78 views

Defining Vector Layer Name with PyQGIS

The goal of my python script is to get geographic data from an XML file and transform it into a vector layer. This task is successful but each of my layers have the same name... and I can't find a way ...
Novokaine's user avatar
1 vote
0 answers
135 views

Remove inner boundaries in merged vector layers

I am using QGIS and the GRASS plugin for a watershed analysis where I would like to merge three small natural catchments into a larger one. I used the 'Merge Vector Layers' function (under the 'Vector'...
wainborn's user avatar
1 vote
0 answers
31 views

Snapping centers of objects in map canvas QGIS

I wanna snap object to object basing on their centers in map canvas. For instance, snap center of green polygon to the center of red one. Already stwitched on snapping options (see below). Is there ...
Adam's user avatar
  • 155
1 vote
0 answers
67 views

Adding features to a vectorlayer using PyQGIS in VSCode

I'm trying to create a plugin that generate a vector layer with geometry using 2 other layers, the first one 'layer_segment'contain features with geometries to dissolve based on common field value ...
Abd El Oihabe's user avatar
1 vote
0 answers
101 views

Bringing elevation feature from point shape layer to line shape layer in attribute table using QGIS

I have two shapefiles. One point shapefile containing Levee station ID and their x,y and elevation/z values in meters. z values field name is 'StationE'. Another polyline shapefile where I don't have ...
ZVY545's user avatar
  • 119
1 vote
0 answers
39 views

How to keep roadnetwork attributes by cutting it to a service area in QGIS?

I extracted a road network including attributes (e.g., categorization of different types of highways) using QuickOSM. My goal is to cut this original road network to a 50km drivable radius from a ...
Keni's user avatar
  • 11
1 vote
1 answer
236 views

Adding external map link as a layer in Mergin

I have created a project in QGIS to collect field data using the Input (Mergin) app. I found this basemap through the local municipality that gives me the ward area where I will be collecting the ...
Nini's user avatar
  • 11
1 vote
0 answers
58 views

How to set a layer automatically in edit mode and addFeature mode

I have load a new layer in my QGIS project by a processing script. At the end I would like to set the layer in edit mode and addFeature mode. Thus the user only has to set the points afterwards. from ...
miraculix's user avatar
  • 169
1 vote
0 answers
51 views

Address open Layer in QGIS project by processing script, convert Python console into a processing script

I created this code in the Python console, a new point layer is created with some attributes and set into edit and AddFeature mode. I would like to bring it in QGIS algorithms. I have tried a few ...
miraculix's user avatar
  • 169
1 vote
0 answers
346 views

Rasterizing in QGIS 3.16 - Rasterlayer doesn't show up

I would like to transfer a vector-layer (containing the attribute "Polygon NN") to a raster. After filling in all parameters and Rasterizing the vector layer, nothing shows up. I watched ...
Pia Rösel's user avatar
1 vote
0 answers
250 views

Deleting GeoServer layer with Django

I am trying to delete from the GeoServer using Django with request.delete, however, I get the 401 error. GEOSERVER_URL = f"http://admin:geoserver@GEOSERVER:8080/geoserver/rest/workspaces" ...
TheWang's user avatar
  • 11
1 vote
0 answers
124 views

QGIS Plugin works first time but QGIS crashes if executed second time

I built a QGIS plugin, in order to replace existing shapefiles by other temporary layers. My script works the first time, but not the others. If I wait a little, script work again. I don't know why. ...
Nflex's user avatar
  • 11