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.)

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

QGIS - add OS NGD Tiles - API as a vector layer

I have been making good use of QGIS and found the help files able to get me through most problems, although now I am completely stuck at trying to get the "OS NGD API - Tiles" vector tiles ...
0 votes
0 answers
33 views

GeoServer polygon artifacts on GeoPackage

I am brand new to GeoServer (2.23.1) and have it running on a Debian 11 Podman container. I can access all the sample data, which all renders as expected. I am following the GeoServer Getting Started ...
0 votes
1 answer
17 views

Measurement display while creating a vector layer

I am trying to display the measurement tool on QGIS while I am adding a vector to a vector layer I created. I am using EPSG 4326 and I cannot figure out how to use the measurement tool while creating ...
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 =...
1 vote
2 answers
54 views

Cloud-optimized vector format

Currently, cloud-optimized GeoTIFFs (COGs) are a great format for storing rasters on the cloud, with the ability to read only the portions that you need (stream) at a given time from a client. Cloud ...
0 votes
0 answers
16 views

Event listener of removefeature does not get executed when a feature is removed from the vectorsource

As shown in the below posted code, I want to execute some side effects in evtListener when a feature is removed from the vector source. At run time, when deleteSelectedGeometry function is invoked, ...
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 ...
0 votes
0 answers
19 views

Extract a vector from a raster with a single boundary in QGIS

