Skip to main content

Questions tagged [mapcanvas]

Aggregate refers to the process of summarizing grouped data, commonly used in Statistics.

Filter by
Sorted by
Tagged with
11 votes
3 answers
7k views

Refreshing MapCanvas while PyQGIS-script is running

I try to write a PyQGIS script similar to this: Use of python console to prepare offline map from WMS (tile downloader). Basically there are two loops to pan the mapCanvas, refresh the mapCanvas and ...
EikeMike's user avatar
  • 1,181
1 vote
1 answer
185 views

Redraw a Point in the lower left corner (QGIS)

I want to draw a point in the lower left corner of the QGIS map window (canvas). I tried the geometry genarator in the layer attributes: point_n(@map_extent, 1) This works, but I want the point ...
MarinT's user avatar
  • 75
14 votes
2 answers
818 views

Displaying generated lines out of map extent using QGIS?

I have drawn an OD flow map using QGIS geometry generator, using the following expression : make_line( centroid( $geometry ), centroid( geometry( get_feature( 'Layer2', 'Attribute1', attribute( ...
mamouthautapis's user avatar
6 votes
1 answer
3k views

Getting attribute values from vector features visible in QGIS canvas using PyQGIS

I have a vector layer (grid). Currently I select some tiles with the select tool and paste some Python code to get information about these features. layer = qgis.utils.iface.activeLayer() ...
Stefan's user avatar
  • 4,474
2 votes
1 answer
224 views

Get properties of QgsVertexMarker upon mouse click

I'm looking for a way to trigger an event upon clicking on a QgsVertexMarker object which is located on a mapCanvas. In the official docs, there is a mousePressEvent method which I actually re-...
druid's user avatar
  • 63
2 votes
1 answer
568 views

Writing Custom Map Tools using RectangleMapTool

I am creating a plugin with a preview window where the user must select a rectangle to define the study zone. I see in this https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/canvas.html ...
Bárbara Duarte's user avatar
2 votes
1 answer
857 views

Correcting canvas DPI in QGIS Windows

I'd like my QGIS map canvas scale to be accurate, e.g. so if the scale is 1:10000, then 100m on the ground should show in 1 cm of screen. My Windows laptop screen has 157 ppi (dpi) based on its ...
Houska's user avatar
  • 8,416
2 votes
2 answers
1k views

How to determine when the map has finished rendering

I have written a few functions to compare QGIS performance to MapInfo. Most of them involve doing some analysis then dumping the results on the map, as such the process would be considered 'finished' ...
Alex's user avatar
  • 479
2 votes
0 answers
701 views

Label only one polygon in canvas/map view per category/value in attribute table

Question: In QGIS (2.18), how do you show only one label per field of view in the map canvas for each visible category (that is displayed in the map view/canvas at any given scale/focus) of a multi-...
guestagain's user avatar
1 vote
1 answer
336 views

Get extent of the current map canvas in a virtual layer query in QGIS

Is it possible to get the extent of the current map canvas in a virtual layer query? Something similar to the variable @map_extent in QGIS expressions that can be used to create a polygon covering the ...
Babel's user avatar
  • 74.9k
0 votes
0 answers
644 views

Dragging multiple polygons on Canvas rerender in React Leaflet

I am using React Leaflet to render Leaflet map and Leaflet.Path.Drag to drag multiple polygons together. Here is a demo. I have a lot of polygons and would like to drag multiple polygons with ...
Matt's user avatar
  • 95