Skip to content

Instantly share code, notes, and snippets.

View gannebamm's full-sized avatar

Florian Hoedt gannebamm

View GitHub Profile
@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 / 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 / ckan2.8_install.md
Last active October 9, 2018 10:56
Installation documentation for ckan 2.8 on Ubuntu 16.04 LTS
@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 / proposal.md
Last active March 25, 2019 09:35
updated [GNIP] Support production-grade deployement using Docker

Overview

The basic proposal is already mentioned in #3707. This is an updated aproach to the same idea: officially support a production-grade deployment method using Docker. By production-grade, it is meant a deployment solution that satisfies basic needs in terms of performance and security.

Rationale

  1. There's currently no clear deployment method supported for production (there's an entry about that in the doc, but it's incomplete and very hard to follow) which results on a lot of very poorly secured installations
  2. Docker works on all major platforms (Windows, Linux, Mac OS X)
  3. It's very easy to use (basically, start the whole stack in 1 command line, almost identical on any system)
  4. It's very easy to make new releases (basically one git tag)
@gannebamm
gannebamm / multiplot.R
Created March 27, 2019 10:02
samplefile for r documentation
####################
# Multiple plot function
#
# ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects)
# - cols: Number of columns in layout
# - layout: A matrix specifying the layout. If present, 'cols' is ignored.
#
# If the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE),
# then plot 1 will go in the upper left, 2 will go in the upper right, and
# 3 will go all the way across the bottom.
@gannebamm
gannebamm / celery.log
Created March 28, 2019 09:22
done by `docker-compose logs *container >> *container.log`
IS_CELERY=true
DATABASE_URL=postgres://geonode:geonode@db:5432/geonode
GEODATABASE_URL=postgis://geonode_data:geonode_data@db:5432/geonode_data
SITEURL=http://172.29.179.104:80/
ALLOWED_HOSTS=['172.29.179.104', '*', '172.29.179.104', '172.29.179.104:80', 'django', 'geonode']
GEOSERVER_PUBLIC_LOCATION=http://172.29.179.104:80/gs/
waitfordbs task done
IS_CELERY=true
DATABASE_URL=postgres://geonode:geonode@db:5432/geonode
GEODATABASE_URL=postgis://geonode_data:geonode_data@db:5432/geonode_data
@gannebamm
gannebamm / possibleCandidates.txt
Last active April 26, 2019 11:58
possible strings which are not included in the .po translation file as stated by @t-book on [April 25, 2019 6:01 PM at GITTER](https://gitter.im/GeoNode/general?at=5cc1d9c2b4700e023dcf690d)
/geonode/qgis_server/templates/qgis_server/forms/qml_style.html:30:30:(default style)
/geonode/qgis_server/templates/qgis_server/forms/qml_style.html:36:101:qgis_server:default-qml
/geonode/qgis_server/templates/qgis_server/forms/qml_style.html:36:150:style_
/geonode/qgis_server/templates/qgis_server/forms/qml_style.html:39:92:qgis_server:remove-qml
/geonode/qgis_server/templates/qgis_server/forms/qml_style.html:39:140:style_
/geonode/maps/templates/maps/map_metadata.html:15:23:data
/geonode/maps/templates/maps/map_metadata.html:22:44:/strong
/geonode/maps/templates/maps/map_metadata.html:70:80:Done
/geonode/maps/templates/maps/map_metadata.html:75:80:Done
/geonode/maps/templates/maps/map_metadata_advanced.html:9:23:data
@gannebamm
gannebamm / geoserver.log
Created May 21, 2019 15:12
h2 database lockdown loop
geoserver_1 | com.google.common.util.concurrent.UncheckedExecutionException: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
geoserver_1 | at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2050)
geoserver_1 | at com.google.common.cache.LocalCache.get(LocalCache.java:3952)
geoserver_1 | at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
geoserver_1 | at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958)
geoserver_1 | at org.geoserver.geofence.cache.CachedRuleReader.getAdminAuthorization(CachedRuleReader.java:251)
geoserver_1 | at org.geoserver.geofence.GeofenceAccessManager.isWorkspaceAdmin(GeofenceAccessManager.java:198)
geoserver_1 | at org.geoserver.geofence.GeofenceAccessManager.
@gannebamm
gannebamm / GetRecordById.html
Created June 16, 2019 11:39
Get GeoPackage download to work for GeoNode 2.10
<!--
172.30.218.212 is the local ip of my vm
http://172.30.218.212/catalogue/csw?outputschema=http%3A%2F%2Fwww.opengis.net%2Fcat%2Fcsw%2Fcsdgm&service=CSW&request=GetRecordById&version=2.0.2&elementsetname=full&id=d22a278c-901f-11e9-bfb3-0242ac120003
-->
<!-- loads of html and: -->
<onlink type="WWW:DOWNLOAD-1.0-http--download">http://172.30.218.212/geoserver/ows?outputFormat=geopkg&service=WFS&srs=EPSG%3A25832&request=GetFeature&typename=geonode%3Ageb01_f&version=1.0.0</onlink>