Skip to content

Instantly share code, notes, and snippets.

View ThomasG77's full-sized avatar

Thomas Gratier ThomasG77

View GitHub Profile
import json
import os
import platform
import re
import socket
import uuid
from pprint import pprint as pp
import distro
from hurry.filesize import size
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import csv
import os
from qgis.PyQt.QtCore import QVariant
layer = iface.activeLayer()
uri_text = layer.dataProvider().uri().uri()
md = QgsProviderRegistry.instance().providerMetadata('postgres')
conn = md.createConnection(uri_text, {})
my_cols = [
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

VRT to merge vector data

Intro

Adopte le VRT, cela changera ta vie. Exemple: les IRIS par territoire. Je veux une sortie WGS 84. Avec le VRT, je ne crée pas de fichier immédiatement

Recipe

Retrieve data and uncompress

@ThomasG77
ThomasG77 / README.md
Last active September 12, 2021 21:46

Make screen from Geoportail site, hiding help

Node version

Prerequisites

Get Node.js with associated npm

Install

<!DOCTYPE html>
<html>
<head>
<title>Tuiles vecteur OpenLayers</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1" />
<!-- Openlayers -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/ol.css" />
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Display a map</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/maplibre-gl.js"></script>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/[email protected]/dist/maplibre-gl.css">
<style type="text/css">
@ThomasG77
ThomasG77 / keybase.md
Created August 30, 2021 12:32
Adding keybase.io proof

Keybase proof

I hereby claim:

  • I am ThomasG77 on github.
  • I am thomasg77 (https://keybase.io/thomasg77) on keybase.
  • I have a public key whose fingerprint is 3A3C 1140 972E 0756 C44C A5E3 D83F 1FE9 8438 6F6B

To claim this, I am signing this object:

import glob
import os
from urllib.parse import quote
# Define path to directory of your csv files
path_to_csv = "your_path"
x_field = '經度' # longitude
y_field = '緯度' # latitude