Skip to content

Instantly share code, notes, and snippets.

View ThomasG77's full-sized avatar

Thomas Gratier ThomasG77

View GitHub Profile
@ThomasG77
ThomasG77 / README.md
Last active January 10, 2025 18:40
Recipe to get JSON using pagination using command line tools e.g curl, jq, bc, cat
This file has been truncated, but you can view the full file.
<script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.15.0/proj4.min.js" integrity="sha512-4cx6CH/aJi50kdbQ5dj6bDJM1WS0AOFBGgBfgSP2Ux2eK/5JhkL2pjUDIHwd8z6rfGuGr/aptDqs0EzbeRndvQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script>
proj4.defs("EPSG:2154","+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs");
function geometryPoint(entry, transformer) {
return transformer(entry)
}
@ThomasG77
ThomasG77 / README.md
Created September 24, 2022 00:19
Miniconda with gdal install
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ThomasG77
ThomasG77 / leaflet-wmts-grayscale.html
Last active November 8, 2024 19:02
Leaflet styling source to black&white/grayscale on client side
<<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<style type="text/css">
#viewerDiv {
width:100%;
height:600px;
@ThomasG77
ThomasG77 / pyqgis-add-wms-layer-snippet.py
Last active October 29, 2024 13:17
PyQGIS add WMS layer standalone sample (use capabilities listing from owslib)
# PyQGIS add WMS layer standalone sample
# Before use owslib library (bundled in QGIS) to list WMS layers in capabilities
from owslib.wms import WebMapService
url = 'https://www.gebco.net/data_and_products/gebco_web_services/2020/mapserv'
wms = WebMapService(url, version='1.3.0')
for name, metadata in wms.contents.items():
print(name)
@ThomasG77
ThomasG77 / .gitignore
Last active October 21, 2024 17:29
"Poor man" head tail in QGIS
outside/
__pycache__
@ThomasG77
ThomasG77 / five-minutes-pgadmin4-desktop-install-guide.md
Last active October 14, 2024 11:59
5 minutes PgAdmin4 Desktop install guide

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
{
"title": "poissons",
"name": "poissons",
"fields": [
{
"name": "operation",
"type": "integer",
"constraints": {
"unique": true
}