Skip to content

Instantly share code, notes, and snippets.

View gannebamm's full-sized avatar

Florian Hoedt gannebamm

View GitHub Profile
@gannebamm
gannebamm / docker-compose.yml
Created October 16, 2018 12:02
docker-compose file for geonetwork postgres geoserver stack
# GeoNetwork
#
# Access via "http://localhost:8080/geonetwork" (or "http://$(docker-machine ip):8080/geonetwork" if using docker-machine)
#
# Default user: admin
# Default password: admin
version: '3.1'
services:
@gannebamm
gannebamm / ckan2.8_install.md
Last active October 9, 2018 10:56
Installation documentation for ckan 2.8 on Ubuntu 16.04 LTS
@gannebamm
gannebamm / paster_harvest_run_test.md
Last active September 6, 2018 13:02
paster run_test for csw harvester produces ImportError: No module named factory error

production.ini

# ckan harvester
ckan.harvest.mq.type = redis
ckan.spatial.validator.profiles = iso19139

paster harvester sources

(default) administrator@GDIT01-BS:/usr/lib/ckan/default/src/ckanext-harvest$ paster --plugin=ckanext-harvest harvester sources --config=/etc/ckan/default/production.ini
2018-09-06 14:54:28,651 DEBUG [ckanext.spatial.plugin] Setting up the spatial model
2018-09-06 14:54:28,674 DEBUG [ckanext.spatial.model.package_extent] Spatial tables defined in memory
2018-09-06 14:54:28,681 DEBUG [ckanext.spatial.model.package_extent] Spatial tables already exist
@gannebamm
gannebamm / locAlg_DA.r
Created February 1, 2018 10:34
Output of the localize algorithm as .csv and some R code to analyze the results. The test uses a multilateration technique and minimizes the STD. The idea is that the point with the lowest STD (localized_STD) is the point with the lowest localization error (error_m). In Addition some noise (..._n) was simulated.
# read the csv file
df <- read.csv(file = "locResults_small_mNoise5_mSigRnd8.csv")
# use ggplot for plotting
require(ggplot2)
# show histogramms
ggplot(df, aes(x=error_m)) +
geom_histogram(bins=20,
colour="dark gray", fill="black") +
@gannebamm
gannebamm / query.sql
Created January 28, 2018 17:50
Query for getting the number of red lines which are crossed by each black line
select SUM(red.n), black.*
from red, black
where st_crosses(red.geometry, black.geometry)
group by black.ID
@gannebamm
gannebamm / st_makeline_3d_working.sql
Created January 5, 2018 13:25
ST_MakeLine with creating a 3DIM enabled table works for 3d features
CREATE TABLE samplelines
(
id serial,
name character varying(50) COLLATE pg_catalog."default",
CONSTRAINT samplelines_pkey PRIMARY KEY (id)
)
-- add 3dims enabled geometry column
SELECT AddGeometryColumn('public', 'samplelines', 'geom', 25832, 'LINESTRING', 3);
-- pick the samplepoints and create lines
@gannebamm
gannebamm / st_makeline_3d.sql
Created January 3, 2018 17:53
ST_MakeLine for samplepoints - does not create 3d Lines
SELECT ST_MAKELINE(
(SELECT geom
FROM samplepoints_xyz
WHERE name = 'al_01'),
(SELECT geom
FROM samplepoints_xyz
WHERE name = 'sound_01')), 's1' AS sample
@gannebamm
gannebamm / samplepoints.sql
Created January 3, 2018 17:52
sample points on campus
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.2
-- Dumped by pg_dump version 10.0
-- Started on 2018-01-03 18:49:42
SET statement_timeout = 0;
@gannebamm
gannebamm / PAMTrilateration.ipnb
Created December 14, 2017 22:21 — forked from anonymous/PAMTrilateration.ipnb
PAM Trilateration Example
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Passive Audio Monitoring Trilateration\n",
"\n",
"## The Issue\n",
"One example of a trilateration algorithm is the GPS based localization. The algorithm uses the runtimes of three or more signals to determine the position of the sensor on earth. In this algorithm the _absolute_ runtimes for each signal are known due to the GPS timestamps send by the satellites.\n",
@gannebamm
gannebamm / config.py
Created November 3, 2017 09:22
record audio samples via alsaaudio for the ASSOS project - creates bad chunks of data
### configuration file for assos_listen
# upload
upload = False
# config for this sensor
sensorID = "al_03"
# sampling rate & chunk size
chunkSize = 1024
samplingRate = 44100 #44100 # 44100 needed for Aves sampling