├── Dockerfile ├── LICENSE ├── README.md ├── _config.yml └── server ├── .jshintrc ├── api.js ├── config.js ├── package-lock.json ├── package.json ├── realtimeOSMserver.js ├── test ├── testconfig.js └── tests.js └── web ├── dashboard.css ├── dashboard.html ├── dashboard.js ├── img ├── disaster_openrouteservice.png ├── heigit_transparent.svg └── realtimeosm_screenshot.png ├── index.css ├── index.html ├── lib ├── DataTables │ ├── DataTables-1.10.18 │ │ ├── css │ │ │ ├── dataTables.bootstrap.css │ │ │ ├── dataTables.bootstrap.min.css │ │ │ ├── dataTables.bootstrap4.css │ │ │ ├── dataTables.bootstrap4.min.css │ │ │ ├── dataTables.foundation.css │ │ │ ├── dataTables.foundation.min.css │ │ │ ├── dataTables.jqueryui.css │ │ │ ├── dataTables.jqueryui.min.css │ │ │ ├── dataTables.semanticui.css │ │ │ ├── dataTables.semanticui.min.css │ │ │ ├── jquery.dataTables.css │ │ │ └── jquery.dataTables.min.css │ │ ├── images │ │ │ ├── sort_asc.png │ │ │ ├── sort_asc_disabled.png │ │ │ ├── sort_both.png │ │ │ ├── sort_desc.png │ │ │ └── sort_desc_disabled.png │ │ └── js │ │ │ ├── dataTables.bootstrap.js │ │ │ ├── dataTables.bootstrap.min.js │ │ │ ├── dataTables.bootstrap4.js │ │ │ ├── dataTables.bootstrap4.min.js │ │ │ ├── dataTables.foundation.js │ │ │ ├── dataTables.foundation.min.js │ │ │ ├── dataTables.jqueryui.js │ │ │ ├── dataTables.jqueryui.min.js │ │ │ ├── dataTables.semanticui.js │ │ │ ├── dataTables.semanticui.min.js │ │ │ ├── jquery.dataTables.js │ │ │ └── jquery.dataTables.min.js │ ├── FixedHeader-3.1.4 │ │ ├── css │ │ │ ├── fixedHeader.bootstrap.css │ │ │ ├── fixedHeader.bootstrap.min.css │ │ │ ├── fixedHeader.bootstrap4.css │ │ │ ├── fixedHeader.bootstrap4.min.css │ │ │ ├── fixedHeader.dataTables.css │ │ │ ├── fixedHeader.dataTables.min.css │ │ │ ├── fixedHeader.foundation.css │ │ │ ├── fixedHeader.foundation.min.css │ │ │ ├── fixedHeader.jqueryui.css │ │ │ ├── fixedHeader.jqueryui.min.css │ │ │ ├── fixedHeader.semanticui.css │ │ │ └── fixedHeader.semanticui.min.css │ │ └── js │ │ │ ├── dataTables.fixedHeader.js │ │ │ ├── dataTables.fixedHeader.min.js │ │ │ ├── fixedHeader.bootstrap.js │ │ │ ├── fixedHeader.bootstrap.min.js │ │ │ ├── fixedHeader.bootstrap4.js │ │ │ ├── fixedHeader.bootstrap4.min.js │ │ │ ├── fixedHeader.dataTables.js │ │ │ ├── fixedHeader.foundation.js │ │ │ ├── fixedHeader.foundation.min.js │ │ │ ├── fixedHeader.jqueryui.js │ │ │ ├── fixedHeader.jqueryui.min.js │ │ │ ├── fixedHeader.semanicui.js │ │ │ ├── fixedHeader.semanticui.js │ │ │ └── fixedHeader.semanticui.min.js │ ├── Responsive-2.2.2 │ │ ├── css │ │ │ ├── responsive.bootstrap.css │ │ │ ├── responsive.bootstrap.min.css │ │ │ ├── responsive.bootstrap4.css │ │ │ ├── responsive.bootstrap4.min.css │ │ │ ├── responsive.dataTables.css │ │ │ ├── responsive.dataTables.min.css │ │ │ ├── responsive.foundation.css │ │ │ ├── responsive.foundation.min.css │ │ │ ├── responsive.jqueryui.css │ │ │ ├── responsive.jqueryui.min.css │ │ │ ├── responsive.semanticui.css │ │ │ └── responsive.semanticui.min.css │ │ └── js │ │ │ ├── dataTables.responsive.js │ │ │ ├── dataTables.responsive.min.js │ │ │ ├── responsive.bootstrap.js │ │ │ ├── responsive.bootstrap.min.js │ │ │ ├── responsive.bootstrap4.js │ │ │ ├── responsive.bootstrap4.min.js │ │ │ ├── responsive.foundation.js │ │ │ ├── responsive.foundation.min.js │ │ │ ├── responsive.jqueryui.js │ │ │ ├── responsive.jqueryui.min.js │ │ │ ├── responsive.semanticui.js │ │ │ └── responsive.semanticui.min.js │ ├── Select-1.2.6 │ │ ├── css │ │ │ ├── select.bootstrap.css │ │ │ ├── select.bootstrap.min.css │ │ │ ├── select.bootstrap4.css │ │ │ ├── select.bootstrap4.min.css │ │ │ ├── select.dataTables.css │ │ │ ├── select.dataTables.min.css │ │ │ ├── select.foundation.css │ │ │ ├── select.foundation.min.css │ │ │ ├── select.jqueryui.css │ │ │ ├── select.jqueryui.min.css │ │ │ ├── select.semanticui.css │ │ │ └── select.semanticui.min.css │ │ └── js │ │ │ ├── dataTables.select.js │ │ │ ├── dataTables.select.min.js │ │ │ ├── select.bootstrap.js │ │ │ ├── select.bootstrap.min.js │ │ │ ├── select.bootstrap4.js │ │ │ ├── select.bootstrap4.min.js │ │ │ ├── select.dataTables.js │ │ │ ├── select.foundation.js │ │ │ ├── select.foundation.min.js │ │ │ ├── select.jqueryui.js │ │ │ ├── select.jqueryui.min.js │ │ │ ├── select.semanticui.js │ │ │ └── select.semanticui.min.js │ ├── datatables.css │ ├── datatables.js │ ├── datatables.min.css │ ├── datatables.min.js │ └── jQuery-1.12.4 │ │ ├── jquery-1.12.4.js │ │ └── jquery-1.12.4.min.js ├── jquery-ui-1.12.1 │ ├── AUTHORS.txt │ ├── LICENSE.txt │ ├── external │ │ └── jquery │ │ │ └── jquery.js │ ├── images │ │ ├── ui-icons_444444_256x240.png │ │ ├── ui-icons_555555_256x240.png │ │ ├── ui-icons_777620_256x240.png │ │ ├── ui-icons_777777_256x240.png │ │ ├── ui-icons_cc0000_256x240.png │ │ └── ui-icons_ffffff_256x240.png │ ├── index.html │ ├── jquery-ui.css │ ├── jquery-ui.js │ ├── jquery-ui.min.css │ ├── jquery-ui.min.js │ ├── jquery-ui.structure.css │ ├── jquery-ui.structure.min.css │ ├── jquery-ui.theme.css │ ├── jquery-ui.theme.min.css │ └── package.json ├── ol_v4.2.0 │ ├── build │ │ ├── ol-debug.js │ │ └── ol.js │ └── css │ │ └── ol.css └── ol_v5.1.3 │ ├── ol.css │ ├── ol.css.map │ ├── ol.js │ └── ol.js.map ├── signup.css ├── signup.html ├── signup.js ├── usermanagement.css ├── usermanagement.html └── usermanagement.js /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node 2 | EXPOSE 1234 3 | RUN apt-get update 4 | RUN apt-get install -y osmctools 5 | RUN apt-get upgrade -y 6 | COPY . . 7 | WORKDIR /server 8 | RUN npm install 9 | CMD ["npm", "start"] 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 GIScience Research Group 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-minimal -------------------------------------------------------------------------------- /server/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "esnext": true 3 | } -------------------------------------------------------------------------------- /server/config.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | /* supported loglevels (syslog) 3 | 0 emerg: system is unusable 4 | 1 alert: action must be taken immediately 5 | 2 crit: the system is in critical condition 6 | 3 error: error condition 7 | 4 warning: warning condition 8 | 5 notice: a normal but significant condition 9 | 6 info: a purely informational message 10 | 7 debug: messages to debug an application */ 11 | loglevel: 'notice', 12 | server: { 13 | // time threshold after which data is redownloaded 14 | // instead of updated (days) 15 | dataAgeThreshold: 1, 16 | maxParallelUpdates: 6, 17 | geofabrikMetaDir: "./geofabrikbounds/", 18 | geofabrikMetaUpdateInterval: 60*60*24, // [seconds] 19 | planetfile: null, 20 | workerUpdateInterval: 5, 21 | }, 22 | api: { 23 | port: 1234, 24 | accesslog: "access.log", 25 | database: "realtimeosm.db", 26 | adminkey: "masterpassword", 27 | // backup interval in minutes, default: daily 28 | backupInterval: 1440, 29 | // directory where osm data is stored and served 30 | dataDirectory: "./data/", 31 | } 32 | }; 33 | 34 | module.exports = config; 35 | -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "realtimeOSM", 3 | "version": "0.1.0", 4 | "description": "server that manages and runs tasks to provide realtime osm data", 5 | "main": "realtimeOSM.js", 6 | "scripts": { 7 | "start": "node realtimeOSMserver.js", 8 | "pretest": "./node_modules/.bin/eslint **.js && rm -r -f ./test/testdata ./test/testgeofabrikbounds ./test/test.db ./test/testaccess.log", 9 | "test": "node test/tests.js", 10 | "posttest": "rm -r -f ./test/testdata ./test/testgeofabrikbounds ./test/test.db ./test/testaccess.log" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "https://gitlab.gistools.geog.uni-heidelberg.de/giscience/realtime_osm/realtime_osm" 15 | }, 16 | "author": "Stefan Eberlein", 17 | "license": "MIT", 18 | "dependencies": { 19 | "@mapbox/geojsonhint": "^2.2.0", 20 | "@mapbox/togeojson": "^0.16.0", 21 | "@turf/area": "^5.1.5", 22 | "@turf/boolean-within": "^5.1.5", 23 | "@turf/flatten": "^5.1.5", 24 | "body-parser": "^1.19.0", 25 | "express": "^4.17.1", 26 | "geojson-rewind": "^0.2.0", 27 | "minimist": "^1.2.3", 28 | "morgan": "^1.9.1", 29 | "sequelize": "^5.15.1", 30 | "serve-index": "^1.9.1", 31 | "sqlite3": "^4.1.1", 32 | "wellknown": "^0.5.0", 33 | "winston": "^2.4.4", 34 | "xmldom": "^0.5.0" 35 | }, 36 | "eslintConfig": { 37 | "env": { 38 | "browser": true, 39 | "es6": true, 40 | "node": true, 41 | "jquery": true 42 | }, 43 | "extends": "eslint:recommended", 44 | "parserOptions": { 45 | "sourceType": "module" 46 | }, 47 | "rules": { 48 | "linebreak-style": [ 49 | "error", 50 | "unix" 51 | ], 52 | "semi": [ 53 | "error", 54 | "always" 55 | ], 56 | "no-console": "off" 57 | } 58 | }, 59 | "devDependencies": { 60 | "eslint": "^5.16.0", 61 | "eslint-plugin-node": "^6.0.1" 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /server/test/testconfig.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | /* supported loglevels (syslog) 3 | 0 emerg: system is unusable 4 | 1 alert: action must be taken immediately 5 | 2 crit: the system is in critical condition 6 | 3 error: error condition 7 | 4 warning: warning condition 8 | 5 notice: a normal but significant condition 9 | 6 info: a purely informational message 10 | 7 debug: messages to debug an application */ 11 | loglevel: 'debug', 12 | server: { 13 | // time threshold after which data is redownloaded 14 | // instead of updated (days) 15 | dataAgeThreshold: 1, 16 | maxParallelUpdates: 10, 17 | geofabrikMetaDir: "./test/geofabrikbounds/", 18 | geofabrikMetaUpdateInterval: 60*60*24, // [seconds] 19 | planetfile: "planet.osm.pbf", 20 | workerUpdateInterval: 1, 21 | }, 22 | api: { 23 | port: 1234, 24 | accesslog: "./test/testaccess.log", 25 | database: "./test/test.db", 26 | adminkey: "masterpassword", 27 | // backup interval in minutes, default: daily 28 | backupInterval: 1440, 29 | // directory where osm data is stored and served 30 | dataDirectory: "./test/testdata/", 31 | } 32 | }; 33 | 34 | module.exports = config; 35 | -------------------------------------------------------------------------------- /server/web/dashboard.css: -------------------------------------------------------------------------------- 1 | *{ 2 | box-sizing: border-box; 3 | } 4 | body, p { 5 | font-family: sans-serif; 6 | } 7 | td { 8 | cursor: pointer; 9 | } 10 | a, a:active { 11 | color: black; 12 | text-decoration: none; 13 | border-bottom: 1px gray dotted; 14 | } 15 | #container{ 16 | max-width: 98%; 17 | margin: 0 auto; /* Zentriert Inhalt */ 18 | } 19 | #header { 20 | display: flex; 21 | flex-flow: row wrap; 22 | align-items: baseline; 23 | justify-content: space-between; 24 | } 25 | #inputAPIkey { 26 | width: 25em; 27 | } 28 | #flexrow{ 29 | display: flex; 30 | flex-flow: row wrap; 31 | } 32 | #sidebar{ 33 | flex: 1 1 700px; 34 | margin: .5em; 35 | overflow: auto; 36 | } 37 | #map{ 38 | flex: 1 1 700px; 39 | height: 75vh; 40 | margin: .5em; 41 | } 42 | .footerlink { 43 | float: right; 44 | margin-bottom: 1em; 45 | margin-right: 1em; 46 | } 47 | .ol-popup { 48 | position: absolute; 49 | background-color: white; 50 | -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); 51 | filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); 52 | padding: 15px; 53 | border-radius: 10px; 54 | border: 1px solid #cccccc; 55 | bottom: 12px; 56 | left: -50px; 57 | min-width: 280px; 58 | } 59 | .ol-popup:after, .ol-popup:before { 60 | top: 100%; 61 | border: solid transparent; 62 | content: " "; 63 | height: 0; 64 | width: 0; 65 | position: absolute; 66 | pointer-events: none; 67 | } 68 | .ol-popup:after { 69 | border-top-color: white; 70 | border-width: 10px; 71 | left: 49px; 72 | margin-left: -10px; 73 | } 74 | .ol-popup:before { 75 | border-top-color: #cccccc; 76 | border-width: 11px; 77 | left: 49px; 78 | margin-left: -11px; 79 | } 80 | .ol-popup-closer { 81 | text-decoration: none; 82 | position: absolute; 83 | top: 2px; 84 | right: 8px; 85 | } 86 | .ol-popup-closer:after { 87 | content: "✖"; 88 | } 89 | .popupAddedDate { 90 | margin-bottom: auto; 91 | } 92 | .popupName { 93 | margin-top: auto; 94 | margin-bottom: .5em; 95 | font-size: 14pt; 96 | } 97 | .popupSubmit { 98 | width: 100%; 99 | } 100 | .inputText { 101 | margin-bottom: .7em; 102 | width: 100%; 103 | display: inline-block; 104 | } 105 | .inputDate { 106 | margin-bottom: .7em; 107 | width: 100%; 108 | display: inline-block; 109 | } 110 | .inputNumber { 111 | margin-bottom: .7em; 112 | width: 100%; 113 | display: inline-block; 114 | } 115 | -------------------------------------------------------------------------------- /server/web/dashboard.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 |A service providing near real-time OSM extracts.
20 | 21 |
22 | View the Project on GitHub
GIScience/OSM-realtime-update
23 |
32 | If you want to use our instance, 33 | request an API key here. 34 |
35 | 36 |Real-time OSM is a server that provides custom OSM extracts and keeps them up-to-date at any interval. If your machine is fast enough, in near real-time. Extraction jobs are managed via a REST API or a web dashboard. The software consists of three components:
37 | 38 |The API adds, deletes and requests information about tasks that provide 40 | continuously updated region-bound OSM data via a permanent URL.
The backend runs, manages and gathers statistics for tasks.
The frontend allows manipulating tasks and serves the OSM extracts.
Here is a screenshot:
48 |51 | You can look at the code at GitHub 52 | or see our instance running live here. 53 | If you have any questions, send a mail to info@heigit.org. 54 |
55 | 56 |