Skip to content

Instantly share code, notes, and snippets.

Avatar
💡

Matthias Kuhn m-kuhn

💡
View GitHub Profile
View gist:de81bdd6c36e4c6b6e680bc95abf7a3a
geom = QgsGeometry.fromWkt('PolygonZ ((454011.58229999977629632 5187334.57310000061988831 0, 454031.23220000049332157 5187341.10169999953359365 0, 454042.66089999943505973 5187355.40879999939352274 0, 454055.77999999991152436 5187381.58350000064820051 0, 454070.51539999985834584 5187413.78690000157803297 0, 454083.46959999983664602 5187445.9303999999538064 0, 454106.40129999961936846 5187475.61440000031143427 0, 454133.25800000043818727 5187497.64990000147372484 0, 454162.08549999952083454 5187517.57579999975860119 0, 454199.59580000105779618 5187534.89230000134557486 0, 454210.33190000033937395 5187539.61130000092089176 0, 454242.66389999975217506 5187554.0284000001847744 0, 454264.16080000041984022 5187562.64660000149160624 0, 454303.51820000063162297 5187573.7943999981507659 0, 454344.94529999990481883 5187579.15330000128597021 0, 454407.93520000082207844 5187595.03009999915957451 0, 454464.67490000010002404 5187616.59569999948143959 0, 454498.06230000022333115 5187627.57340000011026859 0, 454539.431699999
View wanderwege.sld
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:se="http://www.opengis.net/se">
<NamedLayer>
<se:Name>ch.swisstopo.swisstlm3d-wanderwege</se:Name>
<UserStyle>
<se:Name>wanderwege</se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>Bergwanderweg</se:Name>
<se:Description>
View gist:0547867c7bfdc826b033914276f5f697
This file has been truncated, but you can view the full file.
--------- beginning of system
02-02 15:22:11.229 4013 4246 D MARs:SystemFilter: filter : com.samsung.android.lool(0)
02-02 15:22:11.229 4013 4246 D MARs:NoAppIconFilter: filter : com.samsung.android.providers.contacts(0)
02-02 15:22:11.229 4013 4246 D MARs:NoAppIconFilter: filter : com.samsung.android.honeyboard(0)
02-02 15:22:11.229 4013 4246 D MARs:DefaultAppFilter: filter : com.samsung.android.honeyboard(0)(IME)
02-02 15:22:11.229 4013 4246 D MARs:NoAppIconFilter: filter : com.android.providers.media(0)
02-02 15:22:11.230 4013 4246 D MARs:NoAppIconFilter: filter : com.samsung.cmh(0)
02-02 15:22:11.230 4013 4246 D MARs:NoAppIconFilter: filter : com.samsung.android.beaconmanager(0)
02-02 15:22:11.230 4013 4246 D MARs:NoAppIconFilter: filter : com.samsung.android.mcfserver(0)
View arm64-android.vcpkg_abi_info.txt
cmake 3.21.1
disable-warning-4996.patch c65ce38f957f980d407073e484e098c4097e635d663da570d2ca79f72d53b02a
features core
fix-exported-config.patch 320eab8136a05cfd05411a4c1f82ac6a0d13b79a4f02fb55ce987d3e4e887925
install-hpp-files.patch a1ede57943cd34bdcf2f96edd067dee3da7e76e8da5bf1587d544e91aa146c0f
portfile.cmake 2e9d0b3414e26a9cd2f9e93460ee51a4a252cf40e5f9961c5ae7ed1f64888a39
ports.cmake 30a2833518026e7bb744dfae1f9648a87a6564083ed1c5f57d50440edf5847d0
post_build_checks 2
triplet arm64-android
triplet_abi 65bafcb5b90f1d9cdcc5810ecefd4b4429274ceee1d8cdd62795d15348eb9dfb-619cbfa66ef7b83e034925adea059e6b347e6ccf4b6a9ade87c1e339503d605c-c57a1d343b8a9a5c0afa795ae415ac7c38cbe465
View arm_symbols.txt
lib/armeabi-v7a/libarcgisfeatureserverprovider_armeabi-v7a.so.sym: 3: 00000000 0 FUNC GLOBAL DEFAULT UND _Unwind_Resume
lib/armeabi-v7a/libarcgismapserverprovider_armeabi-v7a.so.sym: 8: 00000000 0 FUNC GLOBAL DEFAULT UND _Unwind_Resume
lib/armeabi-v7a/libcrypto_1_1.so.sym: 138: 00000000 0 FUNC WEAK DEFAULT UND __gnu_Unwind_Find_exidx
lib/armeabi-v7a/libc++_shared.so.sym: 109: 00000000 0 FUNC GLOBAL DEFAULT UND __gnu_Unwind_Find_exidx
lib/armeabi-v7a/libc++_shared.so.sym: 353: 0006b103 6 FUNC GLOBAL DEFAULT 13 _ZN10__cxxabiv119__getExceptionClassEPK21_Unwind_Control_Block
lib/armeabi-v7a/libc++_shared.so.sym: 1536: 0006b0fd 6 FUNC GLOBAL DEFAULT 13 _ZN10__cxxabiv119__setExceptionClassEP21_Unwind_Control_Blocky
lib/armeabi-v7a/libc++_shared.so.sym: 2131: 0006b109 40 FUNC GLOBAL DEFAULT 13 _ZN10__cxxabiv121__isOurExceptionClassEPK21_Unwind_Control_Block
lib/armeabi-v7a/libdb2provider_armeabi-v7a.so.sym: 3: 00000000 0 FUNC GLOB
View gist:e855a2d21ddf089e2ce867d00e8c5675
[remote "qgis"]
url = git@github.com:qgis/QGIS.git
fetch = +refs/heads/*:refs/remotes/qgis/*
[branch "master"]
remote = qgis
merge = refs/heads/master
[remote "gh-mku"]
url = git@github.com:m-kuhn/QGIS.git
fetch = +refs/heads/*:refs/remotes/qgis/*
View nullptr_trace
java -jar ili2pg-4.1.0.jar --schemaimport --dbhost localhost --dbport 5432 --defaultSrsCode 2056 --dbdatabase horw --dbschema vw --dbusr postgres --dbpwd postgres --createBasketCol --trace View.ili
Info: dburl <jdbc:postgresql://localhost:5432/horw>
Info: dbusr <postgres>
Info: readSettings(): SELECT tag,setting FROM vw.T_ILI2DB_SETTINGS (TransferFromIli.java:699)
Info: ili2pg-4.1.0-aa1d00a37ee431852bdee6b990f34b3620f9c1c1
Info: ili2c-5.0.0-20190401
Info: iox-ili-1.20.11-13a1c5b39c33dae68eca9146e8b26d07cdedfebe
Info: java.version 1.8.0_222
Info: user.name <mkuhn>
Info: maxMemory 3593728 KB
View Building QGIS on Windows Visual Studio 2015 Comunity.md

Setting up Visual Studio

Setting up QGIS build

  • cd QGIS/ms-windows/osgeo4w
  • set "CMAKEGEN=Visual Studio 14 2015 Win64"
  • package-nightly.cmd 3.7 1 qgis-dev x86_64 xx qgis.org
View multipoint.py
>>> mp1 = QgsGeometry.fromWkt('MULTIPOINT (10 40, 40 30, 20 20, 30 10) ')
>>> print(mp1)
<QgsGeometry: MultiPoint ((10 40),(40 30),(20 20),(30 10))>
>>> type(mp1)
<class 'qgis._core.QgsGeometry'>
>>> mp2 = QgsGeometry.fromWkt('MULTIPOINT(POINT(4 6),POINT(7 10))')
>>> print(mp2)
<QgsGeometry: MultiPoint ((4 6),(7 10))>
>>> type(mp2)
<class 'qgis._core.QgsGeometry'>
@m-kuhn
m-kuhn / processing_geocode.py
Last active Jun 25, 2019
processing_geocode
View processing_geocode.py
from qgis.processing import alg
from qgis.core import QgsFeature, QgsGeometry, QgsPoint, QgsField, QgsFeatureSink, QgsNetworkAccessManager, QgsWkbTypes, QgsExpression, QgsExpressionContextUtils, QgsCoordinateReferenceSystem
from PyQt5.QtCore import QUrl, QVariant
from PyQt5.QtNetwork import QNetworkRequest
import json
class NominatimGeocoder():
"""A geocoder for nominatim"""
def __init__(self):