Skip to content

Instantly share code, notes, and snippets.

View gannebamm's full-sized avatar

Florian Hoedt gannebamm

View GitHub Profile
@gannebamm
gannebamm / geonode-uwsgi.service
Created January 13, 2021 08:16
UWSGI service does not start (fails and restarts)
[Unit]
Description="GeoNode UWSGI Service"
[Service]
User=tisdex
Group=www-data
# The configuration file application.properties should be here:
#change this to your workspace
WorkingDirectory=/opt/geonode
Index: geonode/social/signals.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- geonode/social/signals.py (revision 3720021380ba0d2a07c39d9fa58e4fe176a4272a)
+++ geonode/social/signals.py (date 1605787715394)
@@ -177,7 +177,7 @@
""" Send a notification when rating a layer, map or document
"""
diff --git a/geonode/layers/models.py b/geonode/layers/models.py
index 57fd4e7f8a154523f68c67328b10e9f3f5e431ad..6b66522124068bc217808ceb866abc3f034f6e3d 100644
--- a/geonode/layers/models.py
+++ b/geonode/layers/models.py
@@ -534,7 +534,7 @@ def pre_save_layer(instance, sender, **kwargs):
logger.debug("In pre_save_layer")
if instance.alternate is None:
instance.alternate = _get_alternate_name(instance)
- logger.debug("instance.alternate is: {}".format(instance.alternate))
+ logger.debug(u"instance.alternate is: {}".format(instance.alternate))
Error on printing: Error while generating PDF: java.lang.IllegalStateException: unsupported protocol: 'jar'
at org.apache.commons.httpclient.protocol.Protocol.lazyRegisterProtocol(Protocol.java:149)
at org.apache.commons.httpclient.protocol.Protocol.getProtocol(Protocol.java:117)
at org.apache.commons.httpclient.HttpHost.<init>(HttpHost.java:107)
at org.apache.commons.httpclient.HttpMethodBase.setURI(HttpMethodBase.java:280)
at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:220)
at org.apache.commons.httpclient.methods.GetMethod.<init>(GetMethod.java:89)
at org.mapfish.print.PDFUtils.loadImageFromUrl(PDFUtils.java:273)
at org.mapfish.print.PDFUtils.handleImageLoadError(PDFUtils.java:385)
at org.mapfish.print.PDFUtils.loadImageFromUrl(PDFUtils.java:359)
@gannebamm
gannebamm / updated_german_translation.patch
Created March 2, 2020 12:23
MapStore2 updated german translations patch
Index: web/client/translations/data.de-DE
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/client/translations/data.de-DE (revision 6de82acfe6864ca948242ff11e50127aa1caa5fd)
+++ web/client/translations/data.de-DE (date 1581588599704)
@@ -12,12 +12,12 @@
"about_ul0_li0": "MapViewer ist ein einfache Anwendung zur Ansicht von vorkonfigurierten Karten (die optional in einer Datenbank mittels GeoStore gespeichert wurden)",
"about_ul0_li1": "MapPublisher wurde entwickelt, um auf einfache und intuitive Weise Karten und Mashups zu erstellen, zu speichern und zu teilen, die auf Inhalten von bekannten Quellen wie Google Maps und OpenStreetMap oder von Diensten die auf offenen Protokollen wie OGC WMS, WFS, WMTS or TMS und so weiter basieren. Für mehr Informationen siehe die",
Index: web/client/reducers/layers.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/client/reducers/layers.js (revision 8c7f43eb38f2e17e9fec7b7816c5fb96dde08622)
+++ web/client/reducers/layers.js (date 1579704777330)
@@ -163,8 +163,23 @@
// TODO remove
return assign({}, layer, {visibility: false});
@gannebamm
gannebamm / ms2_composer_plugins.js
Created February 24, 2020 16:00
Add Group Button for Mapstore2 with GeoNode
// Needs base_plugins and map_viewer_plugins
var MS2_EDIT_PLUGINS = {
"desktop": [
// Map from base BackgroundSelector, Identify from map_plugins
{
"name": "TOC",
"cfg": {
"activateQueryTool": true,
"activateAddLayerButton": true,
@gannebamm
gannebamm / layers.js
Created January 22, 2020 14:55
mutally exclusive layers in group with title 'exclusive'
// LINE 146
case CHANGE_LAYER_PROPERTIES: {
const flatLayers = (state.flat || []);
let isBackground = flatLayers.reduce(
(background, layer) => background || (layer.id === action.layer && layer.group === 'background'),
false);
const newLayers = flatLayers.map((layer) => {
if ( includes(castArray(action.layer), layer.id )) {
return assign(
{},
@gannebamm
gannebamm / devMapstore2_GeoNode.md
Last active January 14, 2020 10:52
GettingStarted: Developing for the MapStore2 GeoNode client
@gannebamm
gannebamm / md_viewservice.xml
Created November 28, 2019 18:54
metadata for an INSPIRE conformant viewservice
<?xml version="1.0" encoding="UTF-8"?>
<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">
<!--TG Recommendation C.1: metadata/2.0/rec/common/fileIdentifier: The metadata record should contain a globally unique and persistent fileIdentifier element.-->
<gmd:fileIdentifier>
<gco:CharacterString>a479a63f-386d-44a6-a53f-83d3e396c3dc</gco:CharacterString>
</gmd:fileIdentifier>
<!--TG Requirement C.5: metadata/2.0/req/common/metadata-language-code: The language of the provided metadata content shall be given. It shall be encoded using gmd:MD_Metadata/gmd:language/gmd:LanguageCode element po