Skip to content

Commit b2c0aac

Browse files
initial
0 parents  commit b2c0aac

20 files changed

+6869
-0
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "easydb-library"]
2+
path = easydb-library
3+
url = git@github.com:programmfabrik/easydb-library.git

LICENSE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
This is free and unencumbered software released into the public domain.
2+
3+
Anyone is free to copy, modify, publish, use, compile, sell, or
4+
distribute this software, either in source code form or as a compiled
5+
binary, for any purpose, commercial or non-commercial, and by any
6+
means.
7+
8+
In jurisdictions that recognize copyright laws, the author or authors
9+
of this software dedicate any and all copyright interest in the
10+
software to the public domain. We make this dedication for the benefit
11+
of the public at large and to the detriment of our heirs and
12+
successors. We intend this dedication to be an overt act of
13+
relinquishment in perpetuity of all present and future rights to this
14+
software under copyright law.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.
23+
24+
For more information, please refer to <http://unlicense.org>

Makefile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
ZIP_NAME ?= "customDataTypeGeoref.zip"
2+
PLUGIN_NAME = "custom-data-type-georef"
3+
4+
# coffescript-files to compile
5+
COFFEE_FILES = commons.coffee \
6+
CustomDataTypeGeoref.coffee \
7+
CustomDataTypeGeorefFacet.coffee \
8+
GeorefUtils.coffee
9+
10+
MAPBOX1 = src/external/mapbox-gl.js
11+
MAPBOX2 = src/external/mapbox-gl-draw.js
12+
MAPBOX3 = src/external/geojson-extent.js
13+
MAPBOX4 = src/external/geo-viewport.js
14+
MAPBOX5 = src/external/mapbox-gl-geocoder.min.js
15+
16+
TURF_REWIND = src/external/turfRewind.js
17+
18+
CSS_FILE = src/webfrontend/css/main.css
19+
CSSGEOCODER = src/external/mapbox-gl-geocoder.css
20+
CSSGLDRAW = src/external/mapbox_gl_draw.css
21+
CSSADDITIONAL = src/external/mapbox.css
22+
23+
help:
24+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
25+
26+
all: build ## build all
27+
28+
build: clean ## clean, compile, copy files to build folder
29+
30+
mkdir -p build
31+
mkdir -p build/$(PLUGIN_NAME)
32+
mkdir -p build/$(PLUGIN_NAME)/webfrontend
33+
mkdir -p build/$(PLUGIN_NAME)/l10n
34+
35+
cp src/webfrontend/css/main.css build/$(PLUGIN_NAME)/webfrontend/customDataTypeGeoref.css # copy css
36+
cat $(CSS_FILE) $(CSSGEOCODER) $(CSSGLDRAW) $(CSSADDITIONAL) >> build/$(PLUGIN_NAME)/webfrontend/customDataTypeGeoref.css
37+
38+
mkdir -p src/tmp # build code from coffee
39+
cp easydb-library/src/commons.coffee src/tmp
40+
cp src/webfrontend/*.coffee src/tmp
41+
cd src/tmp && coffee -b --compile ${COFFEE_FILES} # bare-parameter is obligatory!
42+
43+
# first: commons! Important
44+
cat src/tmp/commons.js > build/$(PLUGIN_NAME)/webfrontend/customDataTypeGeoref.js
45+
cat src/tmp/CustomDataTypeGeoref.js >> build/$(PLUGIN_NAME)/webfrontend/customDataTypeGeoref.js
46+
cat src/tmp/CustomDataTypeGeorefFacet.js >> build/$(PLUGIN_NAME)/webfrontend/customDataTypeGeoref.js
47+
cat src/tmp/GeorefUtils.js >> build/$(PLUGIN_NAME)/webfrontend/customDataTypeGeoref.js
48+
49+
cat $(MAPBOX1) $(MAPBOX2) $(MAPBOX3) $(MAPBOX4) $(MAPBOX5) $(TURF_REWIND) >> build/$(PLUGIN_NAME)/webfrontend/customDataTypeGeoref.js
50+
51+
cp l10n/custom-data-type-georef.csv build/$(PLUGIN_NAME)/l10n/customDataTypeGeoref.csv # copy l10n
52+
53+
cp manifest.master.yml build/$(PLUGIN_NAME)/manifest.yml # copy manifest
54+
55+
clean: ## clean
56+
rm -rf build
57+
58+
zip: build ## build zip file
59+
cd build && zip ${ZIP_NAME} -r $(PLUGIN_NAME)/

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
> This Plugin / Repo is being maintained by a community of developers.
2+
There is no warranty given or bug fixing guarantee; especially not by
3+
Programmfabrik GmbH. Please use the github issue tracking to report bugs
4+
and self organize bug fixing. Feel free to directly contact the committing
5+
developers.
6+
7+
# fylr-plugin-custom-data-type-georef
8+
9+
This is a plugin for [fyr](http://docs.fylr.io/) with Custom Data Type `CustomDataTypeGeoref` for referencing to geoJSON-Objects. See [http://geojson.org/](http://geojson.org/) and https://de.wikipedia.org/wiki/GeoJSON
10+
11+
The Plugins uses the [Mapbox-API](https://www.mapbox.com/api-documentation/) for the Map-Rendering and magic. You can set Polygons, Linestrings and Points on the worldmap. This is saved in geojson-Format.
12+
13+
## installation
14+
The latest version of this plugin can be found [here](https://github.com/programmfabrik/fylr-plugin-custom-data-type-georef/releases/latest/download/customDataTypeGeoref.zip).
15+
16+
The ZIP can be downloaded and installed using the plugin manager, or used directly (recommended).
17+
18+
Github has an overview page to get a list of [all releases](https://github.com/programmfabrik/fylr-plugin-custom-data-type-georef/releases/).
19+
20+
## configuration
21+
22+
As defined in `manifest.master.yml` this datatype can be configured:
23+
24+
### Schema options
25+
26+
* which "mapbpox-API-key" to use
27+
* show "geocoder" for adresssearch?
28+
* allow to add POINT via text?
29+
* allow to add LINESTRING via text?
30+
* allow to add POLYGON via text?
31+
32+
### Mask options
33+
34+
* none
35+
36+
## saved data
37+
38+
* conceptName
39+
* type of geoFeature (polygon, point, line)
40+
* conceptURI
41+
* information in geoJSON-standard-format
42+
* conceptGeoJSON
43+
* information in geoJSON-standard-format
44+
* _fulltext
45+
* easydb-fulltext
46+
* _standard
47+
* easydb-standard
48+
* _standard.geo
49+
* easydb-standard
50+
* facetTerm
51+
* easydb-standard
52+
53+
## sources
54+
55+
The source code of this plugin is managed in a git repository at <https://github.com/programmfabrik/fylr-plugin-custom-data-type-georef>

easydb-library

Submodule easydb-library added at 61b9281

l10n/custom-data-type-georef.csv

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
key,de-DE,en-US,it-IT,es-ES
2+
custom.data.type.georef.name,Freie Georeferenzierung auf Karte setzen (Georef),Free georeferencing on map (Georef),,
3+
custom.data.type.georef.edit.button|icon,edit,edit,,
4+
custom.data.type.georef.remove.button|icon,trash,trash,,
5+
custom.data.type.georef.config.option.mask.editor_style.value.inline,Eingebettet,Embedded,,
6+
custom.data.type.georef.setting.mask.editor_style,Editor-Stil,Editor-Style,,
7+
custom.data.type.georef.config.option.mask.editor_style.value.popover,Popover,Popover,,
8+
custom.data.type.georef.modal.form.url.placeholder,georef-Verknüpfung,georef-Link,,
9+
custom.data.type.georef.modal.form.text.label,Text,TEst,,
10+
custom.data.type.georef.edit.modal.title|text,Freie Georeferenzierung auf Karte setzen (Georef),Free georeferencing on map (Georef),,
11+
custom.data.type.georef.edit.no_valid_georef,Keine valide georef-Verknüpfung,No valid georef-link,,
12+
custom.data.type.georef.edit.no_georef,Keine georef-Verknüpfung gesetzt,No georef-link,,
13+
custom.data.type.georef.modal.form.text.result.placeholder,noch leer,empty,,
14+
custom.data.type.georef.modal.form.text.uri.label.placeholder,noch leer,empty,,
15+
custom.data.type.georef.config.parameter.schema.mapbox_access_token.value.label,Mapbox-Access-Token (für Kartenanzeige benötigt),Mapbox Access Token (required for map display),,
16+
custom.data.type.georef.edit.choosen_type,Gewählter Typ,Choosen type,,
17+
custom.data.type.georef.edit.linked_georef,Verknüpfte Georeferenzierung,Linked georeferencing,,
18+
custom.data.type.georef.edit.kartenansicht,Kartenansicht,Map,,
19+
custom.data.type.georef.config.parameter.schema.use_geocoder.value.label,Geocoder,Geocoder,,
20+
custom.data.type.georef.config.parameter.schema.use_geocoder.value.checkbox,Fügt der Karte ein Geokodierungs-Steuerelement hinzu mit dem Sie die Karte nach einem Ort durchsuchen können,adds a geocoding control to the map which enables you to search the map for a place,,
21+
custom.data.type.georef.modal.form.text.georef_empty,noch keine Georeferenzierung,no georeferencing yet,,
22+
custom.data.type.georef.config.parameter.schema.allow_textinput_point.value.label,Texteingabe,Textinput,,
23+
custom.data.type.georef.config.parameter.schema.allow_textinput_linestring.value.label,Texteingabe,Textinput,,
24+
custom.data.type.georef.config.parameter.schema.allow_textinput_polygon.value.label,Texteingabe,Textinput,,
25+
custom.data.type.georef.config.parameter.schema.allow_textinput_point.value.checkbox,Für POINT erlauben,Allow for POINT,,
26+
custom.data.type.georef.config.parameter.schema.allow_textinput_linestring.value.checkbox,Für LINESTRING erlauben,Allow for LINESTRING,,
27+
custom.data.type.georef.config.parameter.schema.allow_textinput_polygon.value.checkbox,Für POLYGON erlauben,Allow for POLYGON,,
28+
29+
custom.data.type.georef.controls.addnew.point.label,POINT,POINT,,
30+
custom.data.type.georef.add_new.point.header_left,POINT eingeben,POINT input,,
31+
custom.data.type.georef.add_new.modal.form.latitude,Latitude,Latitude,,
32+
custom.data.type.georef.add_new.modal.form.latitude.hint,"Geographische Breite / Breitengrad.\nBeispiel: 9.95033","Geographic Latitude. Example: 9.95033",,
33+
custom.data.type.georef.add_new.modal.form.longitude,Longitude,Longitude,,
34+
custom.data.type.georef.add_new.modal.form.longitude.hint,"Geographische Länge / Längengrad.\nBeispiel: 51.53723","Geographic Longitude. Example: 51.53723",,
35+
36+
custom.data.type.georef.controls.addnew.linestring.label,LINESTRING,LINESTRING,,
37+
custom.data.type.georef.add_new.linestring.header_left,LINESTRING eingeben,LINESTRING input,,
38+
custom.data.type.georef.add_new.modal.form.linestring,Linestring,Linestring,,
39+
custom.data.type.georef.add_new.modal.form.hintlabel,Hinweise,Hints,,
40+
custom.data.type.georef.add_new.modal.form.linestring.examples,"Beispiel: \n\n[ [ 9.82, 51.61 ], [ 9.86, 51.53 ], [ 10.00, 51.52 ], [ 10.05, 51.47 ] ]\n\n[ [Längengrad, Breitengrad], [Längengrad, Breitengrad] ]","Example: [ [ 9.82, 51.61 ], [ 9.86, 51.53 ], [ 10.00, 51.52 ], [ 10.05, 51.47 ] ]\n\n[ [longitude, latitude], [longitude, latitude] ]",,
41+
custom.data.type.georef.add_new.modal.form.linestring.hints,"Koordinaten in einem GeoJSON-Linestring bestehen aus geografischen Breiten- & Längengraden im WGS 84-Koordinatensystem. Die Koordinaten werden als kommaseparierte Paare in einer als Linie geordneten Reihenfolge dargestellt, wobei zuerst die Längengrade (X-Koordinaten) und dann die Breitengrade (Y-Koordinaten) angegeben werden. Spezifikation: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.4","Coordinates in a GeoJSON linestring consist of geographic latitudes and longitudes in the WGS 84 coordinate system. The coordinates are presented as comma-separated pairs in a line-ordered order, with longitude (X coordinates) given first and then latitude (Y coordinates). Specification: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.4",,
42+
43+
custom.data.type.georef.controls.addnew.polygon.label,POLYGON,POLYGON,,
44+
custom.data.type.georef.add_new.polygon.header_left,POLYGON eingeben,POLYGON input,,
45+
custom.data.type.georef.add_new.modal.form.polygon,Polygon,Polygon,,
46+
custom.data.type.georef.add_new.modal.form.hintlabel,Hinweise,Hints,,
47+
custom.data.type.georef.add_new.modal.form.polygon.examples,"Beispiel: \n\n[ [ [ 9.506, 51.813 ], [ 9.550, 51.238 ], [ 10.583, 51.266 ], [ 10.429, 51.799 ], [ 9.506, 51.813 ] ] ]\n\n[ [Längengrad, Breitengrad], [Längengrad, Breitengrad], [Längengrad, Breitengrad], [Längengrad, Breitengrad] ]","Example: [ [ [ 9.506, 51.813 ], [ 9.550, 51.238 ], [ 10.583, 51.266 ], [ 10.429, 51.799 ], [ 9.506, 51.813 ] ] ]\n\n[ [longitude, latitude], [longitude, latitude], [longitude, latitude], [longitude, latitude], [...] ]",,
48+
custom.data.type.georef.add_new.modal.form.polygon.hints,"Ein GeoJSON Polygon repräsentiert eine geschlossene Fläche auf einer Karte und besteht aus einer geordneten Liste von Koordinatenpaaren, wobei jeder Punkt die Ecke des Polygons darstellt. Diese Koordinaten sind im WGS 84-Koordinatensystem angegeben, wobei zuerst die Längengrade (X-Koordinaten) und dann die Breitengrade (Y-Koordinaten) angegeben werden. Die ersten und letzten Koordinaten in der Liste sind identisch, um das Polygon zu schließen. Spezifikation: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6","A GeoJSON polygon represents a closed area on a map and consists of an ordered list of coordinate pairs, where each point represents the corner of the polygon. These coordinates are given in the WGS 84 coordinate system, with longitude (X coordinates) given first and then latitude (Y coordinates). The first and last coordinates in the list are the same to close the polygon. Specification: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6",,
49+
50+
51+
custom.data.type.georef.add_new.modal.cancel_button,Abbrechen,Cancel,,
52+
custom.data.type.georef.add_new.modal.ok,Ok,Ok,,
53+
custom.data.type.georef.add_new.modal.error,Werte nicht lesbar,Values incorrect,,

manifest.master.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
plugin:
2+
name: custom-data-type-georef
3+
version: 1.3
4+
url: https://github.com/programmfabrik/fylr-plugin-custom-data-type-georef
5+
displayname:
6+
de-DE: georef-Verknüpfung
7+
en-US: georef-Referencing
8+
info:
9+
de-DE: Ermöglicht Georeferenzierungen auf einer Karte im geoJSON-Format.
10+
en-US: Enables georeferencing on a map in geoJSON format.
11+
server:
12+
api-version:
13+
require: 1
14+
l10n: l10n/customDataTypeGeoref.csv
15+
webfrontend:
16+
url: customDataTypeGeoref.js
17+
css: customDataTypeGeoref.css
18+
19+
base_url_prefix: "webfrontend"
20+
21+
custom_types:
22+
georef:
23+
mapping:
24+
conceptName:
25+
type: text
26+
conceptURI:
27+
type: text
28+
facetTerm:
29+
type: text_l10n
30+
config:
31+
schema:
32+
- name: mapbox_access_token
33+
parameters:
34+
value:
35+
type: text
36+
- name: use_geocoder
37+
parameters:
38+
value:
39+
type: bool
40+
- name: allow_textinput_point
41+
parameters:
42+
value:
43+
type: bool
44+
- name: allow_textinput_linestring
45+
parameters:
46+
value:
47+
type: bool
48+
- name: allow_textinput_polygon
49+
parameters:
50+
value:
51+
type: bool
52+
- name: allow_textinput_geojson
53+
parameters:
54+
value:
55+
type: bool

src/external/geo-viewport.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)