The geoMetadata Plugin (formerly known as OJS Geo Plugin or 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 BMFTR-funded projects OPTIMETA and KOMET.
The KOMET team develops further plugins like the citationManager and pidManager. Visit the KOMET project website for a full overview of the project output.
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. Authors can also choose to specify the temporal range within which the research was conducted. In the article view, the properties specified by the author are then displayed and available for download as geoJSON. In addition, the information is also added to the HTML source code of article’s landing pages in a semantically meaningful way.
A first prototype of the geoMetadata 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.
You can download OJS via the PKP Software Download Section. A detailed GetStarted Guide for installing OJS is available.
Once OJS has been installed, the plugin must be downloaded and installed.
- Clone the code repository and save the contents into the directory
ojs/plugins/generic/geoMetadata
in your OJS installation. - Checkout the desired OJS version of the geoMetadata code repository by selecting the corresponding branch e.g.
stable-3_3_0
. - Run
composer install
inojs/plugins/generic/geoMetadata
to download JavaScript dependencies for the plugin using Asset Packagist. - Activate the plugin in the OJS plugin settings (OJS > Dashboard > Website > Plugins > Installed Plugins) and continue with Configuration.
See releases at https://github.com/TIBHannover/geoMetadata/releases. In the GitHub Release View you will find 4 archives in the assets of the corresponding release:
- The
geoMetadata.tar.gz
andgeoMetadata.zip
archive contain the plugin's source code, along with the necessary JavaScript dependencies. No further installation via composer is required, the plugin is ready to use. Source code (zip)
andSource code (tar.gz)
contain only the plugin source code. Further installation via composer is required (See Step 3. From Source).
We recommend downloading either the geoMetadata.tar.gz
or the geoMetadata.zip
archive, which include the JavaScript dependencies. The following guidelines will guide you through the installation process using these archives. There are two options available:
- Download as
zip
-archive ortar.gz
-archive. Renaming is not required. - Use the button
Upload a New Plugin
in the OJS plugin settings (OJS > Dashboard > Website > Plugins > Installed Plugins). - Select the
zip
-archive ortar.gz
-archive for upload and click theSave
-button. - Activate the plugin in the OJS plugin settings (OJS > Dashboard > Website > Plugins > Installed Plugins) and continue with Configuration.
- The upload limit in OJS is 2 MB by default. To upload the geoMetadata plugin, you need to increase this limit in the used
php.ini
-file.- If you do not know where the
php.ini
file is located, you can find it by creating aninfo.php
-file in your server folder containing the following content:echo "<?php phpinfo();" >
- Open the
info.php
-file in a browser to check the location (property:Loaded Configuration File
) of thephp.ini
-file.
- Open the
- The following properties need to be adapted:
post_max_size = 100M
upload_max_filesize = 100M
- To apply the changes in the
php.ini
-file, a restart of Apache and OJS is required.
- If you do not know where the
- If you want to upload the plugin as
tar.gz
-archive you need to define thetar
-path in the OJS configuration file (config.inc.php
).- code sequence in the
config.inc.php
:; tar (used in backup plugin, translation packaging) tar = /bin/tar
- If you are not aware of the
tar
-path on your system you can find it out by using the following command in the terminal:which tar
.
- code sequence in the
- Download as
zip
-archive ortar.gz
-archive and uncompress it. - Save the contents into the directory
ojs/plugins/generic/geoMetadata
in your OJS installation.- It is important to store the content in the directory
ojs/plugins/generic/geoMetadata
and not in a directory including the tag e.g.ojs/plugins/generic/geoMetadata-1.0.0.0-beta
.
- It is important to store the content in the directory
- Activate the plugin in the OJS plugin settings (OJS > Dashboard > Website > Plugins > Installed Plugins) and continue with Configuration.
You have to specify your username for the GeoNames API, so that an alignment for the administrative units is possible.
- Create an account on https://www.geonames.org/login and enable it by clicking the activiation link you receive via email.
- Go to https://www.geonames.org/manageaccount and enable your account for free web services.
- Enter the username and the GeoNames BaseURL in the settings (OJS > Dashboard > Website > Plugins > Installed Plugins > geoMetadata > blue arrow > Settings).
The plugin displays geospatial information for each article included in an issue on a map on the issue page. To enable this feature, you need to change a line of code in the main OJS code.
You need to add the following line of code to the issue_toc.tpl in line 130:
{call_hook name="Templates::Issue::TOC::Main"}
With your adaptations, this section of the file should look like this:
{/foreach} # line 129
{call_hook name="Templates::Issue::TOC::Main"} # line 130
</div><!-- .sections --> # line 131
The plugin displays geospatial information for each article included in a journal on a map.
This map is available via the URL <journal URL>/map
, e.g., https://example-publisher.org/index.php/exampleJournal/map
.
This map is always available via the URL, but you can carry out the following steps to make it accessible to users with a button in the Primary Navigation Menu.
- Enter the corresponding menu (OJS > Dashboard > Website > Setup > Navigation).
- Add the Navigation Menu Item Map.
- Add Item
- Title: Map
- Navigation Menu Type: Remote URL
- URL: journalURL/map
- Add Navigation Menu Item Map to Primary Navigation Menu.
- If the Primary Navigation Menu is available.
- Blue Arrow next to Primary Navigation Menu
- Edit
- Place the Menu Item Map at the place where the user should find it. You can move the item Map from the Unassigned Menu Items to the Assigned Menu Items.
- If the Primary Navigation Menu is not available you have to create it.
- Add Menu
- Title: Primary Navigation Menu
- Active Theme Navigation Areas: primary
- Place all items the user should find in the menu including the item Map. You can move the items from the Unassigned Menu Items to the Assigned Menu Items.
- If the Primary Navigation Menu is available.
Further information on the geoJSON specification is available via a wiki.
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.
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.
Tests are run with Cypress, for which dependencies are installed with npm using the package.json
.
# 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.
- Start docker-compose configuration (see above)
- Start Cypress (see above)
- Write tests, run them in Cypress
- If you need a clean start (= empty database) for a test, stop the docker-compose configuration, delete it (
down --volume
) and restart it
- Run
composer update
andcomposer install
- Update the releaseVersion in the
version.xml
e.g.<release>1.0.1.0-beta</release>
- Create a corresponding commit and push it to GitHub
- Add a git tag and push it to GitHub
git tag -a vReleaseVersion -m "release vReleaseVersion"
e.g.git tag -a v1.0.1.0-beta -m "release v1.0.1.0-beta"
- The tag is now connected to the beforehand pushed commit with the changed
version.xml
- The tag is now connected to the beforehand pushed commit with the changed
git push origin tag vReleaseVersion
e.g.git push origin tag v1.0.1.0-beta
- Create a
zip
andtar.gz
archive of the local repository including the required dependencies fromvendor/
andjs/lib/
but excluding exclude non-essential files.zip
-archivezip -r geoMetadata.zip geoMetadata --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/*'
tar.gz
-archivetar -czf geoMetadata.tar.gz \ --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/*' \ geoMetadata
- Create a new release on GitHub using the tag just created, with a fitting title, description and, if necessary, check the
pre-release
box - Upload the both archives as binaries to the release on GitHub
- Publish release
Later release workflows will include usage of the PKP CLI tool, see https://docs.pkp.sfu.ca/dev/plugin-guide/en/release.
This project is published under GNU General Public License, Version 3.