| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
|
|
||
| = Setting up a Jenkins Build Server = | ||
|
|
||
| **Assumption:** You know how to make a working build environment and want to | ||
| deploy it under Jenkins for continuous integration testing now. | ||
|
|
||
| These notes are terse, I will expand on them later as the need arises. The | ||
| procedure is: | ||
|
|
||
| - Install Jenkins and get it configured according to your own preferences | ||
| - Make sure you have the git, github, junit etc plugins installed. A complete | ||
| list of the plugins I have installed follows (note that you almost certainly | ||
| don't need evey plugin listed here): | ||
| - External Monitor Job Type Plugin | ||
| - LDAP Plugin | ||
| - pam-auth | ||
| - javadoc | ||
| - ant | ||
| - Jenkins Subversion Plug-in | ||
| - Git Plugin | ||
| - Maven 2 Project Plugin | ||
| - Jenkins SLOCCount Plug-in | ||
| - Jenkins Sounds plugin | ||
| - Jenkins Translation Assistance plugin | ||
| - ruby-runtime | ||
| - Jenkins CVS Plug-in | ||
| - Coverage/Complexity Scatter Plot PlugIn | ||
| - Status Monitor Plugin | ||
| - Git Parameter Plug-In | ||
| - github-api | ||
| - GitHub plugin | ||
| - Jenkins Violations plugin | ||
| - git-notes Plugin | ||
| - Twitter plugin | ||
| - Jenkins Cobertura Plugin | ||
| - Jenkins Gravatar plugin | ||
| - Jenkins SSH Slaves plugin | ||
| - Create a Job called 'QGIS' | ||
| - Use the following options for your job: | ||
| - Job Name: QGIS | ||
| - Job Type: Build a free-style software project | ||
| - Tick enable project based security (you need to elsewhere configure your | ||
| Jenkins security to per project settings) | ||
| - Allow Anonymous user Read and Discover access | ||
| - Set the github project to https://github.com/qgis/Quantum-GIS/ | ||
| - Set source code management to Git | ||
| - Set repository url to git://github.com/qgis/Quantum-GIS.git | ||
| - In advanced repository url settings set refspec to : | ||
|
|
||
| ``` | ||
| +refs/heads/master:refs/remotes/origin/master | ||
| ``` | ||
|
|
||
| - Set branch to build to master | ||
| - Repository Browser: Auto | ||
| - Build triggers: set to Poll SCM and set schedule to ``* * * * *`` (polls every minute) | ||
| - Build - Execute shell and set shell script to: | ||
|
|
||
| ``` | ||
| cd build | ||
| cmake .. | ||
| xvfb-run --auto-servernum --server-num=1 \ | ||
| --server-args="-screen 0 1024x768x24" \ | ||
| make Experimental || true | ||
| if [ -f Testing/TAG ] ; then | ||
| xsltproc ../tests/ctest2junix.xsl \ | ||
| Testing/`head -n 1 < Testing/TAG`/Test.xml > \ | ||
| CTestResults.xml | ||
| fi | ||
| ``` | ||
|
|
||
| - Add Junit post build action and set 'Publish Junit test result report' to: | ||
| ``build/CTestResults.xml`` | ||
| - Email notification: Send separate e-mails to individuals who broke the build | ||
| - Jenkins sounds - set up sounds for Failure, Success and Unstable. | ||
| - Save | ||
| - | ||
|
|
||
| Now open the Job dash board and push something to QGIS and wait a minute to | ||
| validate automated builds work. | ||
|
|
||
| **Note:** You will need to log in to the Jenkins user account and go to | ||
| /var/lib/jenkins/jobs/QGIS/workspace, then make a ``build`` directory and run | ||
| the initial cmake setup and then do test build. This process is the same as | ||
| described elsewhere in this doc. | ||
|
|
||
| I based some of the set up from this nice blog article here: | ||
|
|
||
| * http://alexott.blogspot.com/2012/03/jenkins-cmakectest.html |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
|
|
||
|
|
||
| = Setting up the WCS test server on GNU/Linux = | ||
|
|
||
| **Requires:** Ubuntu / Debian derived distro | ||
|
|
||
| These notes are for Ubuntu - other versions and Debian derived distros may | ||
| require slight variations in package names. | ||
|
|
||
| == Preparation == | ||
|
|
||
| Note the git repo below will change to the default QGIS repo once this work | ||
| is integrated into master. | ||
|
|
||
| git remote add blazek git://github.com/blazek/Quantum-GIS.git | ||
| git fetch blazek | ||
| git branch --track wcs2 blazek/wcs2 | ||
| git checkout wcs2 | ||
| cd /var/www/ | ||
| sudo mkdir wcs | ||
| sudo chown timlinux wcs | ||
| cd wcs/ | ||
| mkdir cgi-bin | ||
| cd cgi-bin/ | ||
|
|
||
| == Setup mapserver == | ||
|
|
||
| ```sudo apt-get install cgi-mapserver``` | ||
|
|
||
| Set the contents of cgi-bin/wcstest-1.9.0 to: | ||
|
|
||
| ``` | ||
| #! /bin/sh | ||
| MS_MAPFILE=/var/www/wcs/testdata/qgis-1.9.0/raster/wcs.map | ||
| export MS_MAPFILE | ||
| /usr/lib/cgi-bin/mapserv | ||
| ``` | ||
|
|
||
| Then do: | ||
|
|
||
| ``` | ||
| chmod +x cgi-bin/wcstest-1.9.0 | ||
| mkdir -p /var/www/wcs/testdata/qgis-1.9.0/raster/ | ||
| cd /var/www/wcs/testdata/qgis-1.9.0/raster/ | ||
| cp -r /home/timlinux/Quantum-GIS/tests/testdata/raster/* . | ||
| ``` | ||
|
|
||
| Edit wcs.map and set the shapepath to this: | ||
|
|
||
| ``` | ||
| SHAPEPATH "/var/www/wcs/testdata/qgis-1.9.0/raster" | ||
| ``` | ||
|
|
||
| Then create /var/www/wcs/7-wcs.qgis.org.conf setting the contents to this: | ||
|
|
||
| ``` | ||
| <VirtualHost *:80> | ||
| ServerName wcs.qgis.org | ||
| ServerAdmin tim@linfiniti.com | ||
|
|
||
| LogLevel warn | ||
| LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{forensic-id}n\"" combined | ||
| CustomLog /var/log/apache2/wcs_qgis.org/access.log combined | ||
| ErrorLog /var/log/apache2/wcs_qgis.org/error.log | ||
|
|
||
| DocumentRoot /var/www/wcs/html | ||
|
|
||
| ScriptAlias /cgi-bin/ /var/www/wcs/cgi-bin/ | ||
| <Directory "/var/www/wcs/cgi-bin"> | ||
| AllowOverride None | ||
| Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch | ||
| Order allow,deny | ||
| Allow from all | ||
| </Directory> | ||
|
|
||
| RewriteEngine on | ||
| RewriteRule /1.9.0/wcs /cgi-bin/wcstest-1.9.0 [PT] | ||
|
|
||
| </VirtualHost> | ||
| ``` | ||
|
|
||
| == Create a home page == | ||
|
|
||
| ``` | ||
| mkdir html | ||
| vim html/index.html | ||
| ``` | ||
|
|
||
| Set the contents to: | ||
|
|
||
| ``` | ||
| This is the test platform for QGIS' wcs client. You can use these services | ||
| from QGIS directly (to try out WCS for example) by pointing your QGIS to: | ||
| http://wcs.qgis.org/1.9.0/wcs | ||
| ``` | ||
|
|
||
|
|
||
| == Now deploy it == | ||
|
|
||
| ``` | ||
| sudo mkdir /var/log/apache2/wcs_qgis.org | ||
| sudo chown www-data /var/log/apache2/wcs_qgis.org | ||
| cd /etc/apache2/sites-available/ | ||
| sudo ln -s /var/www/wcs/7-wcs.qgis.org.conf . | ||
| cd /var/www/wcs/ | ||
| sudo a2ensite 7-wcs.qgis.org.conf | ||
| sudo /etc/init.d/apache2 reload | ||
| ``` | ||
|
|
||
| == Debugging == | ||
|
|
||
| ``` | ||
| sudo tail -f /var/log/apache2/wcs_qgis.org/error.log | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
|
|
||
| IF (WITH_DESKTOP) | ||
| FILE (GLOB ICONS *.icns) | ||
| INSTALL (FILES ${ICONS} | ||
| DESTINATION ${CMAKE_INSTALL_PREFIX}/../Resources) | ||
|
|
||
| ADD_SUBDIRECTORY(browser) | ||
| ENDIF (WITH_DESKTOP) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
|
|
||
| FILE (GLOB ICONS *.icns) | ||
| INSTALL (FILES ${ICONS} | ||
| DESTINATION "${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/QGIS Browser.app/Contents/Resources") | ||
| # create alias now, so alias file gets correct icon | ||
| INSTALL (CODE "EXECUTE_PROCESS(COMMAND osascript -e \"tell application \\\"Finder\\\" to make alias file to POSIX file \\\"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/QGIS Browser.app\\\" at POSIX file \\\"$ENV{DESTDIR}${QGIS_INSTALL_PREFIX}/\\\"\")") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>CFBundleDevelopmentRegion</key> | ||
| <string>English</string> | ||
| <key>CFBundleName</key> | ||
| <string>QGIS Browser</string> | ||
| <key>CFBundleIdentifier</key> | ||
| <string>org.qgis.qgis</string> | ||
| <key>CFBundleExecutable</key> | ||
| <string>QGIS Browser</string> | ||
| <key>CFBundlePackageType</key> | ||
| <string>APPL</string> | ||
| <key>CFBundleSignature</key> | ||
| <string>QGSB</string> | ||
| <key>CFBundleGetInfoString</key> | ||
| <string>${QGIS_APP_NAME} Browser ${COMPLETE_VERSION}-${RELEASE_NAME} (${REVISION}), © 2002-2012 QGIS Development Team</string> | ||
| <key>CFBundleShortVersionString</key> | ||
| <string>${COMPLETE_VERSION}</string> | ||
| <key>CFBundleVersion</key> | ||
| <string>${COMPLETE_VERSION} (${REVISION})</string> | ||
| <key>CFBundleIconFile</key> | ||
| <string>qgisb.icns</string> | ||
| <key>CFBundleInfoDictionaryVersion</key> | ||
| <string>6.0</string> | ||
| <key>CSResourcesFileMapped</key> | ||
| <true/> | ||
| <key>CFBundleLocalizations</key> | ||
| <array> | ||
| <string>en</string> | ||
| <string>af</string> | ||
| <string>ar</string> | ||
| <string>bg</string> | ||
| <string>ca_ES</string> | ||
| <string>cs_CZ</string> | ||
| <string>da_DK</string> | ||
| <string>de</string> | ||
| <string>el_GR</string> | ||
| <string>es</string> | ||
| <string>fa</string> | ||
| <string>fi</string> | ||
| <string>fr</string> | ||
| <string>gl_ES</string> | ||
| <string>he</string> | ||
| <string>hr_HR</string> | ||
| <string>hu</string> | ||
| <string>id</string> | ||
| <string>is</string> | ||
| <string>it</string> | ||
| <string>ja</string> | ||
| <string>ka_GE</string> | ||
| <string>ko_KR</string> | ||
| <string>lo</string> | ||
| <string>lt</string> | ||
| <string>lv</string> | ||
| <string>mn</string> | ||
| <string>nl</string> | ||
| <string>no</string> | ||
| <string>pl_PL</string> | ||
| <string>pt_BR</string> | ||
| <string>pt_PT</string> | ||
| <string>ro</string> | ||
| <string>ru</string> | ||
| <string>sk</string> | ||
| <string>sl_SI</string> | ||
| <string>sq_AL</string> | ||
| <string>sr_CS-Latn</string> | ||
| <string>sv</string> | ||
| <string>ta</string> | ||
| <string>th</string> | ||
| <string>tr</string> | ||
| <string>uk</string> | ||
| <string>vi</string> | ||
| <string>xh</string> | ||
| <string>zh_CN</string> | ||
| <string>zh_TW</string> | ||
| </array> | ||
| </dict> | ||
| </plist> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| class QgsRasterResampleFilter | ||
| { | ||
| %TypeHeaderCode | ||
| #include "qgsrasterresamplefilter.h" | ||
| %End | ||
|
|
||
| public: | ||
| QgsRasterResampleFilter( QgsRasterFace* input = 0 ); | ||
| ~QgsRasterResampleFilter(); | ||
|
|
||
| void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height ); | ||
|
|
||
| /**Set resampler for zoomed in scales. Takes ownership of the object*/ | ||
| void setZoomedInResampler( QgsRasterResampler* r ); | ||
| const QgsRasterResampler* zoomedInResampler(); | ||
|
|
||
| /**Set resampler for zoomed out scales. Takes ownership of the object*/ | ||
| void setZoomedOutResampler( QgsRasterResampler* r ); | ||
| const QgsRasterResampler* zoomedOutResampler() const; | ||
|
|
||
| void setMaxOversampling( double os ); | ||
| double maxOversampling() const; | ||
|
|
||
| virtual void writeXML( QDomDocument& doc, QDomElement& parentElem ) const = 0; | ||
|
|
||
| /**Sets base class members from xml. Usually called from create() methods of subclasses*/ | ||
| void readXML( const QDomElement& rendererElem ); | ||
| }; | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
|
|
||
| class QgsRasterFormatSaveOptionsWidget : QWidget | ||
| { | ||
| %TypeHeaderCode | ||
| #include <qgsrasterformatsaveoptionswidget.h> | ||
| %End | ||
|
|
||
| public: | ||
|
|
||
| enum Type | ||
| { | ||
| Default, // everything except profile buttons (save as dlg) | ||
| Full, // everything (options dlg) | ||
| Table, // just table | ||
| LineEdit // just the line edit | ||
| }; | ||
|
|
||
| QgsRasterFormatSaveOptionsWidget( QWidget* parent = 0, QString format = "GTiff", | ||
| QgsRasterFormatSaveOptionsWidget::Type type = Default, | ||
| QString provider = "gdal" ); | ||
| ~QgsRasterFormatSaveOptionsWidget(); | ||
|
|
||
| void setFormat( QString format ); | ||
| void setProvider( QString provider ); | ||
| QStringList options() const; | ||
| void setType( QgsRasterFormatSaveOptionsWidget::Type type = Default ); | ||
|
|
||
| public slots: | ||
|
|
||
| void apply(); | ||
| void helpOptions(); | ||
| bool validateOptions( bool gui = true ); | ||
|
|
||
| private slots: | ||
|
|
||
| void on_mProfileNewButton_clicked(); | ||
| void on_mProfileDeleteButton_clicked(); | ||
| void on_mProfileResetButton_clicked(); | ||
| void on_mOptionsAddButton_clicked(); | ||
| void on_mOptionsDeleteButton_clicked(); | ||
| void on_mOptionsLabel_clicked(); | ||
| void on_mOptionsLineEdit_editingFinished(); | ||
| void optionsTableChanged(); | ||
| void optionsTableEnableDeleteButton(); | ||
| void updateOptions(); | ||
| void swapOptionsUI( int newIndex = -1 ); | ||
|
|
||
| private: | ||
|
|
||
| QString settingsKey( QString profile ) const; | ||
| QString currentProfileKey() const; | ||
| QString createOptions( QString profile ) const; | ||
| void deleteCreateOptions( QString profile ); | ||
| void setCreateOptions( ); | ||
| void setCreateOptions( QString profile, QString options ); | ||
| void setCreateOptions( QString profile, QStringList list ); | ||
| QStringList profiles() const; | ||
| void updateProfiles(); | ||
| bool eventFilter(QObject *obj, QEvent *event); | ||
|
|
||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>Funktion $area</h3> | ||
| Liefert den Flächeninhalt des aktuellen Objekts | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$area</pre> | ||
|
|
||
| <h4>Argumente</h4> | ||
| Keine | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <pre>$area → 4711.42</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>$area function</h3> | ||
| Returns the area size of the current feature. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$area</pre> | ||
|
|
||
| <h4>Arguments</h4> | ||
| None | ||
|
|
||
| <h4>Example</h4> | ||
| <pre>$area → 42</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>Funktion $id</h3> | ||
| Liefert die Feature-ID des aktuellen Objekts zurück. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$id</pre> | ||
|
|
||
| <h4>Argumente</h4> | ||
| Keine | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <pre>$id → 42</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>$id function</h3> | ||
| Returns the feature id of the current row. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$id</pre> | ||
|
|
||
| <h4>Arguments</h4> | ||
| None | ||
|
|
||
| <h4>Example</h4> | ||
| <pre>$id → 42</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>Funktion $length</h3> | ||
| Liefert die Länge der aktuellen Geometrie. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$length</pre> | ||
|
|
||
| <h4>Argumente</h4> | ||
| Keine | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <pre>$length → 42.4711</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>$length function</h3> | ||
| Returns the length the current feature. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$length</pre> | ||
|
|
||
| <h4>Arguments</h4> | ||
| None | ||
|
|
||
| <h4>Example</h4> | ||
| <pre>$length → 42.4711</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <h3>Funktion $now</h3> | ||
| Ergibt aktuelles Datum und Zeit | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$now</pre> | ||
|
|
||
| <h4>Argumente</h4> | ||
| Keine | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <pre>$now → 2012-07-22T13:24:57</pre> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>$now function</h3> | ||
| Returns the current date and time | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$now</pre> | ||
|
|
||
| <h4>Arguments</h4> | ||
| None | ||
|
|
||
| <h4>Example</h4> | ||
| <pre>$now → 2012-07-22T13:24:57</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>Funktion $perimeter</h3> | ||
| Liefert den Umfang des aktuellen Objekts zurück. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$perimeter</pre> | ||
|
|
||
| <h4>Argumente</h4> | ||
| Keine | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <pre>$perimeter → 42</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>$perimeter function</h3> | ||
| Returns the perimeter length of the current feature. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$perimeter</pre> | ||
|
|
||
| <h4>Arguments</h4> | ||
| None | ||
|
|
||
| <h4>Example</h4> | ||
| <pre>$perimeter → 42</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <h3>Funktion $rownum</h3> | ||
| Ergibt die Zeilennummer des aktuellen Datensatzes | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$rownum</pre> | ||
|
|
||
| <h4>Argumente</h4> | ||
| Keine | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <pre>$rownum → 4711</pre> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>$rownum function</h3> | ||
| Returns the number of the current row. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$rownum</pre> | ||
|
|
||
| <h4>Arguments</h4> | ||
| None | ||
|
|
||
| <h4>Example</h4> | ||
| <pre>$rownum → 4711</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>Funktion $x</h3> | ||
| Liefert die X-Koordinate des aktuellen Punkts zurück. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$x</pre> | ||
|
|
||
| <h4>Argumente</h4> | ||
| Keine | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <pre>$x → 42</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>$x function</h3> | ||
| Returns the x coordinate of the current feature. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$x</pre> | ||
|
|
||
| <h4>Arguments</h4> | ||
| None | ||
|
|
||
| <h4>Example</h4> | ||
| <pre>$x → 42</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>Funktion $y</h3> | ||
| Liefert die Y-Koordinate des aktuellen Objekts zurück. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$y</pre> | ||
|
|
||
| <h4>Argumente</h4> | ||
| Keine | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <pre>$y → 42</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3>$y function</h3> | ||
| Returns the y coordinate of the current feature. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre>$y</pre> | ||
|
|
||
| <h4>Arguments</h4> | ||
| None | ||
|
|
||
| <h4>Example</h4> | ||
| <pre>$y → 42</pre> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <h3>Gruppe Bedingungen</h3> | ||
| Dies Gruppe enthält Funktionen die mit Bedingungen umgehen. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <h3>CASE Ausdruck</h3> | ||
| Ist ein bedingter Ausdruck mit dem mehrere Ausdrücken ausgewertet und ein | ||
| Ergebnis zurückgegeben werden kann. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre> | ||
| CASE | ||
| WHEN <i>bedingung</i> THEN <i>ergebnis</i> | ||
| [ ...n ] | ||
| [ ELSE <i>ergebnis</i> ] | ||
| END | ||
| </pre> | ||
| [ ] markiert optionale Komponenten | ||
|
|
||
| <h4>Argumente</h4> | ||
| <!-- List args for functions here--> | ||
| <i> WHEN bedingung</i> - Der Bedingungsausdruck. <br> | ||
| <i> THEN ergebnis</i> - Wenn die <i>bedingung</i> True ergibt, wird der Ausdruck <i>ergebnis</i> ausgewertet und zurückgegeben. <br> | ||
| <i> ELSE ergebnis</i> - Wenn keine der Bedingungen erfüllt ist, wird der Ausdruck <i>ergebnis</i> ausgewertet und zurückgegeben. <br> | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <!-- Show example of function.--> | ||
| <pre> | ||
| CASE | ||
| WHEN <i>"column" IS NULL</i> THEN <i>'Leer'</i> | ||
| ELSE <i>"column"</i> | ||
| END | ||
| </pre> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <h3>CASE expression</h3> | ||
| A conditional expression that can be used to evaluate multiple expressions and | ||
| return a result. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre> | ||
| CASE | ||
| WHEN <i>condition</i> THEN <i>result</i> | ||
| [ ...n ] | ||
| [ ELSE <i>result</i> ] | ||
| END | ||
| </pre> | ||
| [ ] marks optional components | ||
|
|
||
| <h4>Arguments</h4> | ||
| <!-- List args for functions here--> | ||
| <i> WHEN condition</i> - The condition expression to evaluate. <br> | ||
| <i> THEN result</i> - If <i>condition</i> evaluates to True then <i>result</i> is evaluated and returned. <br> | ||
| <i> ELSE result</i> - If none of the above conditions evaluated to True then <i>result</i> is evaluated and returned. <br> | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <pre> | ||
| CASE | ||
| WHEN <i>"column" IS NULL</i> THEN <i>'None'</i> | ||
| ELSE <i>"column"</i> | ||
| END | ||
| </pre> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| <h3>CASE Ausdruck</h3> | ||
| Ist ein bedingter Ausdruck mit dem mehrere Ausdrücken ausgewertet und ein | ||
| Ergebnis zurückgegeben werden kann. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre> | ||
| CASE | ||
| WHEN <i>bedingung</i> THEN <i>ergebnis</i> | ||
| [ ...n ] | ||
| [ ELSE <i>ergebnis</i> ] | ||
| END | ||
| </pre> | ||
| [ ] markiert optionale Komponenten | ||
|
|
||
| <h4>Argumente</h4> | ||
| <!-- List args for functions here--> | ||
| <i> WHEN bedingung</i> - Der Bedingungsausdruck. <br> | ||
| <i> THEN ergebnis</i> - Wenn die <i>bedingung</i> True ergibt, wird der Ausdruck <i>ergebnis</i> ausgewertet und zurückgegeben. <br> | ||
| <i> ELSE ergebnis</i> - Wenn keine der Bedingungen erfüllt ist, wird der Ausdruck <i>ergebnis</i> ausgewertet und zurückgegeben. <br> | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <!-- Show example of function.--> | ||
| <pre> | ||
| CASE | ||
| WHEN <i>"column" IS NULL</i> THEN <i>'Leer'</i> | ||
| END | ||
| </pre> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| <h3>CASE expression</h3> | ||
| A conditional expression that can be used to evaluate multiple expressions and | ||
| return a result. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <pre> | ||
| CASE | ||
| WHEN <i>condition</i> THEN <i>result</i> | ||
| [ ...n ] | ||
| [ ELSE <i>result</i> ] | ||
| END | ||
| </pre> | ||
| [ ] marks optional components | ||
|
|
||
| <h4>Arguments</h4> | ||
| <!-- List args for functions here--> | ||
| <i> WHEN condition</i> - The condition expression to evaluate. <br> | ||
| <i> THEN result</i> - If <i>condition</i> evaluates to True then <i>result</i> is evaluated and returned. <br> | ||
| <i> ELSE result</i> - If none of the above conditions evaluated to True then <i>result</i> is evaluated and returned. <br> | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <pre> | ||
| CASE | ||
| WHEN <i>"column" IS NULL</i> THEN <i>'None'</i> | ||
| END | ||
| </pre> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| FILE(GLOB HELP_FILES *-*) | ||
|
|
||
| INSTALL(FILES ${HELP_FILES} DESTINATION ${QGIS_DATA_DIR}/resources/function_help) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <h3>Conditions Group</h3> | ||
| This group contains functions that operate on condition. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <h3>Date and Time Group</h3> | ||
| This group contains functions for handling date and time data. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <h3>Gruppe Datensatz</h3> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <h3>Datum- und Zeitgruppe</h3> | ||
| Diese Gruppe enthält Funktionen zur Verarbeitung von Daten und Zeiten. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| <h3>Gruppe Geometrie</h3> | ||
| Dies Gruppe enthält Funktionen für Geometrieobjekten (z.B. Länge und Flächeninhalt). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| <h3>Gruppe Mathematik</h3> | ||
| Die Gruppe enthält mathematische Funktionen (z.B. Quadratwurzel, Sinus und Cosinus) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| <h3>Gruppe Operatoren</h3> | ||
| Die Gruppe enthält Operatoren (z.B. +, - und *) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| <h3>Gruppe Zeichenketten</h3> | ||
| Dies Gruppen enthält Funktionen für Zeichenketten (z.B. Ersetzen und in Großbuchstaben umwandeln). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| <h3>Funktion age()</h3> | ||
| Gibt den Unterschied zwischen zwei Daten zurück. | ||
| <br><br> | ||
| Der Unterschied wird als <code>Intervall</code> zurückgegeben | ||
| und muß mit folgenden Funktionen weiterverarbeitet werde, um | ||
| sinnvolle Informationen zu erhalten: | ||
| ><code>year</code> | ||
| <li><code>month</code> | ||
| <li><code>week</code> | ||
| <li><code>day</code> | ||
| <li><code>hour</code> | ||
| <li><code>minute</code> | ||
| <li><code>second</code> | ||
| </ul> | ||
| <h4>Syntax</h4> | ||
| <code>age(zeichenkette,zeichenkette)</code><br> | ||
| <code>age(datetime,datetime)</code><br> | ||
| <code>age(zeichenkette,datetime)</code><br> | ||
| <code>age(datetime,zeichenkette)</code><br> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>zeichenkette</code> - ist string. Eine Zeichenkette in Datumsformat. <br> | ||
| <code>datetime</code> - ist date oder datetime. Eine Datums oder eine Zeit. | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <!-- Show example of function.--> | ||
| <code>age('2012-05-12','2012-05-2') → Intervall</code><br> | ||
| <code>day</code> benutzen um die Anzahl der Tage zur bestimmen<br> | ||
| <code>day(age('2012-05-12','2012-05-2')) → 10</code><br> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| <h3>age() function</h3> | ||
| Returns the difference between two dates. | ||
| <br><br> | ||
| The difference is returned as a <code>Interval</code> | ||
| and needs to be used with one of the following functions | ||
| in order to extract useful information: | ||
| <ul> | ||
| <li><code>year</code> | ||
| <li><code>month</code> | ||
| <li><code>week</code> | ||
| <li><code>day</code> | ||
| <li><code>hour</code> | ||
| <li><code>minute</code> | ||
| <li><code>second</code> | ||
| </ul> | ||
| <h4>Syntax</h4> | ||
| <code>age(string,string)</code><br> | ||
| <code>age(datetime,datetime)</code><br> | ||
| <code>age(string,datetime)</code><br> | ||
| <code>age(datetime,string)</code><br> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>string</code> - is string. A string in date format. | ||
| <br> | ||
| <code>datetime</code> - is date or datetime. A date or datetime type. | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <code>age('2012-05-12','2012-05-2') → Interval</code><br> | ||
| use <code>day</code> to extract number of days<br> | ||
| <code>day(age('2012-05-12','2012-05-2')) → 10</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <h3>Funktion concat()</h3> | ||
| Fügt Zeichenketten zu einer zusammen. | ||
|
|
||
| <p><h4>Syntax</h4> | ||
| substr(<i>zeichenkette<i>[, <i>zeichenkette</i>...])</p> | ||
|
|
||
| <p><h4>Argumente</h4> | ||
| <!-- List args for functions here--> | ||
| <i> zeichenkette</i> → ist string. Ein Zeichenkette.<br> | ||
|
|
||
| <p><h4>Beispiel</h4> | ||
| <!-- Show example of function.--> | ||
| concat('a','b','c','d','e') → 'abcde'</p> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <h3>concat() function</h3> | ||
| Concatenates several strings to one. | ||
|
|
||
| <h4>Syntax</h4> | ||
| concat(<i>string<i>[,<i>string</i>...]) | ||
|
|
||
| <h4>Arguments</h4> | ||
| <!-- List args for functions here--> | ||
| <i> string</i> → is string. a string.<br> | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| concat('a','b','c','d','e') → 'abcde' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <h3>Funktion day()</h3> | ||
| Tag eines Datum oder Anzahl der Tage eines <code>Intervalls</code>. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>day(date)</code><br> | ||
| <code>day(Intervall)</code><br> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>date</code> - ist date oder datetime. Das Datum oder die Zeit dessen Tag bestimmt werden soll. | ||
| <br> | ||
| <code>Interval</code> - ist Interval. Das Interval aus dem die Anzahl der Tage bestimmt werden soll. | ||
|
|
||
| <h4>Beispiele</h4> | ||
| <!-- Show example of function.--> | ||
| <code>day('2012-05-12') → 12</code><br> | ||
| <code>day(tointerval('3 days')) → 3</code><br> | ||
| <code>day(age('2012-01-01','2010-01-01')) → 730</code><br> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <h3>day() function</h3> | ||
| Extract the day from a date, or the number of days | ||
| from a <code>Interval</code> | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>day(date)</code><br> | ||
| <code>day(Interval)</code><br> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>date</code> - is date or datetime. The date to extract the day from. | ||
| <br> | ||
| <code>Interval</code> - is Interval. The Interval to return the number of days from. | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <code>day('2012-05-12') → 12</code><br> | ||
| <code>day(tointerval('3 days')) → 3</code><br> | ||
| <code>day(age('2012-01-01','2010-01-01')) → 730</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <h3>Funktion hour()</h3> | ||
| Bestimmt die Stunde eines Datums/Zeit oder die Anzahl der Stunden | ||
| aus einem <code>Intervall</code> | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>hour(datetime)</code><br> | ||
| <code>hour(Intervall)</code><br> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>date</code> - ist date oder datetime. Das Datum/die Zeit dessen Stunde bestimmt werden soll. | ||
| <br> | ||
| <code>Intervall</code> - ist Interval. Das Intervall aus der die Stundenzahl bestimmt werden soll. | ||
|
|
||
| <h4>Beispiele</h4> | ||
| <!-- Show example of function.--> | ||
| <code>hour('2012-07-22T13:24:57') → 13</code><br> | ||
| <code>hour(tointerval('3 hours')) → 3</code><br> | ||
| <code>hour(age('2012-07-22T13:00:00','2012-07-22T10:00:00')) → 3</code><br> | ||
| <code>hour(age('2012-01-01','2010-01-01')) → 17520</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <h3>hour() function</h3> | ||
| Extract the hour from a datetime or time, or the number of hours | ||
| from a <code>Interval</code> | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>hour(datetime)</code><br> | ||
| <code>hour(Interval)</code><br> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>date</code> - is datetime or time. The date to extract the hour from. | ||
| <br> | ||
| <code>Interval</code> - is Interval. The Interval to return the number of hours from. | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <code>hour('2012-07-22T13:24:57') → 13</code><br> | ||
| <code>hour(tointerval('3 hours')) → 3</code><br> | ||
| <code>hour(age('2012-07-22T13:00:00','2012-07-22T10:00:00')) → 3</code><br> | ||
| <code>hour(age('2012-01-01','2010-01-01')) → 17520</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <h3>Funktion left()</h3> | ||
| Ergibt ersten <i>n</i> Zeichen von links. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>left(zeichenkette, laenge)</code><br> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>zeichenkette</code> - ist eine Zeichenkette. Die Zeichenkette. | ||
| <br> | ||
| <code>laenge</code> - ist eine Zahl. Die Anzahl der zurückzugebenden Zeichen. | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <!-- Show example of function.--> | ||
| <code>left('Hallo Welt',5) → 'Hallo'</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <h3>left() function</h3> | ||
| Returns a substring that contains the <i>n</i> leftmost characters of the string. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>left(string, length)</code><br> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>string</code> - is string. The string. | ||
| <br> | ||
| <code>length</code> - is int. The number of characters from the left to return. | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <code>left('Hello World',5) → 'Hello'</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <h3>Funktion lpad()</h3> | ||
| Ergibt eine mit einem am Ende mit einem Zeichen auf eine bestimmte Länge aufgefüllte Zeichenkette. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>lpad(zeichenkette, laenge, fuellzeichen)</code><br> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>zeichenkette</code> - ist string. Die Zeichenkette. | ||
| <br> | ||
| <code>laenge</code> - ist int. Die Länge der neuen Zeichenkette. | ||
| <br> | ||
| <code>fuellzeichen</code> - ist char. Das Zeichen mit dem die Zeichenkette am Ende aufgefüllt werden soll. | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <code>lpad('Hallo', 10, 'x') → 'Halloxxxxx'</code><br> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <h3>lpad() function</h3> | ||
| Returns a string with supplied width padded | ||
| using the fill character. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>lpad(string, length, fill)</code><br> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>string</code> - is string. The string. | ||
| <br> | ||
| <code>length</code> - is int. The length of the new string. | ||
| <br> | ||
| <code>fill</code> - is char. The character to padd the remaining space with. | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <code>lpad('Hello', 10, 'x') → 'Helloxxxxx'</code><br> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <h3>Funktion minute()</h3> | ||
| Bestimmt die Minute eines Datums/Zeit oder die Anzahl der Minuten | ||
| eines <code>Intervalls</code> | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>minute(datetime)</code><br> | ||
| <code>minute(Intervall)</code><br> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>datetime</code> - ist datetime oder time. Das Datum aus der die Minute bestimmt werden soll.<br> | ||
| <code>Interval</code> - is Interval. Das Intervall aus dem die Minutenanzahl bestimmt werden soll. | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <!-- Show example of function.--> | ||
| <code>minute('2012-07-22T13:24:57') → 24</code><br> | ||
| <code>minute(tointerval('3 minutes')) → 3</code><br> | ||
| <code>minute(age('2012-07-22T00:20:00','2012-07-22T00:00:00')) → 20</code><br> | ||
| <code>minute(age('2012-01-01','2010-01-01')) → 1051200</code><br> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <h3>minute() function</h3> | ||
| Extract the minute from a datetime or time, or the number of minutes | ||
| from a <code>Interval</code> | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>minute(datetime)</code><br> | ||
| <code>minute(Interval)</code><br> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>date</code> - is datetime or time. The date to extract the minute from. | ||
| <br> | ||
| <code>Interval</code> - is Interval. The Interval to return the number of minutes from. | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <code>minute('2012-07-22T13:24:57') → 24</code><br> | ||
| <code>minute(tointerval('3 minutes')) → 3</code><br> | ||
| <code>minute(age('2012-07-22T00:20:00','2012-07-22T00:00:00')) → 20</code><br> | ||
| <code>minute(age('2012-01-01','2010-01-01')) → 1051200</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <h3>month() function</h3> | ||
| Bestimmt den Monat eines Datums/Zeit oder die Anzahl der Monate | ||
| aus einem <code>Intervall</code> | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>month(date)</code><br> | ||
| <code>month(Intervall)</code><br> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>date</code> - ist date oder datetime. Das Datum aus dem der Monat bestimmt werden soll.<br> | ||
| <code>Interval</code> - ist Interval. Das Intervall dessen Monatsanzahl zurückgegeben werden soll. | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <!-- Show example of function.--> | ||
| <code>month('2012-05-12') → 05</code><br> | ||
| <code>month(tointerval('3 months')) → 3</code><br> | ||
| <code>month(age('2012-01-01','2010-01-01')) → 4.033...</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <h3>month() function</h3> | ||
| Extract the month part from a date, or the number of months | ||
| from a <code>Interval</code> | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>month(date)</code><br> | ||
| <code>month(Interval)</code><br> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>date</code> - is date or datetime. The date to extract the month from. | ||
| <br> | ||
| <code>Interval</code> - is Interval. The Interval to return the number of months from. | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <code>month('2012-05-12') → 05</code><br> | ||
| <code>month(tointerval('3 months')) → 3</code><br> | ||
| <code>month(age('2012-01-01','2010-01-01')) → 4.033...</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <h3>Funktion regexp_replace()</h3> | ||
| Liefert eine Zeichenkette in der der angegebene reguläre Ausdruck ersetzt wurde. | ||
|
|
||
| <p><h4>Syntax</h4> | ||
| regexp_replace(<i>a</i>, <i>streiche</i>, <i>setze</i>) | ||
|
|
||
| <p><h4>Argumente</h4> | ||
| <!-- List args for functions here--> | ||
| <i>a</i> → ist string. Die ursprüngliche Zeichenkette.<br> | ||
| <i>streiche</i> → ist string. Die zu ersetzende reguläre Ausdruck.<br> | ||
| <i>setze</i> → ist string. Die Zeichenkette durch die <i>streiche</i> ersetzt werden soll<br></p> | ||
|
|
||
| <p><h4>Beispiel</h4> | ||
| <!-- Show example of function.--> | ||
| <pre>regexp_replace('QGIS SHOULD ROCK','(SHOULD)','DOES (was:\1)')</pre> → 'QGIS DOES (was: SHOULD) ROCK' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <h3>regexp_replace() function</h3> | ||
| Returns a string with the supplied regular expression replaced. | ||
|
|
||
| <p><h4>Syntax</h4> | ||
| replace(<i>string,before,after</i>)</p> | ||
|
|
||
| <p><h4>Arguments</h4> | ||
| <!-- List args for functions here--> | ||
| <i> string</i> → is string. The start string.<br> | ||
| <i> before</i> → is string. The string to replace.<br> | ||
| <i> after</i> → is string. The string that will replace <i>before</i><br></p> | ||
|
|
||
| <p><h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| replace('QGIS SHOULD ROCK','SHOULD','DOES') → 'QGIS DOES ROCK'</p> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <h3>Funktion right()</h3> | ||
| Ergibt letzten <i>n</i> Zeichen von rechts. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>right(zeichenkette,laenge)</code><br> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>string</code> - ist string. Die Zeichenkette. | ||
| <br> | ||
| <code>laenge</code> - ist int. Die Anzahl der von rechts zurückzugebenden Zeichen von rechts. | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <!-- Show example of function.--> | ||
| <code>right('Hallo Welt',4) → 'Welt'</code><br> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <h3>right() function</h3> | ||
| Returns a substring that contains the <i>n</i> rightmost characters of the string. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>right(string, pos)</code><br> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>string</code> - is string. The string. | ||
| <br> | ||
| <code>length</code> - is int. The numbder of characters from the right to return. | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <code>right('Hello World',5) → 'World'</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <h3>Funktion rpad()</h3> | ||
| Ergibt eine mit einem am Anfang mit einem Zeichen auf eine bestimmte Länge aufgefüllte Zeichenkette. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>rpad(zeichenkette, laenge, fuellzeichen)</code><br> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>zeichenkette</code> - ist string. Die Zeichenkette. <br> | ||
| <code>laenge</code> - ist int. Die Länge der neuen Zeichenkette. <br> | ||
| <code>fuellzeichen</code> - ist char. Das Zeichen mit dem die Zeichenkette aufgefüllt werden soll. | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <!-- Show example of function.--> | ||
| <code>rpad('Hallo', 10, 'x') → 'xxxxxHallo'</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <h3>rpad() function</h3> | ||
| Returns a string with supplied width padded | ||
| using the fill character. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>rpad(string, width, fill)</code><br> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>string</code> - is string. The string. | ||
| <br> | ||
| <code>width</code> - is int. The length of the new string. | ||
| <br> | ||
| <code>fill</code> - is char. The character to padd the remaining space with. | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <code>rpad('Hello', 10, 'x') → 'xxxxxHello'</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <h3>Funktion second()</h3> | ||
| Bestimmt die Sekunde eines Datums/Zeit oder die Anzahl der Sekunden | ||
| aus einem <code>Intervall</code> | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>second(datetime)</code><br> | ||
| <code>second(Intervall)</code><br> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>date</code> - ist datetime oder time. Das Datum dessen Sekunden bestimmt werden sollen.<br> | ||
| <code>Intervall</code> - ist Interval. Ergib die Intervalllänge in Sekunden. | ||
|
|
||
| <h4>Beispiele</h4> | ||
| <!-- Show example of function.--> | ||
| <code>second('2012-07-22T13:24:57') → 57</code><br> | ||
| <code>second(tointerval('3 seconds')) → 3</code><br> | ||
| <code>second(age('2012-07-22T00:20:00','2012-07-22T00:00:00')) → 1200</code><br> | ||
| <code>second(age('2012-01-01','2010-01-01')) → 63072000</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <h3>second() function</h3> | ||
| Extract the seconds from a datetime or time, or the number of seconds | ||
| from a <code>Interval</code> | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>second(datetime)</code><br> | ||
| <code>second(Interval)</code><br> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>date</code> - is datetime or time. The date to extract the second from. | ||
| <br> | ||
| <code>Interval</code> - is Interval. The Interval to return the number of seconds from. | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <code>second('2012-07-22T13:24:57') → 57</code><br> | ||
| <code>second(tointerval('3 seconds')) → 3</code><br> | ||
| <code>second(age('2012-07-22T00:20:00','2012-07-22T00:00:00')) → 1200</code><br> | ||
| <code>second(age('2012-01-01','2010-01-01')) → 63072000</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <h3>Funktion strpos()</h3> | ||
| Bestimmt die Position eines regulären Ausdrucks in einer Zeichenkette. | ||
|
|
||
| <h4>Syntax</h4> | ||
| strpos(<i>heuhaufen<i>,<i>nadel</i>) | ||
| <br><br> | ||
| Gibt -1 zurück, wenn der Ausdruck nicht gefunden wurde. | ||
|
|
||
| <h4>Argumente</h4> | ||
| <!-- List args for functions here--> | ||
| <i> heuhaufen</i> → ist string. Zeichenkette in der gesucht werden soll.<br> | ||
| <i> nadel</i> → ist string. Der gesuchte reguläre Ausdruck.<br> | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <!-- Show example of function.--> | ||
| strpos('HELLO WORLD','WORLD') → 6<br> | ||
| strpos('HELLO WORLD','GOOD BYE') → -1<br> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <h3>strpos() function</h3> | ||
| Return the index of a regular expression in a string. | ||
|
|
||
| <h4>Syntax</h4> | ||
| strpos(<i>haystack</i>, <i>needle</i>) | ||
| <br><br> | ||
| Returns -1 if the expression isn't found. | ||
|
|
||
| <p><h4>Arguments</h4> | ||
| <!-- List args for functions here--> | ||
| <i> haystack</i> → is string. The string that is to be searched.<br> | ||
| <i> needle</i> → is number. The regular expression to look for.<br> | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| strpos('HELLO WORLD','WORLD') → 6<br> | ||
| strpos('HELLO WORLD','GOODBYE') → -1<br> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <h3>Funktion week()</h3> | ||
| Bestimmt die Woche eines Datums oder die Anzahl der Wochen | ||
| eines <code>Intervalls</code> | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>week(date)</code><br> | ||
| <code>week(Interval)</code><br> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>date</code> - ist date oder datetime. Das Datum dessen Woche zurückgegeben werden soll. | ||
| <br> | ||
| <code>Interval</code> - ist Interval. Das Intervall dessen Länge in Wochen zurückgegeben werden soll. | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <!-- Show example of function.--> | ||
| <code>week('2012-05-12') → 19</code><br> | ||
| <code>week(tointerval('3 weeks')) → 3</code><br> | ||
| <code>week(age('2012-01-01','2010-01-01')) → 104.285...</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <h3>week() function</h3> | ||
| Extract the week number from a date, or the number of weeks | ||
| from a <code>Interval</code> | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>week(date)</code><br> | ||
| <code>week(Interval)</code><br> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>date</code> - is date or datetime. The date to extract the week from. | ||
| <br> | ||
| <code>Interval</code> - is Interval. The Interval to return the number of weeks from. | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <code>week('2012-05-12') → 19</code><br> | ||
| <code>week(tointerval('3 weeks')) → 3</code><br> | ||
| <code>week(age('2012-01-01','2010-01-01')) → 104.285...</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <h3>Funktion xat</h3> | ||
| Liefert eine X-Koordinate der Geometrie der aktuellen Geometrie. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>xat(i)</code> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>i</code> - ist int. X-Koordinate des n-ten Punkts einer Linie (Indizes beginnen bei 0; Negative Werte beziehen sich auf das Linienende) | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <pre>xat(1) → 5</pre> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <h3>xat function</h3> | ||
| Retrieves a x coordinate of the current feature | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>xat(i)</code> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>i<code> - is int. index of point of a line (indices start at 0; negative values apply to the last index). | ||
|
|
||
| <h4>Example</h4> | ||
| <pre>xat(1) → 5</pre> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <h3>Funktion yat</h3> | ||
| Liefert eine Y-Koordinate der Geometrie der aktuellen Geometrie. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>xat(i)</code> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>i</code> - ist int. Y-Koordinate des n-ten Punkts einer Linie (Indizes beginnen bei 0; Negative Werte beziehen sich auf das Linienende) | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <pre>yat(1) → 5</pre> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <h3>yat function</h3> | ||
| Retrieves a y coordinate of the current feature | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>yat(i)</code> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>i<code> - is int. index of point of a line (indices start at 0; negative values apply to the last index). | ||
|
|
||
| <h4>Example</h4> | ||
| <pre>yat(1) → 5</pre> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <h3>Funktion year()</h3> | ||
| Bestimmt das Jahr eines Datums oder die Länge eines <code>Intervals</code> in Jahren. | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>year(date)</code><br> | ||
| <code>year(Interval)</code><br> | ||
|
|
||
| <h4>Argumente</h4> | ||
| <code>date</code> - ist date oder datetime. Das Datum dessen Jahr zurückgegeben werden soll.<br> | ||
| <code>Interval</code> - ist Interval. Das Interval dessen Länge in Jahren zurückgegeben werden soll. | ||
|
|
||
| <h4>Beispiel</h4> | ||
| <!-- Show example of function.--> | ||
| <code>year('2012-05-12') → 2012</code><br> | ||
| <code>year(tointerval('3 Years')) → 3</code><br> | ||
| <code>year(age('2012-01-01','2010-01-01')) → 1.9986..</code><br> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <h3>year() function</h3> | ||
| Extract the year part from a date, or the number of years | ||
| from a <code>Interval</code> | ||
|
|
||
| <h4>Syntax</h4> | ||
| <code>year(date)</code><br> | ||
| <code>year(Interval)</code><br> | ||
|
|
||
| <h4>Arguments</h4> | ||
| <code>date</code> - is date or datetime. The date to extract the year from. | ||
| <br> | ||
| <code>Interval</code> - is Interval. The Interval to return the number of years from. | ||
|
|
||
| <h4>Example</h4> | ||
| <!-- Show example of function.--> | ||
| <code>year('2012-05-12') → 2012</code><br> | ||
| <code>year(tointerval('3 Years')) → 3</code><br> | ||
| <code>year(age('2012-01-01','2010-01-01')) → 1.9986..</code><br> | ||
|
|