Skip to content

Instantly share code, notes, and snippets.

View JakobMiksch's full-sized avatar

Jakob Miksch JakobMiksch

View GitHub Profile
http://services.sandre.eaufrance.fr/telechargement/geo/ETH/BDTopage/2019/CoursEau/CoursEau_FXX-gpkg.zip
https://services.sandre.eaufrance.fr/telechargement/geo/ETH/BDTopage/2019/TronconHydrographique/TronconHydrographique_FXX-gpkg.zip
http://services.sandre.eaufrance.fr/telechargement/geo/ETH/BDTopage/2019/PlanEau/PlanEau_FXX-gpkg.zip
http://services.sandre.eaufrance.fr/telechargement/geo/ETH/BDTopage/2019/SurfaceElementaire/SurfaceElementaire_FXX-gpkg.zip
http://services.sandre.eaufrance.fr/telechargement/geo/ETH/BDTopage/2019/BassinHydrographique/BassinHydrographique_FXX-gpkg.zip
http://services.sandre.eaufrance.fr/telechargement/geo/ETH/BDTopage/2019/BassinVersantTopographique/BassinVersantTopographique_FXX-gpkg.zip
http://services.sandre.eaufrance.fr/telechargement/geo/ETH/BDTopage/2019/LimiteTerreMer/LimiteTerreMer_FXX-gpkg.zip
http://services.sandre.eaufrance.fr/telechargement/geo/ETH/BDTopage/2019/NoeudHydrographique/NoeudHydrographique_FXX-gpkg.zip
# Generate structure
rm -rf demo
mkdir demo
mkdir demo/germany
mkdir demo/france
cd demo/germany
# Get data
ogr2ogr germany.shp /vsicurl/https://github.com/datasets/geo-countries/raw/master/data/countries.geojson -dialect SQLite -sql "SELECT * FROM countries WHERE ADMIN = 'Germany'"
cd ../france
<!DOCTYPE qgis_style>
<qgis_style version="2">
<symbols>
<symbol tags="Showcase" clip_to_extent="1" name="digital_rain" force_rhr="0" alpha="1" type="fill">
<layer class="SimpleLine" pass="0" enabled="1" locked="0">
<prop v="square" k="capstyle"/>
<prop v="5;2" k="customdash"/>
<prop v="3x:0,0,0,0,0,0" k="customdash_map_unit_scale"/>
<prop v="MM" k="customdash_unit"/>
<prop v="0" k="draw_inside_polygon"/>

Computer Literacy for Geosciences

Draft TOC for a practical introduction to computing for Geosciences (most of it is probably applicable to other non-Computer Science fields)

The course should be agnostic towards specific platforms or products - Presented techniques should always cover the three main OSs (Win, Mac, Linux), and program code should be given in multiple languages (e.g. Python, R, JavaScript)

🟊 marks sections that can easily be skipped or moved to advanced courses

For more general info & license, see Meta

@ghtmtt
ghtmtt / geocoding.py
Last active September 14, 2021 04:40
Geocoding in QGIS Field Calculator
# the function needs geopy
# for Windows users, to install geopy, open the OSGEO4W Shell and type:
# py3_env
# pip3 install geopy
from qgis.core import *
from qgis.gui import *
from geopy.geocoders import Nominatim
locator = Nominatim(user_agent="myGeocoder")
import requests
import csv
import datetime
import calendar
import time
i=0
# Change the range depending on how long you like to record the data
for i in range (0,50):

Guide for setting up an AWS linux ec2 instance with GeoServer & PostGIS using Tomcat & Apache.

Update the System

 $ sudo yum update

Install PostgreSQL

Install postgresql, postgresql-devel, and postgresql-libs, and configure data directory and start the service (as the postgres user).

@tjukanovt
tjukanovt / api_calls.py
Last active August 24, 2025 14:36
Two Python scripts that can be used to create animated route maps to multiple locations
import pandas as pd
import urllib.request
# path to your csv file with the endpoint coordinates
coordinates = pd.read_csv('swe_points.csv')
# graphhopper API call building blocks. Check Graphhopper documentation how to modify these.
urlStart = 'http://localhost:8989/route?'
point = 'point='
urlEnd = '&type=gpx&instructions=false&vehicle=car'
@parmentf
parmentf / GitCommitEmoji.md
Last active December 10, 2025 12:05
Git Commit message Emoji
@Kartones
Kartones / postgres-cheatsheet.md
Last active December 9, 2025 11:10
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)