Bestand wählen
Merken

Seven ways of injecting Python to QGIS

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
this money Mr. Becker beanstalk I work at the Institute of 270 Britain group it's called the it's sad it's not the official that they to but it's a it's a prop company so the I'm gonna talk it a uh non advanced fighter nutraceutical Q gives users so we won't go into any hot core here I want to get everybody so to craft if you this stuff so using a Python enqueued use without writing an applied in this uh several ways we can we can do that where we are focused on the last so free ones Tonya with uh a Python function uh the expression in and how to use a Python and actions and I'm going to quickly run through the the fall on the top we have the console and what will the thank you and they the Council listener In the plug-in menu that's a script when in this useful if you have like a a civil scripture made in and you want to run them and use them as an archive is you can now run despite coach uh when an happens on your project like gold encloses by has a similar sense cervical where we need the drivel ESB below the uh the lakes layer the and you can like a a on the save project events run your coat check if that's true and new comers duties so promising thing well layer has to be in trouble the public on not in this case OK and then the processing framework who is really huge and made into a lot of stuff in there we want to deal with that today so the 1st problem are running so we need to create their uh all tanks that had to be uh rectangular and do that to be dimension to a given tank volume like a sample is like 15 thousand we always think has dimension of 1 . 7 5 meters uh uh to 2nd 5 years in length so
it could be a quite difficult for that that's a measure and perhaps use plug-ins to be able to to draw the 90 degrees uh lines so I come up the solution of creating a custom URI Newsome Python code so when you were updated to tank it uh you when you draw your on your work thank it before it's saved exchange to the correct dimensions this so you i and uh cope observe is code readers and now I just put it for you are work for you to get to get the slides of so let's take a look the so would
destroy the old to all tank we see it could be quite difficult for me to get the right angles and dimensions and the the I came up with this 1 and but on the OK I draw something does matter what it is and the thing strong but in and out pops this uh custom form we I can pick the size the old tank would you can call it T 1 of the now watch this geometry for the take the latter 1 it was not scholar t to all OK and then they can move and rotate and so the correct place so how does this work we the the what would happen up in the properties of fields that would a I can provide my own you soil it's a Parthian what did the you why in a
minute to sign a cold QT
Designer you contraction tracking in the different controls and set up the combo box with the dimensions we and then there's this piece
of code up here this is a text file my Python code and the and form this a method in that file words and that sort of x for take a quick look at the
Fairlea but but but this is the method for moving to find and the features serve what I draw coming in and the Iowa right the OK button there went to my own event and then graph from and the feature the geometry just defined box in the center that's a point uh I get uh with the length of the call tank or from a dictionary down it what we and then create a new geometry and perceptual geometry of feature and then is changed resemble but the but uh this
book goes from from a phenomena that rules was until you in death about how this stuff is working OK the expression and and or the expression a string below is something yourself found many placing duties this tool bar and uh rule-based styles said you can use expressions labels if you calculator been composer labels a great tool so what can we do problem yeah my colleagues and I make the templates for or matching on a put my initials on this post to change into the homes and just the the well least emissions was out on the absent have anything to do with so I thought about adding a new
function to the expression engine to be used by a label composer what would you don't know the expression against so I added a force for G a group and and are able to get the login the person who's left in in the computer we and it's quite easy to have my coding and use a function p but this is a code is just 1 line of Python code get used and it's returned and I can use that in the independent also take it all that
thank you you Mr. what's
this 1 was the uh
we the only way that we will teach
the tenets just by putting in 1 of the the people
and I was
I now no problem I need to get the temperature of a series of the points now how do we convert x y point to watch imager role we go out looking for a REST API we have this open well leave open mapped what is this have the requested at the bottom of the link and adjust the states latitudinal longitude now when I run that expression ya but re Kristin that in a browser it will turn the Jason for me and there was a great you can see this temperature and its and kill and also get the pressure humidity and then at the distance to the nearest weather station to the point then in Python I can drag out the temperature by Trevor down and bottom that's John it we
the to mature a quick look inside you was already a call made ready for that and content you would follow make it a little the I the field calculator
I want update the temperature which point I go in my 1st 50 the temperature of all analysis of help text texture and doesn't take some Paramita it's not valid yet so I need to work to tell it to a uh what kind of from 1 2 Fahrenheit social so kill them so and understood that will for taking if sheets as 51 . 8 system does it on the fly if you put in the sea of we
we we would it returns 12th in the world so the strike getting the degrees Fahrenheit for for the points therefore for focus of I need to work telit which come to to an the current now I will call the year home will map uh . org for each record what we and updates and for the temperature to this very useful a lot of data will and how post through an Everest API fatuous data and you know mythological data all sorts of data With this just a start looking now actions problem we need to access a buddhist review for a given direction solution for all but some type and go to to get the STCW history to take a look at that religious I'll punch
table here the course of the action steps for all you have 1 here called street view looking west what has happened code we just serious you are fall for the street view the y and x is edit when I take on the on the point and then the role of the data is collected and loaded on it and shown the in an image model and collinear so what persistent like go to my actions speaker you looking west
we and I can put it on so all looking east with the so I thought about how bubbling history pupil input but then the graph this look at the planes and next year and I already did make a plug-in has caused a lot better and my actions 1 and 2 what am I actions good is not working in the fields within the thing they're just
to recap a so from in a function where the tank rate was used so the expression in general expression StringBuilder where are we represent our own methods and new group true the expressions uh but the user may work at the temperature from service uh and so cute sections from street view this also service so I like the the idea that you from this quite easy way it can can accesses the wrist implies the yeah and without the the in I saw your scripts of the 3 ball doctorate did you go over how you do that so that they the temperature thing you got the little help they're explain the junction the we all of it's as HTML syntax but so up from the above so for the the we was again the expressions but pointed out so all this is sir states GML written in the method of yeah for the purpose you should example when you open it occupied you to retrieve and a product called and fire whatever description there is there are other types of events that you can bind to as well so advise in into a specific area or after and edit feature that it will automatically trigger something you know of only the quality control of something similar to that the the tank you I wanna wanna process every time a feature that you you knew that this year that what is the self there it is asking if there's other events you can tie into in cages rather than the Open Document course document to basically have a whole bunch of things that you give basic processes there you can also for Lindner validation code and like you you need to work in so this and this and you can also put your evaluation out in front in the in the UI the idea was like if you need to uh at a tank number has to be between a of value you can use control that Spain aided up and down and the min intervals into a lot of the validating out he also but also impact on you can you can validate the input so would you will really can't think we create your own plugin to have in order you tie into which of the injection ways of getting by and which way would you recommend the III like the the expression way way extend expression and for lack of a lot that's what but I mean it Canada depends in this
the animal it's a for this code there are no but all that stuff to the to the slides to get the slide you get the code and where we find find the big secret I'm not sure if affairs force would you will learn compile it up or upward out my homepage EOE many thanks the the but
Prozess <Physik>
Texteditor
Freeware
Hausdorff-Dimension
Spielkonsole
Gruppenoperation
Regulärer Ausdruck
Framework <Informatik>
Eins
Stichprobenumfang
Fokalpunkt
Meter
Skript <Programm>
Spezifisches Volumen
Spielkonsole
Ereignishorizont
Lineares Funktional
Dicke
Datentyp
Prozess <Informatik>
Plug in
Ereignishorizont
Packprogramm
Gruppenoperation
Polygon
Framework <Informatik>
Funktion <Mathematik>
Projektive Ebene
Speicherabzug
Elektronische Publikation
Rechteck
Kategorie <Mathematik>
Hausdorff-Dimension
Plug in
Räumliche Anordnung
Code
Spezifisches Volumen
Rechenschieber
Bildschirmmaske
Minimalgrad
Datenfeld
Körper <Physik>
Funktion <Mathematik>
Rechter Winkel
Code
Räumliche Anordnung
Gerade
Einflussgröße
Virtuelles privates Netzwerk
Bildschirmmaske
Weg <Topologie>
Quader
Hausdorff-Dimension
Gamecontroller
Wort <Informatik>
Elektronische Publikation
Quick-Sort
Code
Computeranimation
Design by Contract
Dicke
Punkt
Quader
Rechter Winkel
Systemaufruf
Räumliche Anordnung
Ereignishorizont
Computeranimation
Cliquenweite
Data Mining
Lineares Funktional
Elektronische Publikation
Regulärer Ausdruck
Computer
Schlussregel
Computer
Rechnen
Hochdruck
Login
Code
Schlussregel
Zeichenkette
Forcing
Körper <Physik>
Funktion <Mathematik>
Login
Strom <Mathematik>
Körpertheorie
Gerade
Zeichenkette
Lipschitz-Bedingung
Computeranimation
Punkt
REST <Informatik>
Browser
Reihe
Regulärer Ausdruck
Binder <Informatik>
Arbeitsplatzcomputer
Computeranimation
Druckverlauf
Funktion <Mathematik>
Arbeitsplatzcomputer
Minimum
Abstand
Bildgebendes Verfahren
Aggregatzustand
Datenfeld
Systemaufruf
Rechnen
Computeranimation
Textur-Mapping
Punkt
Physikalisches System
Hilfesystem
Computeranimation
Analysis
Punkt
Lochstreifen
Google Street View
Gruppenoperation
Fokalpunkt
Code
Quick-Sort
Google Street View
Computeranimation
Gruppenoperation
Richtung
Datensatz
Informationsmodellierung
Minimalgrad
Multikollinearität
Code
Punkt
Bildgebendes Verfahren
Tabelle <Informatik>
Ebene
Prozess <Physik>
Texteditor
Extrempunkt
Spielkonsole
Gruppenoperation
Regulärer Ausdruck
Zahlenbereich
Code
Google Street View
Deskriptive Statistik
Datentyp
Vorlesung/Konferenz
Ereignishorizont
Leistungsbewertung
Umwandlungsenthalpie
Schnelltaste
Lineares Funktional
Prozess <Informatik>
Graph
Plug in
Validität
Plug in
Bitrate
Ein-Ausgabe
Biprodukt
Ereignishorizont
Gruppenoperation
Dienst <Informatik>
Datenfeld
Knotenpunkt
Funktion <Mathematik>
Framework <Informatik>
Flächeninhalt
Offene Menge
Injektivität
Gamecontroller
Garbentheorie
Ordnung <Mathematik>
Aggregatzustand
Rechenschieber
Forcing
Vorlesung/Konferenz
Code
Homepage

