{"id":19881455,"url":"https://github.com/giscience/measures-rest-oshdb-app","last_synced_at":"2026-04-20T03:36:57.773Z","repository":{"id":42106959,"uuid":"143151967","full_name":"GIScience/measures-rest-oshdb-app","owner":"GIScience","description":"A frontend for providing measures for geospatial datasets, using the OSHDB","archived":false,"fork":false,"pushed_at":"2022-08-16T08:11:39.000Z","size":1803,"stargazers_count":0,"open_issues_count":20,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-04T08:23:18.404Z","etag":null,"topics":["data","dggs","geospatial","measure","openstreetmap","rest"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GIScience.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-01T12:17:44.000Z","updated_at":"2022-03-01T08:36:42.000Z","dependencies_parsed_at":"2022-08-12T06:11:10.453Z","dependency_job_id":null,"html_url":"https://github.com/GIScience/measures-rest-oshdb-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GIScience/measures-rest-oshdb-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GIScience%2Fmeasures-rest-oshdb-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GIScience%2Fmeasures-rest-oshdb-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GIScience%2Fmeasures-rest-oshdb-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GIScience%2Fmeasures-rest-oshdb-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GIScience","download_url":"https://codeload.github.com/GIScience/measures-rest-oshdb-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GIScience%2Fmeasures-rest-oshdb-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266456245,"owners_count":23931383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data","dggs","geospatial","measure","openstreetmap","rest"],"created_at":"2024-11-12T17:14:19.694Z","updated_at":"2026-04-20T03:36:57.714Z","avatar_url":"https://github.com/GIScience.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![status: archive](https://github.com/GIScience/badges/raw/master/status/archive.svg)](https://github.com/GIScience/badges#archive)\n\n# Measures REST OSHDB App\n\n## Monitoring and restarting\n\nIn order to monitor and/or restart the services, please login via ssh and then execute the `measures` command, which will make you being logged in as the `measures`.  Then, you are able to monitor the services via `pm2 list` and restart services via `pm2 restart [id of the service]` or even `pm2 restart all`.\n\n## Installation\n\nIn the following, you will find a description of how to install the software on an exemplary server.  You might have to adjust the following commands in case of your own server.  The description includes the following software projects:\n\n* measures-rest-oshdb-app\n* measures-rest-oshdb-docker\n* measures-rest-sparql\n\n### Basic tools\n\n```bash\nsudo apt-get install -y autojump htop unzip\necho \". /usr/share/autojump/autojump.bash\" \u003e\u003e ~/.bashrc\n```\n\n### sftp\n\n```bash\nsudo addgroup [your username] sftp-sshallowed\n```\n\n### Docker\n\n```bash\nsudo apt-get update\nsudo apt-get install \\\n  apt-transport-https \\\n  ca-certificates \\\n  curl \\\n  software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\nsudo add-apt-repository \\\n  \"deb [arch=amd64] https://download.docker.com/linux/ubuntu \\\n  $(lsb_release -cs) \\\n  stable\"\nsudo apt-get update\nsudo apt-get install -y docker-ce\n\nsudo curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\n\nnewgrp docker\n```\n\n### Create new user\n\n```bash\nsudo adduser --disabled-password measures\nsudo usermod -a -G sudo -G docker measures\necho \"alias measures=\\\"sudo su -l measures\\\"\" \u003e\u003e ~/.profile\nsource ~/.profile\nmeasures\n```\n\n### Nodejs and pm2\n\n```bash\ncurl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -\nsudo apt-get install -y nodejs\n\nsudo npm install pm2 -g\nsudo pm2 startup\nexit\n# execute the command given in the result\n# sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u measures --hp /home/m/measures\nmeasures\n```\n\n### Install nginx\n\n```batch\nsudo apt-get install -y nginx\nsudo service nginx status\nsudo rm /etc/nginx/sites-available/default\nsudo rm /etc/nginx/sites-enabled/default\n```\n\n### Let's Encrypt\n\n```bash\nsudo apt-get update\nsudo apt-get install -y software-properties-common\nsudo add-apt-repository ppa:certbot/certbot\nsudo apt-get update\nsudo apt-get install -y certbot python-certbot-nginx\n\nsudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT\nsudo certbot --nginx --email mocnik@uni-heidelberg.de --agree-tos -n -d osm-data-quality.geog.uni-heidelberg.de -d osm-measure.geog.uni-heidelberg.de -d osm-measure-edit.geog.uni-heidelberg.de -w /var/www/html\n#sudo certbot certonly --standalone --preferred-challenges http --email mocnik@uni-heidelberg.de --agree-tos -n -d osm-data-quality.geog.uni-heidelberg.de -d osm-measure.geog.uni-heidelberg.de -d osm-measure-edit.geog.uni-heidelberg.de -w /var/www/html\n#  --staging\nsudo shutdown -r now\n```\n\nThen use `crontab -e` to add:\n\n```\n14 3 * * * certbot renew --post-hook \"service nginx restart\"\n```\n\n### Firewall\n\n```batch\nsudo iptables-unblocktcp 80 global\nsudo iptables-unblocktcp 443 global\n```\n\n### Configure nginx\n\nCreate a file `/etc/nginx/sites-available/https-redirect` (via `sudo vi`) with the following content:\n\n```\nserver {\n  listen 80;\n  listen [::]:80;\n\n  server_name osm-measure-edit.geog.uni-heidelberg.de;\n\n  location ^~ /.well-known/acme-challenge/ {\n    default_type \"text/plain\";\n    root /var/www/html/;\n  }\n\n  location / {\n    return 301 https://$host$request_uri;\n  }\n}\n```\n\nCreate a file `/etc/nginx/sites-available/osm-measure-edit` (via `sudo vi`) with the following content:\n\n```\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n\n  server_name osm-measure-edit.geog.uni-heidelberg.de;\n\n#  ssl_certificate /etc/letsencrypt/live/osm-data-quality.geog.uni-heidelberg.de/fullchain.pem;\n#  ssl_certificate_key /etc/letsencrypt/live/osm-data-quality.geog.uni-heidelberg.de/privkey.pem;\n\n  location / {\n    proxy_pass http://localhost:2999;\n  }\n}\n```\n\nThen:\n\n```bash\nsudo rm /etc/nginx/sites-enabled/default\nsudo ln -s /etc/nginx/sites-available/https-redirect /etc/nginx/sites-enabled/https-redirect\nsudo ln -s /etc/nginx/sites-available/osm-measure-edit /etc/nginx/sites-enabled/osm-measure-edit\nsudo service nginx restart\n```\n\n### Measures-rest-oshdb\n\n```bash\ncd ~\ngit clone https://github.com/mocnik-science/measures-rest-oshdb-docker\n\ncd ~\ngit clone https://github.com/mocnik-science/measures-rest-oshdb-app\ncd measures-rest-oshdb-app \u0026\u0026 npm install\nnpm run build\npm2 start pm2/osm-data-quality.geog.uni-heidelberg.de.yaml\n\ncd ~\ngit clone https://github.com/mocnik-science/measures-rest-oshdb-app measures-rest-oshdb-app-develop\ncd measures-rest-oshdb-app-develop \u0026\u0026 git checkout develop \u0026\u0026 npm install\npm2 start pm2/osm-data-quality.geog.uni-heidelberg.de.dev.yaml\nPM2_HOME=\"/home/m/measures/\" \u0026\u0026 pm2 save\n```\n\ncopy the libs\n\n### Data\n\n```bash\nmkdir ~/measures-rest-oshdb-data\nmkdir ~/measures-rest-oshdb-data/dbs\nmkdir ~/measures-rest-oshdb-data/public\nmkdir ~/measures-rest-oshdb-data/users\n```\n\n### Measures REST SPARQL\n\nTo install the SPARQL endpoint, execute the following commands:\n\n```bash\ncd ~\nsudo apt install python3-pip\ngit clone http://github.com/giscience/measures-rest-sparql\ncd measures-rest-sparql \u0026\u0026 npm install\npm2 start pm2/measures-rest-sparql.yaml\nPM2_HOME=\"/home/m/measures/\" \u0026\u0026 pm2 save\n```\n\n### Default\n\nIn addition, the static website (including the acme challenge) using nginx:\n\n```bash\nmkdir -p ~/www/osm-data-quality.geog.uni-heidelberg.de\n```\n\nThen, the data needs to be copy to this directory.  Thereafter, create a file `/etc/nginx/sites-available/osm-data-quality` (via `sudo vi`) with the following content:\n\n```\nserver {\n  listen 80 default_server;\n  listen [::]:80 default_server;\n  listen 443 ssl http2 default_server;\n  listen [::]:443 ssl http2 default_server;\n\n  server_name osm-data-quality.geog.uni-heidelberg.de;\n\n  location ^~ /.well-known/acme-challenge/ {\n    default_type \"text/plain\";\n    root /var/www/html/;\n  }\n\n#  ssl_certificate /etc/letsencrypt/live/osm-data-quality.geog.uni-heidelberg.de/fullchain.pem;\n#  ssl_certificate_key /etc/letsencrypt/live/osm-data-quality.geog.uni-heidelberg.de/privkey.pem;\n\n  root /home/m/measures/www/osm-data-quality.geog.uni-heidelberg.de;\n}\n```\n\nThen:\n\n```bash\nsudo ln -s /etc/nginx/sites-available/osm-data-quality /etc/nginx/sites-enabled/osm-data-quality\nsudo service nginx restart\n```\n\n### Publish the measures\n\nCreate a file `/etc/nginx/sites-available/osm-measure` (via `sudo vi`) with the following content:\n\n```\nserver {\n  listen 80;\n  listen [::]:80;\n\n  server_name osm-measure.geog.uni-heidelberg.de;\n\n  location ^~ /.well-known/acme-challenge/ {\n    default_type \"text/plain\";\n    root /var/www/html/;\n  }\n\n  location /api/ {\n    proxy_pass http://127.0.0.1:31415;\n  }\n  location /sparql {\n    proxy_pass http://127.0.0.1:8000;\n  }\n  location / {\n    return 301 https://$host$request_uri;\n  }\n}\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n\n  server_name osm-measure.geog.uni-heidelberg.de;\n\n#  ssl_certificate /etc/letsencrypt/live/osm-data-quality.geog.uni-heidelberg.de/fullchain.pem;\n#  ssl_certificate_key /etc/letsencrypt/live/osm-data-quality.geog.uni-heidelberg.de/privkey.pem;\n  \n  location ~ \"^/user/([0-9]{5})/\" {\n    rewrite ^/user/([0-9]+)/(.*) /$2 break;\n    proxy_pass http://127.0.0.1:$1;\n  }\n  location /api/ {\n    proxy_pass http://127.0.0.1:31415;\n  }\n  location /sparql {\n    proxy_pass http://127.0.0.1:8000;\n  }\n  location / {\n    proxy_pass http://127.0.0.1:2999/repository/;\n  }\n}\n```\n\nThen:\n\n```bash\nsudo ln -s /etc/nginx/sites-available/osm-measure /etc/nginx/sites-enabled/osm-measure\nsudo service nginx restart\n```\n\n## Author\n\nThis software is archived at HeiGIT gGmbH and not further maintained.\n\nIn 2018–2019, this software has been developed and maintained by Franz-Benjamin Mocnik, \u003cmocnik@uni-heidelberg.de\u003e, GIScience Research Group, Institute of Geography, Heidelberg University. The development has been supported by the DFG project *A framework for measuring the fitness for purpose of OpenStreetMap data based on intrinsic quality indicators* (FA 1189/3-1).\n\n(c) by Heidelberg University, 2018–2019.\n\n## License\n\nThe code is licensed under the [MIT license](https://github.com/giscience/measures-rest-oshdb/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiscience%2Fmeasures-rest-oshdb-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiscience%2Fmeasures-rest-oshdb-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiscience%2Fmeasures-rest-oshdb-app/lists"}