jagomart
digital resources
picture1_Python Topics Pdf 188889 | Qgis 4 Pyqgisdevelopercookbook En


 158x       Filetype PDF       File size 0.98 MB       Source: docs.qgis.org


File: Python Topics Pdf 188889 | Qgis 4 Pyqgisdevelopercookbook En
pyqgisdevelopercookbook release 3 4 qgisproject mar15 2020 contents 1 introduction 1 1 1 scripting in the python console 2 1 2 python plugins 2 1 3 running python code when ...

icon picture PDF Filetype PDF | Posted on 03 Feb 2023 | 2 years ago
Partial capture of text on file.
                    PyQGISdevelopercookbook
                                             Release 3.4
                                           QGISProject
                                                Mar15,2020
                                                                                                                                                                                            Contents
                             1     Introduction                                                                                                                                                                  1
                                   1.1        Scripting in the Python Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                              2
                                   1.2        Python Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                             2
                                   1.3        Running Python code when QGIS starts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                 2
                                   1.4        Python Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                              3
                                   1.5        Technical notes on PyQt and SIP                         .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . .                5
                             2     LoadingProjects                                                                                                                                                               7
                             3     LoadingLayers                                                                                                                                                                 9
                                   3.1        Vector Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                            9
                                   3.2        Raster Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                          12
                                   3.3        QgsProject instance                .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . .               13
                             4     Using Raster Layers                                                                                                                                                         15
                                   4.1        Layer Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                          15
                                   4.2        Renderer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                           16
                                   4.3        Query Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                           17
                             5     Using Vector Layers                                                                                                                                                         19
                                   5.1        Retrieving information about attributes                          .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . .            20
                                   5.2        Iterating over Vector Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                          20
                                   5.3        Selecting features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                         21
                                   5.4        Modifying Vector Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                            23
                                   5.5        Using Spatial Index                .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . .              26
                                   5.6        Creating Vector Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                           27
                                   5.7        Appearance (Symbology) of Vector Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                30
                                   5.8        Further Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                           38
                             6     GeometryHandling                                                                                                                                                            39
                                   6.1        Geometry Construction                    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . .              39
                                   6.2        Access to Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                             40
                                   6.3        Geometry Predicates and Operations                            .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . .             41
                             7     Projections Support                                                                                                                                                         43
                                   7.1        Coordinate reference systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                             43
                                   7.2        CRSTransformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                              44
                             8     Using the Map Canvas                                                                                                                                                        47
                                   8.1        EmbeddingMapCanvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                 48
                                   8.2        Rubber Bands and Vertex Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                              48
                                   8.3        Using Map Tools with Canvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                              49
                                                                                                                                                                                                                  i
                                   8.4        Writing Custom Map Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                               50
                                   8.5        Writing Custom Map Canvas Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                52
                             9     MapRenderingandPrinting                                                                                                                                                     53
                                   9.1        Simple Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                             53
                                   9.2        Rendering layers with different CRS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                            54
                                   9.3        Output using print layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                          54
                             10 Expressions, Filtering and Calculating Values                                                                                                                                  57
                                   10.1 Parsing Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                  58
                                   10.2 Evaluating Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                 58
                                   10.3 Handling expression errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                 60
                             11 ReadingAndStoringSettings                                                                                                                                                      61
                             12 Communicatingwiththeuser                                                                                                                                                       63
                                   12.1 Showingmessages. The QgsMessageBar class . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                         63
                                   12.2 Showingprogress                       .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . .                65
                                   12.3 Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                66
                             13 Authentication infrastructure                                                                                                                                                  67
                                   13.1 Introduction                 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . .                68
                                   13.2 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                 68
                                   13.3 QgsAuthManagertheentrypoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                        68
                                   13.4 Adaptplugins to use Authentication infrastructure . . . . . . . . . . . . . . . . . . . . . . . . .                                                                    71
                                   13.5 Authentication GUIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                  71
                             14 Tasks - doing heavy work in the background                                                                                                                                     75
                                   14.1 Introduction                 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . .                75
                                   14.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                 76
                             15 Developing Python Plugins                                                                                                                                                      81
                                   15.1 Structuring Python Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                 81
                                   15.2 CodeSnippets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                   89
                                   15.3 Using Plugin Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                  90
                                   15.4 IDEsettings for writing and debugging plugins . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                    91
                                   15.5 Releasing your plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                  97
                             16 Writing a Processing plugin                                                                                                                                                  101
                             17 Networkanalysis library                                                                                                                                                      103
                                   17.1 General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
                                   17.2 Building a graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
                                   17.3 Graphanalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
                             18 QGISServerPythonPlugins                                                                                                                                                      111
                                   18.1 Server Filter Plugins architecture                            .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . 112
                                   18.2 Raising exception from a plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
                                   18.3 Writing a server plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
                                   18.4 Access control plugin                       .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . 117
                             19 Cheatsheet for PyQGIS                                                                                                                                                        121
                                   19.1 User Interface                  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . 121
                                   19.2 Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
                                   19.3 Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
                                   19.4 Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
                                   19.5 Canvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
                                   19.6 Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
                                   19.7 Table of contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
                                   19.8 AdvancedTOC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
                             ii
The words contained in this file might help you see if this file matches what you are looking for:

...Pyqgisdevelopercookbook release qgisproject mar contents introduction scripting in the python console plugins running code when qgis starts applications technical notes on pyqt and sip loadingprojects loadinglayers vector layers raster qgsproject instance using layer details renderer query values retrieving information about attributes iterating over selecting features modifying spatial index creating appearance symbology of further topics geometryhandling geometry construction access to predicates operations projections support coordinate reference systems crstransformation map canvas embeddingmapcanvas rubber bands vertex markers tools with i writing custom items maprenderingandprinting simple rendering different crs output print layout expressions filtering calculating parsing evaluating...

no reviews yet
Please Login to review.