Skip to content

Instantly share code, notes, and snippets.

View TimJMartin's full-sized avatar

Tim Martin TimJMartin

  • Ordnance Survey
View GitHub Profile
@TimJMartin
TimJMartin / gist:d2863fd815ff975c25fda4d985771557
Created November 29, 2017 08:48
Building GDAL on Docker Amazon Linux Image
# Base Image
FROM amazonlinux:latest
MAINTAINER Tim Martin
RUN yum update -y
RUN yum upgrade -y
RUN yum install wget -y
RUN yum install gcc -y
RUN yum install gcc-c++ -y
<!DOCTYPE html>
<html>
<head>
<title>API Workshop</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.1/leaflet.css" />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
Export PostGIS schema to GPKG
ogr2ogr --config PG_LIST_ALL_TABLES YES --config PG_SKIP_VIEWS YES -f "GPKG" GPKG_Filename.gpkg -progress PG:"dbname=xxx user=xxx password=xxx active_schema=xxx schemas=xxx port=xxx host=xxx" -gt 1000000 -a_srs "EPSG:27700"
@TimJMartin
TimJMartin / POI Classifications
Created March 8, 2016 08:33
POI Classifications SQL
--SQL to create POI Classifications Table
DROP TABLE IF EXISTS poi.classifications;
COMMIT;
CREATE TABLE IF NOT EXISTS poi.classifications(
CLASSIFCATION_CODE VARCHAR(8) NOT NULL PRIMARY KEY
,GROUP_ID VARCHAR(2) NOT NULL
,GROUP_DESCRIPTION VARCHAR(34) NOT NULL
,CATEGORY_ID VARCHAR(2) NOT NULL
@TimJMartin
TimJMartin / gist:d679b161f49c6137873a0b02f79fc3c5
Last active September 16, 2020 13:54
PyGeoAPI Example Config
server:
bind:
host: 0.0.0.0
port: 5000
url: http://localhost:5000
mimetype: application/json; charset=UTF-8
encoding: utf-8
language: en-US
# cors: true
pretty_print: true