Metadaten

Formale Metadaten

Titel Seven ways of injecting Python to QGIS
Serientitel FOSS4G 2014 Portland
Autor Lanstorp, Jakob
Lizenz CC-Namensnennung 3.0 Deutschland:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
DOI 10.5446/31686
Herausgeber FOSS4G, Open Source Geospatial Foundation (OSGeo)
Erscheinungsjahr 2014
Sprache Englisch
Produzent Foss4G
Open Source Geospatial Foundation (OSGeo)
Produktionsjahr 2014
Produktionsort Portland, Oregon, United States of America

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract This presentation will enlighten the novice Python QGIS user with different ways of running Python code in QGIS without the need of building a QGIS Python plugin. Any QGIS user could start writing small Python scripts for automating, customizing and extending QGIS, making their daily workflow an easier and more fun task to complete.-Python through the QGIS Python Console and Script editor: This would be the most obvious place for PyQGIS newcomers. The console and editor comes with syntax highlighting, autocomplete and easy integration to QGIS.-Scriptrunner: A handy plugin for running Python scripts when objects needs to be instantiated.-Extending the Expression engine: Using a startup.py in your .qgis2 Python folder with a @qgsfunction(0, "Python") attribute. An example is shown adding the name of the current user, to a label on a Print Composer composition.-Run script on project event open, close and save: You may want to validate if a certain table is open, and notify the user if it is not, when opening or saving a QGIS project.-Python in QGIS Actions: Extend your QGIS actions with Python code. -Python Init function: A powerful feature in QGIS when creating new features. You can validate and programmatically edit your attribute input. One can also process the newly digitalized geometry. An example is shown creating rectangular oil tanks with predefined dimension.-Processing Framework: Scripting methods from the Processing Framework. Useful when you need to loop or run a batch of commands from the Processing Framework.
Schlagwörter QGIS
Python
fun

Ähnliche Filme

Loading...
Feedback