Giter VIP home page Giter VIP logo

ojsgeo's Introduction

OPTIMETA Logo KOMET Logo

OJS Geo Plugin

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. DOI

The OJS Geo Plugin (formely OPTIMETA Geo Plugin) offers a novel way to capture and provide geospatial properties of research articles in Open Journal Systems (OJS). It is developed as part of the BMBF-funded projects OPTIMETA and KOMET. The OPTIMETA team also develops the OPTIMETA Citations Plugin for capturing articles' citation information and contributing these to the metadata commons.

A first prototype of the OJS Geo Plugin was developed under the name geoOJS by Tom Niers for the BSc. thesis Geospatial Metadata for Discovery in Scholarly Publishing; the work was presented at The Munin Conference on Scholarly Publishing, 2020, see recording.

Alt-Text
Screenshot of entering geospatial properties in the OJS submission process

Authors can either search for a location and accept the suggested bounding box or manually create one or more suitable geometric shape(s) on a map. If authors enter geometries, a gazetteer is used to suggest a matching administrative unit’s name to the author. This allows the plugin to store geospatial data in two forms: as text, using an administrative unit or standardised geographical norm data, and as geospatial coordinates in GeoJSON format. Thereby the coordinates are stored accurately, while at the same time a textual description is accessible and flexible for non-map-related usage. In addition to displaying geospatial information on maps, it is also added to the HTML source code of article’s landing pages in a semantically meaningful way. In the article view, the properties specified by the author are then displayed and available for download as geoJSON.

screenshot of geo plugin
Screenshot of geospatial properties in the OJS article view

Download & Installation

Release

See releases at https://github.com/TIBHannover/ojsGeo/releases. The release bundles contain plugin source code as well as the the required JavaScript dependencies so the plugin is ready to be used. Note that you need the OJGS Geo Plugin Theme for some of the frontend displays, see https://github.com/ifgi/optimetaGeoTheme.

From source

  1. Checkout the desired version from the code repository and save the contents into ojs/plugins/generic/ojsGeo in your OJS installation
  2. Run composer install to download JavaScript dependencies for the plugin using Asset Packagist Go to js/lib/leaflet-control-geocoder and run npm install (see this issue)
  3. Activate the plugin in the OJS plug-in settings
  4. Install and activate the OJS Geo Plugin Theme: https://github.com/ifgi/optimetaGeoTheme/releases

Configuration

  1. Configure GeoNames

    You have to specify your username for the GeoNames api, so that an alignment for the administrative units is possible.

    1. Create an account on https://www.geonames.org/login and enable it by clicking the activiation link you get via email
    2. Go to https://www.geonames.org/manageaccount and enable your account for free web services
    3. Enter the username in the settings (OJS > Settings > Website > Plugins > Installed Plugins > OJS Geo Plugin > blue arrow > Settings)
  2. Configure theme

    Set the name of your used theme.

Further information is available in the wiki.

Contribute

All help is welcome: asking questions, providing documentation, testing, or even development.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Notes about accuracy

The spatial metadata is saved in GeoJSON format using the EPSG:4326 coordinate reference system (CRS) and the underlying dynamic WGS84 datum. This means that even the same coordinates can point to different locations on Earth over time, as the so called "epoch" is not saved. However, this only leads to an uncertainty of about +/- 2 m, which is generally no problem at all for the use case of global dataset discovery. For a nice explainer on this (non) issue see this informative thread on Twitter by Nyall Dawson.

Testing

Tests are run with Cypress, for which dependencies are installed with npm using the package.json.

Running Cypress locally

# see also Cypress' system dependencies at https://docs.cypress.io/guides/getting-started/installing-cypress#Advanced-Installation
npm install

npx cypress open

# start compose configuration for desired OJS version, running on port 8080; OJS_VERSION is a image tag for pkpofficial/ojs
export OJS_VERSION=3_3_0-11 && docker-compose --file cypress/docker-compose-mysql.yml down --volume && docker-compose --file cypress/docker-compose-mysql.yml up
export OJS_VERSION=3_2_1-4 && docker-compose --file cypress/docker-compose-mysql.yml down --volume && docker-compose --file cypress/docker-compose-mysql.yml up

# open/run Cypress tests with a given OJS version
npm run cy_open
npm run cy_run

To debug, add debugger; to the code and make sure to have the developer tools open in the browser windows started by Cypress.

Writing tests

  1. Start docker-compose configuration (see above)
  2. Start Cypress (see above)
  3. Write tests, run them in Cypress
  4. If you need a clean start (= empty database) for a test, stop the docker-compose configuration, delete it (down --volume) and restart it

