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);
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
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
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
View draw-freehand.0f2006e6.js
(function () {function uh(a){return a&&a.__esModule?{d:a.default}:{d:a}}var Uf={};var Wf={};var Gd={};var Se={};function ca(){return function(){throw new Error("Unimplemented abstract method.")}()}var bo=0;function ga(t){return t.ol_uid||(t.ol_uid=String(++bo))}var Ye="6.3.1";var lo=Se&&Se.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function o(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),tg=function(t){function r(r){var e=this,o="Assertion failed. See https://openlayers.org/en/"+("latest"===Ye?Ye:"v"+Ye.split("-")[0])+"/doc/errors/#"+r+" for details.";return(e=t.call(this,o)||this).code=r,e.name="AssertionError",e.message=o,e}return lo(r,t),r}(Error);Se.default=tg;var ra={ADD:"add",REMOVE:"remove"};var Wc={};var ub={PROPERTYCHANGE:"propertychange"};var ye={};function fa(e,t
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Freehand Drawing</title>
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL"></script>
<style>
.map {
width: 100%;
height:400px;
You can’t perform that action at this time.