Skip to main content

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
2 votes
1 answer
54 views

Drawing rectangle of road line with width as minimum distance between two buildings in QGIS

I have 2 layers: line vector layer representing the road polygon vector layer representing the buildings How can I derive a rectangle shape (refer to green rectangle) for each road line whereby the ...
LBL's user avatar
  • 31
2 votes
4 answers
127 views

Reducing decimal places of coordinates in vector data using QGIS

I have polygon vector data, some of the polygons are imported from another 3D program (Agisoft Metashape). The imported polygons have up to 12 decimal places in the displayed coordinates (attribute ...
chrissi's user avatar
  • 101
0 votes
0 answers
48 views

How to keep attributes after a clipping operation in PyQGIS?

I'm trying to do a spatial clipping operation between 2 point layers, representing buildings and earthquakes, and a buffer area created by the user. The problem is that after operation, all attributes ...
Salvatore Diolosà's user avatar
0 votes
0 answers
38 views

Vector layer still misaligned after reprojecting

I'm new to QGIS, and trying to figure out why my vector layers are still misaligned after reprojecting. I am using ESRI topographic basemap EPSG:3857 WGS 84 Two datasets I have overlayed display ...
Grace's user avatar
  • 11
0 votes
1 answer
91 views

Shifting / moving entire layer in QGIS

I'm trying to work on two sets of data : Public roads (official source, purple on the image) Network data (private source, brown on the image) Both layers should overlap (at least, the network data ...
Vincent Monteil's user avatar
0 votes
0 answers
25 views

Decrypt s63 IHO

I'm developing an OEM System for s63 charts. I didn't find lot of information about the s63 decryption, however I read the IHO Data Protection Scheme, but I don't understand everything. With Python, I ...
Clément's user avatar
0 votes
0 answers
30 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 ...
Jam's user avatar
  • 1
0 votes
1 answer
19 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 ...
Eric Lebar's user avatar
1 vote
0 answers
38 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
2 answers
126 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 ...
Oliver Lopez's user avatar
  • 1,274
1 vote
0 answers
34 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
0 votes
0 answers
31 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 ...
Mestrexama's user avatar
0 votes
0 answers
18 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, ...
Amr's user avatar
  • 43
1 vote
1 answer
34 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 ...
Diogo Barros's user avatar
1 vote
1 answer
69 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 ...
Amr's user avatar
  • 43
2 votes
1 answer
91 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 ...
Khaled's user avatar
  • 287
0 votes
1 answer
16 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 ...
user2776946's user avatar
0 votes
2 answers
78 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 ...
basile's user avatar
  • 69
0 votes
0 answers
151 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 ...
Karol Śpila's user avatar
0 votes
1 answer
61 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 ...
Frank's user avatar
  • 1
0 votes
1 answer
77 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 ...
ebcs's user avatar
  • 49
6 votes
3 answers
356 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 ...
lizard's user avatar
  • 111
0 votes
1 answer
80 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 ...
SimplyWilly's user avatar
5 votes
2 answers
351 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 ...
ka.pn's user avatar
  • 51
1 vote
2 answers
508 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 ...
Geremia's user avatar
  • 210
1 vote
1 answer
58 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....
bugmenot123's user avatar
  • 10.9k
0 votes
0 answers
31 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 ...
Isaac Sterckx's user avatar
6 votes
2 answers
237 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 ...
Tom Runge's user avatar
1 vote
0 answers
116 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 ...
Thierry Blais's user avatar
0 votes
1 answer
171 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 ...
Jonathan's user avatar
0 votes
2 answers
87 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: ...
johnsankey's user avatar
0 votes
0 answers
60 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 ...
user233078's user avatar
4 votes
1 answer
105 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 ...
BritishSteel's user avatar
  • 6,647
3 votes
2 answers
175 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 ...
winnewoerp's user avatar
  • 1,504
0 votes
0 answers
21 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 ...
Henry Hill's user avatar
0 votes
0 answers
37 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 ...
rytz's user avatar
  • 1
0 votes
0 answers
34 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 ...
Iven Pepa's user avatar
  • 341
2 votes
1 answer
185 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 ...
Lucas's user avatar
  • 21
0 votes
0 answers
60 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 ...
qgisWorker's user avatar
1 vote
0 answers
45 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
3 votes
1 answer
105 views

Plotting transect line with equally spaced points and get the coordinates in QGIS

In QGIS I am trying to plot a transect line. For this I would like to place points every 500m along a line and get the coordinates of each point, but have not managed to achieve this unfortunately. Is ...
onc's user avatar
  • 31
3 votes
1 answer
85 views

Creating script to automatically create virtual layers with alphanumeric labels for shapefile grids in QGIS

I have many grids in shapefile format. Adding alphanumeric labels to them can be done through using a virtual layer SQL query as found in this thread: Creating GRID with customized labels in QGIS, ...
Bryce01's user avatar
  • 33
1 vote
0 answers
70 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
0 votes
1 answer
39 views

Tailoring shapefile attributes with PyQGIS [closed]

I'm adding a shapefile (as a vector layer) to QGIS with the snippet: def addere_urban(self): urbanareas = QgsVectorLayer('/home/ubuntu/SHAPEFILES/cb_2018_us_ua10_500k.shp', "Urban areas",...
user228490's user avatar
0 votes
1 answer
69 views

Changing opacity between lines in a vector layer

The extent of my knowledge with QGIS is how to join up layers and apply data. I have a vector layer of MSOA's for 2021 taken from ONS Geography on boundaries for England and Wales, I wish when using ...
wandered889's user avatar
1 vote
1 answer
76 views

Getting selected attributes from line layer to polygon layer in QGIS

I am trying to get specific attributes from a line layer to a polygon layer. The line layer contains a number of pipes that run through a polygon (parcel). They both have the parcel number in common: ...
ibdmn's user avatar
  • 191
1 vote
0 answers
92 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
2 votes
1 answer
202 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 '...
Fabio Castelli's user avatar
2 votes
0 answers
73 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
1 answer
2k views

"DeprecationWarning: QgsVectorFileWriter.writeAsVectorFormat() is deprecated" when exporting GeoJSON in QGIS

I am trying to export a layer same to like this question: https://gis.stackexchange.com/a/435753/215676 But the difference is I'd like to do it in PyQGIS with QgsVectorFileWriter. Is there a way to ...
Ali Güvenaltın's user avatar

1
2 3 4 5
10