Create a release

  1. Run composer update and composer install

  2. Update the release version in version.xml

  3. Add a git tag and push it to GitHub

  4. Create a zip archive of the local files with the following command to include the required dependencies from vendor/ and js/lib/ but to exclude non-essential files:

    rm ojsGeo.zip && zip -r ojsGeo.zip ./ --exclude '*.git*' --exclude '*.github/*' --exclude 'node_modules/*' --exclude '*cypress/*' --exclude '*.gitignore*' --exclude '*.npmignore*' --exclude '*messages.mo*' --exclude '*cypress.config.js*' --exclude '*CONDUCT.md*' --exclude '*screenshots/*'
  5. Create a new release on GitHub using the tag just created, with a fitting title, description and, if need be, the pre-release box checked

  6. Upload the archive to the release on GitHub

Later release workflows will include usage of the PKP CLI tool, see https://docs.pkp.sfu.ca/dev/plugin-guide/en/release.

License

This project is published under GNU General Public License, Version 3.

ojsgeo's People

Contributors

an-ette avatar gaziyucel avatar nuest avatar tnier01 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

nuest gaziyucel

ojsgeo's Issues

Add script for downloading JS and CSS from CDNs for use in plugin

$urlLeafletCSS = 'https://unpkg.com/[email protected]/dist/leaflet.css';
$urlLeafletJS = 'https://unpkg.com/[email protected]/dist/leaflet.js';
$urlLeafletDrawCSS = 'https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.css';
$urlLeafletDrawJS = 'https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.js';
$urlMomentJS = 'https://cdn.jsdelivr.net/momentjs/latest/moment.min.js';
$urlDaterangepickerJS = 'https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js';
$urlDaterangepickerCSS = 'https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css';
$urlLeafletControlGeocodeJS = 'https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js';
$urlLeafletControlGeocodeCSS = 'https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.css';
/

Add support for Marc21 geospatial metadata

Add test setup

Show article geospatial metadata on article page

Antrag: "die artikel- und zeitschriftenspezifische Verfügbarmachung [..] über die kartografische bzw. grafische Darstellung der räumlichen und zeitlichen Ausdehnung einzelner und aller Artikel einer Zeitschrift"

  • show article on a map
  • #63

Geospatial metadata is accessible via the OJS API

Antrag: "die artikel- und zeitschriftenspezifische Verfügbarmachung [...], über die OJS-API (REST API Usage Guide: https://docs.pkp.sfu.ca/dev/api/; Enkodierung z. B. als GeoJSON oder Linked Open Data in Turtle: https://de.wikipedia.org/wiki/Turtle_(Syntax)​)"

Not sure how this could really work. Maybe have a http://ojs/article/geo.json endpoint?

  • API endpoint providing data for each article
  • Use the API endpoint for articles for the download button
  • API endpoint providing data for each issue > #29
  • API endpoint providing data for each journal > -29
  • Create an issue about transferring the existing maps to the new API endpoint
  • Add info about API below each map

Authors can enter a place name and get a suggestion for a region

Antrag: "die Verknüpfung von Geometrien und Ortsnamen (Vorschlagen von (normierter) Geometrien und Namen über Gazetteers (z. B. GeoNames, ​https://www.geonames.org/, Datenbanken mit Administrationsgrenzen (z. B. GADM, https://gadm.org/​, und Normdaten (z. B. Gemeinsame Normdatei - GND, ​https://www.dnb.de/DE/Professionell/Standardisierung/GND/gnd_node.html​ )"

Amdministrative regions first, fixed datasets, possible consider #28


Gazetteer candidates


Steps gazetteer

  • implement abstraction layer for gazetteers try out Geocoder PHP and how it can be integrated with the JavaScript code to sync text and map
  • implement generic configuration UI, possibly generated, or just for selected providers?
  • tunnel the requests through OJS to not expose third party authentication details, see tnier01/geoOJS#5 > check notes of call, likely Geocoder PHP solves this for us
  • make Komot Phonton (no login required) default

Steps datasets

  • check licenses of available datasets
  • datasets are probably to large to be shipped with the plugin > add download functionality? ideally this is fully automated (pick one from the list, it gets downloaded and enabled)
    • do datasets need to be preprocessed to be used?
  • implement abstraction layer, ideally integrate with gazetteer
  • integrate 2-3 repositories

Geospatial metadata is embedded in the HTML

Antrag: "die artikel- und zeitschriftenspezifische Verfügbarmachung über Einbettung ins HTML (z. B. über Mikroformate (​http://microformats.org/wiki/h-geo​) und Element von Dublin Core (Dublin Core ‘Coverage’ ist bereits rudimentär als einfaches Textfeld im Dublin Core Meta Plugin umgesetzt, jedoch sollten hier die Nutzung von ‘Spatial Coverage’ und ‘Temporal Coverage’, ggf. sogar DCLite4G, https://wiki.osgeo.org/wiki/DCLite4G​, geprüft werden), und Schema.org, ​https://schema.org/GeoShape​)"