I have a "problem", I need transform a raster in a vector and it works but some pixels like the one in the print it is separated from the boundary, and for my use (a specific use of ...
1 vote
1 answer
30 views

QgsVectorLayer not loading correctly

I'm working with PyQGIS and have encountered an issue. While my code successfully creates a new layer (as evident in the screenshot attached), this layer does not load correctly into the project. I'm ...
1 vote
1 answer
61 views

Getting extent of each individual feature in the vector source in OpenLayers?

i have a vectorSource that contains some features.i know how to get the extent of the vectorSource, but i do not know how to get the extent of each individual feature in that vectorSource. i googled ...
2 votes
1 answer
84 views

Iterating over the features of a vector layor then performing zonal statistics algorithm on each feature in PyQGIS

I composed this script in PyQGIS to perform the zonal statistics on a vector layer as for all its features at once, it works perfectly, when the script is finished, I inspected the attribute table and ...
0 votes
2 answers
77 views

Segment lines by given divider

I a trying to segment lines with specific values that are stored in a field. For example, I need my line 1 which is ~84m long, to be segmented into two segment that are 31m and 53m long. I have a ...
0 votes
1 answer
13 views

Join Multiple Lines Plugin creates extra lines

I am using "Join Multiple Lines" plugin before using QChainage because I am getting extra points that aren't spaced properly. When I use "Join Multiple Lines" it creates extra ...
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 ...
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: ...
0 votes
0 answers
59 views

Wrapped C/C++ object of type QgsVectorLayer has been deleted in QGIS

The main goal is to remove this error: RuntimeError: wrapped C/C++ object of type QgsVectorLayer has been deleted. It appears when a user (I'm in the testing phase) deletes a QGIS layer from the ...
0 votes
1 answer
40 views

Dynamic Filtering based on unique values of ArcGIS vector layer field

I'm trying to achieve in ArcGIS some sort of dynamic filter where the software would propose filtering options based on unique values in a vector layer field. This is similar to how PowerBI or Tableau ...
0 votes
1 answer
464 views

How to export vector layer containing polylines into polygons in Google Earth

I'm using QGIS 3.16.5 Hannover and I already knew how to convert vector layer (from AutoCAD containing polylines) into KML format. When I export it as KML and open it up to Google Earth Pro, the ...
0 votes
1 answer
56 views

PyQGIS layer action: Add buffer from clicked-on feature as temporary layer using materialize

In the workshop material "QGIS Automation using Actions", the first example "1.1 Extract a Feature from a Layer" demonstrates how one can extract any country polygon by clicking on ...
0 votes
1 answer
490 views

Style OpenLayers.Feature.Vector in OpenLayers.Strategy.Cluster()

I'm using the clustering feature in my project. I collect list of points like so: cluster_features.push(new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(lon,lat), {heading:deg} )...
2 votes
1 answer
179 views

Reclassify field values from txt rule file in QGIS

I need to reclassify all the values of one field of my vector file in QGIS. I'm trying to use the function v.reclass, using a text file as a rule file. I get this error: ERROR: Either 'rules' or '...
0 votes
1 answer
304 views

Using only Selected Layer in mMapLayerComboBox

I am building a plugin and so far I have tried simplifying the tasks. But my greatest challenge is making sure that the selected layer in the "mMapLayerComboBox" is what is exactly used in ...
5 votes
1 answer
3k views

Creating line layer with features using PyQGIS

In QGIS GUI, a line feature is created using this icon How to create a line with a fixed distance from a vector layer using PyQGIS. This my example: from qgis.core import * from qgis.PyQt.QtCore ...
6 votes
3 answers
325 views

Calculate percentage of vector point attributes within a polygon QGIS

I have a vector point layer with an attribute Customer with boolean values true and false. I want to aggregate this data by polygons, such that for a given polygon, it shows that Customer is XX% true ...
0 votes
1 answer
73 views

Merging multiple line and point vectors in QGIS 3.28 [closed]

I have hundreds of line and vector layers. The line and vector layers are from several kml files. I want to combine the line and point vectors respectively and automatically without having to manually ...
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 ...
1 vote
1 answer
54 views

Handling *other* attributes in a drag'n'drop form

I built a form for my vector layer using the Drag'n'drop form designer but I only did so for some of the layers fields. Is it possible to automatically add widgets for the other fields to the form, e....
5 votes
2 answers
266 views

Adjusting coordinates from whole vector layer in QGIS

I got a vector data layer that I need to project onto a map. When I import the layer, everything seems to work, but the layer ends up in the wrong place: The red dot in the bottom left corner is my ...
1 vote
2 answers
233 views

Add vector OSM XYZ layer in QGIS?

Marble has an option to display OSM's vector map. Is there a way to add this vector map into QGIS? I see the raster XYZ URL format is: https://tile.openstreetmap.org/{z}/{x}/{y}.png Is there a ...
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 ...
0 votes
0 answers
29 views

Vector layer points are not being imported/shown from MySQL datasource

Issue QGis 3.24.12 does not visualise/import points from a vector layer with a MySQL datasource anymore. In QGis 3.24.12, I import a table from a MySQL datasource as a vector layer. However, the ...
14 votes
2 answers
9k views

Generating invalid Vector layer in QGIS

I need an invalid layer to test a plugin in QGIS. In the plugin window, I select a layer from combobox. So, the invalid layer should be in the Layers panel. I google for a while but I cannot find a ...
6 votes
2 answers
233 views

Shifting existing points (shapefile) to the highest raster pixel value in 5m buffer

I am trying to move 1700 points (of an existing shapefile) to a new pixel of a raster layer. If the dot is already in the highest pixel of the NDVI raster layer then no need to change. The criteria ...
0 votes
1 answer
106 views

Options to tweak exported PDF from QGIS

I'm struggling to make sense of the different options available that may help with finding the right balance between file size and image quality when exporting a Print Layout as a PDF from QGIS. The ...
0 votes
0 answers
58 views

QGIS 3.4.1 How to symbolize based upon characters of a 12-digit HUC code

I'm trying to group and then symbolize polygon shapefiles using HUC 12 codes. Field name is "huc12"; field type is integer. more specifically, I want to be able to group polygons according ...
4 votes
1 answer
100 views

Getting only joined fields using PyQGIS

How do I get a list of fields that have been joined to a layer, or how can I check if a specific field has been joined? In older versions there seemed to be field.source(), but this is not available ...
5 votes
2 answers
646 views

Exporting Vector layer using PyQGIS

I found a problem with exporting the vector layer with: "Replace all selected raw field values by displayed values" in the PyQGIS script. The source layer contains a value map for attribute &...
0 votes
0 answers
74 views

OpenLayers vector layers don't render at certain zoom levels in Chrome browser

Environment: Chrome browser Typescript Angular OpenLayers 8.0 I have two OpenLayers maps side by side. They need to be synced in all respects except for one layer. So I'm using the same layers and ...
0 votes
2 answers
84 views

What are the QGIS words for my 4 types of data?

My project has 4 types of data: a raster satellite view (Google Maps), to be the base layer and geolocated by three points (CSV) that apply to visible points on the raster map; individual points: ...
11 votes
2 answers
5k views

Deleting all features of Vector layer using PyQGIS

I am developing a Python plugin for QGIS. In the QGIS map window, certain features of a vector layer are selected and those features are highlighted. Now I need to delete all the existing features ...
11 votes
2 answers
4k views

Loading CSV data table as Vector layer using PyQGIS

This might be a simple problem, but how does one load a simple two-column CSV with no associated geometric data? I have given a couple of go's via QgsVectorlayer[delimited text, spatialite] types - ...
3 votes
2 answers
157 views

Graphical model for random points inside polygon moved to closest point on line

I want to place a regular random distribution points inside a polygon and move these points to the respective closest point on a line layer afterwards. I use regular points algorithm with random ...
0 votes
0 answers
33 views

Changing Fontmarker Size Expression in QGIS 3.28 using Python Console

I am currently working on a geology and mineral occurrence map in QGIS 3.28. I have a vector rule-based layer in which mineral deposits are classified with different symbols. Some of these symbols ...
1 vote
1 answer
165 views

Shapefile from selected features in PyQGIS

I am trying to develop a plugin to export selected features from a layer as shapefile. I have a comboBox from which I can select features. After selecting features in comboBox, I tried following code ...
0 votes
0 answers
20 views

Renaming Multiple Layers after using split vector tool

I am using the split vector layer tool and then adding the vector layers. These are currently getting named as by the Field ID_the unquie value. So for example Box_12, Box_13, Box_18. Obviously when I ...
2 votes
1 answer
149 views

Merge four vector layers into one shapefile and keep the symbology

I am using QGIS. I have four vector layers, they are all separately categorized and have a certain symbology. My goal is a shapefile containing all four layers and not losing the symbology. I already ...
4 votes
1 answer
194 views

Change the symbology of a vector output layer that is returned from a processing tool?

I want to change the symbology of a Vector Output Layer that is Returned after running a Processing Tool. I am building a processing plugin. I am trying to make the effects reflect in the displayed ...
0 votes
0 answers
52 views

How to export vector layer containing symbology compatible with ArcGIS on PyQGIS

I export vector layer(.shp) with symbology file(.qml) like below code. The exported files works on QGIS, but on ArcMap (ArcGIS), qml file doesn't work. How can I extract symbology file on PyQGIS so ...
2 votes
2 answers
157 views

How to ensure a newly created layer displays on the canvas

I am trying to perform some categorization from an existing vector layer such that after performing the calculations, a new vector layer is created with just the new fields created. After running my ...
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 ...

1
2 3 4 5
9