Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Gratier ThomasG77

View GitHub Profile
View index.html
<!DOCTYPE html>
<html>
<head>
<!--
Copyright (c) 2015 Jean-Marc VIGLINO,
released under CeCILL-B (french BSD like) licence: http://www.cecill.info/
-->
<title>ol-ext: Layerswitcher</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
View README.md

Compile Seasnake on Ubuntu 18.04

sudo apt-get install libclang-3.9 clang-3.9 -y sudo apt-get install zlib1g-dev libncurses5-dev -y export LLVM_HOME=/usr/lib/llvm-3.9 export LD_LIBRARY_PATH=$LLVM_HOME/lib pip install sealang

git clone https://github.com/pybee/seasnake.git cd seasnake

View pyqgis-371225.py
canvas = iface.mapCanvas()
project = QgsProject.instance()
#get a reference to the layout manager
manager = project.layoutManager()
#make a new print layout object
layout = QgsPrintLayout(project)
#needs to call this according to API documentaiton
layout.initializeDefaults()
#cosmetic
layout.setName('console')
View index.js
var fs = require('fs');
// Node.js require:
var Ajv = require('ajv');
// or ESM/TypeScript import
//import Ajv from 'ajv';
var GenerateSchema = require('generate-schema')
jsonbody = {"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[102,0.5]},"properties":{"prop0":"value0"}},{"type":"Feature","geometry":{"type":"LineString","coordinates":[[102,0],[103,1],[104,0],[105,1]]},"properties":{"prop0":"value0","prop1":0}},{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[100,0],[101,0],[101,1],[100,1],[100,0]]]},"properties":{"prop0":"value0","prop1":{"this":"that"}}}]};
var schema = GenerateSchema.json(jsonbody);
let data = JSON.stringify(schema);
@ThomasG77
ThomasG77 / five-minutes-pgadmin4-desktop-install-guide.md
Last active Aug 8, 2020
5 minutes PgAdmin4 Desktop install guide
View five-minutes-pgadmin4-desktop-install-guide.md

5 minutes PgAdmin4 Desktop install guide

Done on Linux (Ubuntu tested)

Virtualenv & install of Python package & its deps

cd $HOME
virtualenv --python=/usr/bin/python2.7 pgadmin4
source pgadmin4/bin/activate
@ThomasG77
ThomasG77 / load_xyz_sources.py
Created Feb 27, 2018
PyQGIS script to save/load/wipe XYZ sources in Browser Panel in QGIS3
View load_xyz_sources.py
# -*- coding: utf-8 -*-
"""
/***************************************************************************
Name : XYZ manager
Description : Script to save/load/wipe WYZ sources in QGIS 3.0
Date : February 27, 2017
copyright : (C) 2017 by Thomas Gratier
email : thomas.gratier@webgeodatavore.com
View france-bleu-tdf-2020-retrive-kml.sh
wget --content-disposition https://www.google.com/maps/d/kml?mid=1QEn5vwRp0NEDEu_VWPdaaVtGQ1-a45oK
wget --content-disposition https://www.google.com/maps/d/kml?mid=1eOPdoMdxtabrzH9roJJI5sITPApXqVi-
wget --content-disposition https://www.google.com/maps/d/kml?mid=1WavrdJ0nw29v5k9V05bcidGkcxALtftx
wget --content-disposition https://www.google.com/maps/d/kml?mid=1Igkv4wOMBPzLoGMNQfbL2EyPBvCIanSl
wget --content-disposition https://www.google.com/maps/d/kml?mid=1F0dLcEfcSZlUGM4cD_AGTiQSkUYoTOJp
wget --content-disposition https://www.google.com/maps/d/kml?mid=19Rp4va6o16TLWqdzz6m6u2DODkj00uef
wget --content-disposition https://www.google.com/maps/d/kml?mid=1l5nipJpygoeJNdfGLx2eVk4gBI953m_K
wget --content-disposition https://www.google.com/maps/d/kml?mid=1gf5g6KiNUTSuKYwgHXM9BN6_DmIdNWBz
wget --content-disposition https://www.google.com/maps/d/kml?mid=1X8tlktwMmRkpV4c_5juUt_UqFTfrVo7l
wget --content-disposition https://www.google.com/maps/d/kml?mid=1014wApjDVCtaXk0Za_fPlXMX1hmbsvmZ
@ThomasG77
ThomasG77 / README.md
Last active Jul 12, 2020
Run PyQGIS in Jupyter Notebook
View README.md
View 3d__tessellate.md

tessellate

Tessellate (3d:tessellate)

This algorithm tessellates a polygon geometry layer, dividing the geometries into triangular components.

The output layer consists of multipolygon geometries for each input feature, with each multipolygon consisting of multiple triangle component polygons.

View 3d__tessellate.md
Tessellate (3d:tessellate)

This algorithm tessellates a polygon geometry layer, dividing the geometries into triangular components.

The output layer consists of multipolygon geometries for each input feature, with each multipolygon consisting of multiple triangle component polygons.


----------------
Input parameters
You can’t perform that action at this time.