Geospatial search

Antrag: "Die erweiterten Suchfunktionen nutzen räumliche Indizes für räumliche und zeitlichen Einschränkung der Ergebnisse bei Artikelsuche."

  • use a proper spatial index (database? search database?)
  • allow users to show all articles in a specific country
  • simplify search, e.g., just "overlaps" queries

Derive geospatial extent based on provided data

Antrag: "Die automatische Extraktion unterstützt hochgeladene Geodaten, Links zu ausgewählten Diensten, und die Herleitung von Geodaten über Titel und Abstract des Artikels mit einem Gazetteer."

Authors can enter geospatial extent on a map

Antrag: "Nutzer-getriebene Metadatenerfassung einfacher Geometrien auf Basis einer Web-Karte (Punkte, Linien, Polygone; Erfassung auf Basis von Leaflet: ​ https://leafletjs.com/)"

  • [ ] create wireframes (necessary?)
  • implement storage of geodata
    • Geodaten als GeoJSON
    • Well-Known-Text/WKT?
    • ... in MySQL

Update all dependencies

Support arbitrary or admin-provided regions

From tnier01/geoOJS#14

Instead of administrative units, also other spatial entities can be of interest. For an ecological journal, World Protected Areas (protectedplanet.net/en) are probably more interesting, than administrative units. So the integration of alternative spatial entities would be worthwhile. Or maybe not only the initial integration but also the possibility for the journal operators to integrate alternative spatial entities themselves, e.g. based on a GeoPackage.

Derive geospatial extent based on links to external sources

Antrag: "Die automatische Extraktion unterstützt hochgeladene Geodaten, Links zu ausgewählten Diensten, und die Herleitung von Geodaten über Titel und Abstract des Artikels mit einem Gazetteer."

Candidates

Test geospatial frameworks for PHP and Laravel

Goal

Find out which PHP library is the most promising one to support our requirements and works well with the OJS tooling, e.g., Laravel, and support the required databases (primarily MySQL, secondary: Postgres/PostGIS)

OJS

OJS supports MySQL >= 4.1 or PostgreSQL >= 9.1.5.

This page gives a good overview of the spatial features in MySQL and MariaDB: https://mariadb.com/kb/en/mysqlmariadb-spatial-support-matrix/

Libraries

Candidates for evaluation

Other

Evaluation

First thoughts

Pro Laravel libraries: we can just integrate with the existing database migration processes, no own schema (hopefully)

Pro brick/geo: Seems to be most well maintained, no need to distinguish between MySQL and other DBMSs, but need own schema then... maybe that's not so hard because we will be the only one

Tasks

  • re-visit the libraries and check maintenance status
  • create a new database table with a spatial column using each of the candidate libraries
  • insert a GeometryCollection of a few points, lines, and polygons into a MySQL database using each of the candidate libraries, from the plugin

Remove CDN option

The option does not exist in 3.3.x anymore, can keeping it just for the backport to 3.2 is not really useful.

Add configuration options for journal administrators

From tnier01/geoOJS#7 :

  • enable/disable temporal metadata collection/display
  • enable/disable geospatial metadata collection/display
  • configure allowed geospatial shapes
  • configure validation rules for timestamps?
  • are authors allowed to manually edit the coverage string, or may it only be manipulated via the geometry input?
  • ...

(does it make sense to configure collection and display separately?)

Remove duplicate coverage element in submission view

From tnier01/geoOJS#13

If the user enabled the coverage element in the settings (Settings->Workflow->Submission->Metadata->Coverage), then there are two inputs for the coverage element in the submission view, one created by OJS and one created by the geoOJS Plugin. But both store their data in the same database element ("coverage"). Besides the initial coverage input field is not able to show the stored data, stored by the geoOJS plugin, correctly(like shown in the screenshot).

Gist: So the initial coverage input field must be disabled when using the geoOJS plugin.
Since this is only the case when "Coverage" is activated, a straightforward solution could be to set the field to enable=false in JavaScript from our plugin.

image

Show all articles of a journal on a map

Antrag: "die artikel- und zeitschriftenspezifische Verfügbarmachung [..] über die kartografische bzw. grafische Darstellung der räumlichen und zeitlichen Ausdehnung [..] aller Artikel einer Zeitschrift und im Zeitstrahl"

Transparent licensing of collected and provided metadata

The license of the spatial and temporal metadata should be made clear

  • make license description configurable for OJS instance > all target databases (COCI, Wikidata) are CC0
  • mention CC0 license to authors when they enter it (small) ("what happens with the data") in einem kleinen Popup
  • for users/developers where they are shown, e.g., #7 #29 #27
  • add license sentence under the download button and under each map/timeline

Overhaul the text around the geometadata display and forms

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.