Skip to content

Instantly share code, notes, and snippets.

View ThomasG77's full-sized avatar

Thomas Gratier ThomasG77

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ThomasG77 /
Created December 6, 2021 15:36 — forked from bmegli/
CMake 3.20 in Ubuntu 18.04 (reversible way)


  • modern CMake is required for building a lot of new software
  • CMake is dependency for many packages (e.g. ROS related)
  • we don't want to remove CMake (which would remove packages that depend on it)
  • we want safe procedure to update CMake that can be reversed easily

Current version in OS

Check current version

ThomasG77 /
Last active May 31, 2021 08:55 — forked from chrisjsimpson/
Convert coordinates in DMS notation to decimal in Python.
# coding=utf8
Converting Degrees, Minutes, Seconds formatted coordinate strings to decimal.
DEC = (DEG + (MIN * 1/60) + (SEC * 1/60 * 1/60))
Assumes S/W are negative.
ThomasG77 / OSMF-2021-Survey.qgz
Created February 27, 2021 00:03 — forked from migurski/OSMF-2021-Survey.qgz
OSMF 2021 Survey Regions
ThomasG77 / index.html
Last active February 22, 2020 17:56 — forked from Andrew-Reid/index.html
Leaflet and Popup with D3
<!DOCTYPE html>
<title>Leaflet with D3 popups</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src=""></script>
<link rel="stylesheet" href="" integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ==" crossorigin=""/>
<script src="" integrity="sha512-/Nsx9X4HebavoBvEBuyp3I7od5tA0UzAxs+j83KgC8PU0kgB4XiK4Lfe4y4cgBtaRJQEIFCW+oC506aPT2L1zw==" crossorigin=""></script>
ThomasG77 /
Last active July 24, 2018 14:18 — forked from rveciana/
Using JSTS to measure how far a line travels through a polygon

Example to ilustrate this question at gis.stackoverflow.

We choose to replace Turf with JSTS.

If the result is more complex (i.e. the resulting intersection is a polyline), the algorithm should be repeated for each part in the polygon.

ThomasG77 /
Created July 12, 2018 22:22 — forked from tmcw/
Line Chart
ThomasG77 /
Last active July 5, 2018 11:16 — forked from elemoine/
OpenLayers 3 Google Maps API

Use OL3 and Google Maps together

This GIST provides an example of a Google Maps map with an OL3 map as control, to give users a Google base map with OL3 content on top.

Open the corresponding bl.ock to view the example in your browser.


ThomasG77 / postgis_geojson.php
Created September 21, 2012 20:25 — forked from bmcbride/postgis_geojson.php
header('Content-Type: application/json; charset=UTF-8');
* PostGIS to GeoJSON
* Query a PostGIS table or view and return the results in GeoJSON format, suitable for use in OpenLayers, Leaflet, etc.
* @param string $geotable The PostGIS layer name *REQUIRED*
* @param string $geomfield The PostGIS geometry field *REQUIRED*
* @param string $srid The SRID of the returned GeoJSON *OPTIONAL (If omitted, EPSG: 4326 will be used)*
* @param string $fields Fields to be returned *OPTIONAL (If omitted, all fields will be returned)* NOTE- Uppercase field names should be wrapped in double quotes
ThomasG77 / .gitignore
Created February 28, 2018 01:17 — forked from tschaub/.gitignore
OpenLayers + Webpack