Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 638

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

1 vote
Accepted

Linear referencing using virtual layers in QGIS

This answer is not a complete answer as I don't have the same exact environment. You need to cast to get the "right result". The content should be more or less like the following SELECT id /*:int*/, S …
ThomasG77's user avatar
  • 31.2k
1 vote

OpenLayers Interaction - events are returning wrong features

You can use a third party library like JSTS to solve your issue. You can find out how to select exactly by polygon instead of extend by looking at this sample
ThomasG77's user avatar
  • 31.2k
1 vote

Exporting two vectors layer as one image

In the original code, iface.addMapLayers does not exist not anywhere in the doc e.g https://qgis.org/api/classQgisInterface.html. So, simply remove it. Because of the previous remark, settings.setLaye …
ThomasG77's user avatar
  • 31.2k
2 votes
Accepted

Add layer to QGIS 3 map from processing script

From a previous answer in another processing context, the following should do what you want context.temporaryLayerStore().addMapLayer(layer) context.addLayerToLoadOnCompletion( layer.id(), …
ThomasG77's user avatar
  • 31.2k
1 vote
Accepted

Openlayers 4 WFS & vector select

You will find 2 solutions: one using EPSG 27700 for map (hence the OpenStreetMap cutting on the OSM basemap) the other one using EPSG 3857 for map (slower as a reprojection client side happened) N …
ThomasG77's user avatar
  • 31.2k
0 votes

Add a vector GeoJSON layer in OpenLayers 5.1.3

Normally, you don't need to set an option like featureProjection: 'EPSG:3857' in new ol.format.GeoJSON call. Why? Because by default, any GeoJSON should be using coordinates with EPSG:4326 (lon/lat fo …
ThomasG77's user avatar
  • 31.2k
2 votes
Accepted

QGIS action loading layer in GPKG

You can find below solution to do the job The full code is the following from qgis.core import ( QgsVectorLayer ) # Change to your own GPKG path path_to_gpkg = "path/to/your/own.gpkg" # Replace [% …
ThomasG77's user avatar
  • 31.2k
2 votes

Connecting QGIS to OS Vector Tile API

Already consumed Ordnance Survey vector tiles but from Zoomstack product using Maptiler plugin https://twitter.com/ThomasG77/status/1276092119770378240 except there are not key for access contrary to …
ThomasG77's user avatar
  • 31.2k
8 votes
Accepted

Exporting Vector layer using PyQGIS

The official doc for QgsVectorFileWriter.FieldValueConverter tells you that it's an "Interface to convert raw field values to their user-friendly value" The interface has 3 methods, clone, convert and …
ThomasG77's user avatar
  • 31.2k
4 votes
Accepted

Use LonLat coordinates to perform queries on API

You need to make an Ajax call using fetch (it could also be the "old" XMLHttpRequest, more a question of preferences) The relevant code you need to change is the following map.on('singleclick', func …
ThomasG77's user avatar
  • 31.2k
3 votes
Accepted

Changing symbol and color of vector Layer using QGIS 3 C++ APIs

A Python correction to get your issues (moreover, was too long to get a minimum C++ project to debug ;) ) layer = iface.activeLayer() layerRenderer= layer.renderer() mSingleRenderer = QgsSingleSymbol …
ThomasG77's user avatar
  • 31.2k
1 vote
Accepted

Rendering CSV file as annotation on QgsMapCanvas

You issue is elsewhere. You do not load all providers and in this case delimitedtext Because provider is not available, your code always fails. You need to declare something like that at the beginning …
ThomasG77's user avatar
  • 31.2k
7 votes
Accepted

Create a shapefile from geometry with OGR

You need to create a feature an add the feature (a feature = a geometry + fields) to the layer import sys from osgeo import ogr from osgeo import osr # Creating a line geometry linegeo = ogr.Geometr …
ThomasG77's user avatar
  • 31.2k