This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool QgsVectorLayer::convertToLayerGeometry( QgsGeometry &geometry ) | |
{ | |
QGis::GeometryType layerGeomType = geometryType(); | |
QGis::GeometryType geomType = geometry.type(); | |
switch ( geomType ) | |
{ | |
// geometry type is point | |
case QGis::Point: | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src = iface.activeLayer() | |
dst = QgsMapLayerRegistry.instance().mapLayer("cadastre20140312152032371") | |
featReq = QgsFeatureRequest().setSubsetOfAttributes([]) | |
k = 0 | |
features = [] | |
nonCopied = [] | |
for f in src.getFeatures(featReq): | |
k += 1 | |
if k % 100 ==0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import geocoder | |
g = geocoder.google("[% "__MYADDRESSFIELD__" %]".replace("'", r"\'")) | |
if not g.latlng: | |
print "adress not found" | |
else: | |
pt = QgsPoint(g.latlng[1],g.latlng[0]) | |
tr = QgsCoordinateTransform( QgsCoordinateReferenceSystem( 4326 , QgsCoordinateReferenceSystem.EpsgCrsId ), | |
QgsCoordinateReferenceSystem( __MYEPSG__, QgsCoordinateReferenceSystem.EpsgCrsId )) | |
pt = tr.transform( pt ) | |
print pt.x(), pt.y() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# git clone --depth=1 https://github.com/qgis/QGIS.git | |
export TRAVIS_BUILD_DIR=/Users/denis/Documents/qgis/QGIS | |
export DOCKER_TAG=docker | |
export DOCKER_PUSH=fase | |
export TRAVIS_PULL_REQUEST=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
REACH_START=9358 | |
REACH_END=12307 | |
WS_START=12308 | |
WS_END=14472 | |
echo "a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export PATH=/usr/local/opt/qt/bin:/usr/local/opt/ccache/libexec:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin | |
export CMAKE_PREFIX_PATH="/usr/local/opt/qt;/usr/local/opt/qt5-webkit;/usr/local/opt/qscintilla2;/usr/local/opt/qwt;/usr/local/opt/qwtpolar;/usr/local/opt/qca;/usr/local/opt/gdal2;/usr/local/opt/gsl;/usr/local/opt/geos;/usr/local/Cellar/proj/4.9.3/;/usr/local/opt/libspatialite;/usr/local/opt/spatialindex;/usr/local/opt/fcgi;/usr/local/opt/expat;/usr/local/opt/sqlite;/usr/local/opt/flex;/usr/local/opt/bison;/usr/local/opt/libzip;" | |
export QGIS_NINJA_BUILD=1 | |
cmake -GNinja \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone og:OSGeo4A | |
cd OSGeo4A | |
# edit recipes/qgis/recipe.sh -> zip file and md5 | |
docker build . -t opengisch/qfield-sdk:RELEASENUMBER | |
docker push opengisch/qfield-sdk:RELEASENUMBER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os.path | |
from qgis.PyQt.QtCore import QCoreApplication | |
from qgis.core import QgsProject, QgsApplication | |
from qgis.utils import iface | |
# This is a python script intended to be used within QGIS to split a project according to its map theme collection. | |
# It will produce as many project file as existing themes. | |
# Configure hereafter and run using: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
layer = QgsProject.instance().mapLayer('[% @layer_id %]') | |
from math import sqrt | |
from PyQt5.QtWidgets import QDialog, QFormLayout, QLabel, QDoubleSpinBox, QComboBox, QDialogButtonBox | |
class RectDialog(QDialog): | |
def __init__(self, width, length): | |
QDialog.__init__(self) | |
self.layout = QFormLayout(self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from github import Github, GithubException | |
import argparse | |
import os | |
GH_TOKEN_ENV_VAR_NAME = 'GH_TOKEN' | |
GH_REPO_SLUG = 'opengisch/OSGeo4A' | |
OlderNewer