This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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%; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To copy a file from an image to the host | |
docker run the-image cat path/to/container/file.txt > path/to/host/file.txt | |
Amazon Linux | |
This image can be used to replicate EC2 and AWS Lambdas so anything that needs to be built from source can be done on this docker image. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: '2.0' | |
info: | |
version: 1.0.0 | |
title: Building Geospatial APIs | |
description: Getting started with OpenAPI Specification | |
schemes: | |
- http | |
- https | |
paths: | |
/message: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following is a set of useful PostGIS queries and functions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Code snipped to use recursive-readdir to provide a list of required file types. | |
var path = require('path'); | |
var recursive = require('recursive-readdir'); | |
function ignoreFunc(file, stats) { | |
// `file` is the absolute path to the file and we can use extname to look at the file extension | |
return stats.isFile() && path.extname(file) != ".zip"; | |
} | |
// Ignore files using the ignroeFunc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install node 4.2.1 | |
Use HTML and main.js from electron getting started guide | |
Configure package.json to include: | |
"dependencies": { | |
"gdal": "naturalatlas/node-gdal#win-node-4.2.1" | |
} | |
Then install electron rebuild which recompiles native node modules. | |
npm install --save-dev electron-rebuild |
NewerOlder