Skip to content

Instantly share code, notes, and snippets.

View gannebamm's full-sized avatar

Florian Hoedt gannebamm

View GitHub Profile
@gannebamm
gannebamm / md_viewservice.xml
Created November 20, 2019 16:33
INSPIRE View Service Metadata Example
<gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:gmx="http://www.isotc211.org/2005/gmx"
xmlns:srv="http://www.isotc211.org/2005/srv"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://schemas.opengis.net/csw/2.0.2/profiles/apiso/1.0.0/apiso.xsd">
<gmd:fileIdentifier>
<gco:CharacterString>a479a63f-386d-44a6-a53f-83d3e396c3dc</gco:CharacterString>
@gannebamm
gannebamm / Dockerfile
Created September 26, 2019 09:27
Variant of SPC-Geonode geoserver Dockerfile to enable community plugin installations
FROM openjdk:8-jre-alpine
# since 2.15.x is not stable
# and will cause h2 lockdowns
ARG version=2.14.4
ARG branch=2.14.x
ARG plugins=
ARG commpluginfiles=geoserver-2.14-SNAPSHOT-geopkg-plugin.zip
# Install dependencies
@gannebamm
gannebamm / uploadTestSelenium.py
Created September 11, 2019 14:51
uploading files to a GeoNode instance by using selenium as webdriver
from selenium import webdriver
import time
import os
# must use chromedriver, since others do not interact
# with hidden elements (such as the multi upload input-field)
PATH_TO_DRIVER = "D:\\chromedriver.exe"
# set folder with files to upload
FOLDER = "D:\\temp\\upload\\"
@gannebamm
gannebamm / Dockerfile
Created July 30, 2019 07:38
SPC-GeoNode Geoserver Dockerfile for community-plugin support
FROM openjdk:8-jre-alpine
# since 2.15.x is not stable
# and will cause h2 lockdowns
ARG version=2.14.4
ARG branch=2.14.x
ARG plugins=
ARG commpluginfiles=geoserver-2.14-SNAPSHOT-geopkg-plugin.zip
# Install dependencies
@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>
@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 / 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 / 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 / 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 / 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)