Code Monkey home page Code Monkey logo

achavi's Introduction

achavi - Augmented OSM Change Viewer

Displays OpenStreetMap changes based on the Overpass API Augmented Delta (adiff) query and the Augmented Diff format.

https://overpass-api.de/achavi/ - production (master)
https://nrenner.github.io/achavi/ - development, test (gh-pages)

work in progress

See olex repository for OpenLayers-related sources (included as lib/olex.js).

License

Copyright (c) 2018 Norbert Renner and contributors, licensed under the MIT License (MIT)

Install

Achavi is a pure JavaScript Browser app. It relies on the Overpass API for serving Augmented Diffs.

The project layout is already the runnable web app, there currently is no build. All files and directories are required at runtime, except readme.md.

Licenses

achavi's People

Contributors

borazslo avatar dex2000 avatar holgerjeromin avatar nrenner avatar simon04 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

achavi's Issues

Adding Timeline Slider

Really like this project, to show progress in mapping parties. Can we add a timeline slider? Maybe specify the time upper and lower time limit.

Satellite layers

Hi,

Achavi is an excellent tool! Have you thought about add some satellite layers? It would be very practical to verify if the changes on the map match with a satellite image.

Handle runtime error: Query run out of memory

The query https://overpass-api.de/api/interpreter?data=[adiff:%222018-08-12T11:35:26Z%22,%222018-08-12T12:35:32Z%22];(node(bbox)(changed);way(bbox)(changed););out%20meta%20geom(bbox);&bbox=-0.1388597,23.1423715,113.3875121,51.5797481 results in HTTP 200

<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="Overpass API 0.7.55.4 3079d8ea">
<note>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</note>
<meta osm_base="2018-08-14T09:02:02Z"/>
<remark> runtime error: Query run out of memory using about 2048 MB of RAM. </remark>
</osm>

but achavi does not report an error.

More detailed layers/filters

I suggest to separate the changes layer to a changes and a created layer.

I also suggest to draw a distinction between the two types of deleted. For deleted elements the <action> object has a <new> object. In that the <node> osm element has a visible marker. If the element is deleted from the osm database then visible="false". If the element is not delete, but the element does not match the adiff query at the second time then visible="true". (See more: Augmented_Diffs) I think it is important to know whether an osm element is absolutely deleted or only does not match my filter criterions. (This issue is probably related with the usage of?url=my_own_adiff_xml_results only.)

zoom and latlon doesnt work as espected on link/permalink

Steps to reproduce:

I think, the "problem" is, that the CS is centered for the View.
Imho it should center only if not other parameters are given (like https://nrenner.github.io/achavi/?changeset=55824788)

Overpass generator string now includes version number

Recently, a version number was added to the generator string, e.g. <osm version="0.6" generator="Overpass API 0.7.54.12 054bb0bb">. Unfortunately, this change breaks Achavi. The following patch should fix it:

diff --git a/js/FormatRegistry.js b/js/FormatRegistry.js
index 59c350c..1c534b2 100644
--- a/js/FormatRegistry.js
+++ b/js/FormatRegistry.js
@@ -36,7 +36,7 @@ FormatRegistry.prototype.getFormatType = function(doc) {
     // special cases with common root node name but different content 
     if (type === 'osm') {
         var generatorAttribute = doc.documentElement.getAttribute('generator');
-        if (generatorAttribute && generatorAttribute === 'Overpass API') {
+        if (generatorAttribute && generatorAttribute.indexOf('Overpass API') == 0) {
             type = 'osmDiff';
         } else {
             var node = doc.documentElement.firstChild

Custom query #18 follow-up

Improvements on #18.

Brainstorming:

  • UI improvements
  • documentation
  • default query as editable template (+ reset button) + example queries, changeset query
  • remember last query
  • Overpass Turbo query link? Instead of input field?
  • ...

What are minimal requirements before releasing? How not to turn it into a second Overpass Turbo?

overpass errors not displayed

Hi,
I could be nice to display something (a popup) when the overpass api return an error. Actually no thing append on api error.
Cheers

Delete master branch

Since active development happens in the gh-pages branch, please mark that one as default and delete the master branch.

Overlapping changesets

As Overpass API does not support querying for changesets, achavi queries by timeframe and bbox of the changeset and filters the result by changeset id on the client. This does not work when there are multiple changesets modifying the same objects, because adiff returns aggregated changes.

Example (from mmd-osm):
Modified way 31664569 (added nodes) in changeset 27183569 is not shown in achavi.

This changeset is a weird example because it seems all created objects (esp. new builings) were uploaded twice in changesets 27183569 and 27183716. So visualization in achavi is not as wrong as it looks at first sight.

changeset 27183569:

  • OSM API: https://www.openstreetmap.org/api/0.6/changeset/27183569/download

    <modify>
    <way id="31664569" changeset="27183569" timestamp="2014-12-02T16:40:01Z" version="4" ...
    
  • achavi query:

    https://overpass-api.de/api/interpreter?data=
    [adiff:"2014-12-02T16:36:27Z","2014-12-02T17:40:02Z"];
    (node(bbox)(changed);way(bbox)(changed););
    out meta geom(bbox);
    &bbox=6.7306185,49.2351097,6.7979623,49.2734277  
    
    <action type="modify">
    <old><way id="31664569" version="3" timestamp="2012-05-23T17:05:18Z" changeset="11682467" ...
    <new><way id="31664569" version="5" timestamp="2014-12-02T17:31:16Z" changeset="27184613" ...
    

Because a later change is included in the adiff result, version 4 and 5 are aggregated under changeset 27184613. This is why filtering for changeset 27183569 in achavi does not include this way.

Overlapping changesets by the same user (first closed after the third):

changeset id="27183569" created_at="2014-12-02T16:36:28Z" closed_at="2014-12-02T17:40:02Z"
changeset id="27183716" created_at="2014-12-02T16:44:09Z" closed_at="2014-12-02T17:07:43Z"
changeset id="27184613" created_at="2014-12-02T17:31:12Z" closed_at="2014-12-02T17:31:18Z"

Object timestamps in changeset 27183569 range from 2014-12-02T16:36:36Z to 2014-12-02T16:40:02Z, i.e. there are no overlapping uploads, the changeset just timed out an hour later.

Passing a modified query without timeout to achavi shows the correct changes.

Other examples in this changeset are way 250937385 (tags modified twice) and node 1564054893 (moved twice).

See also wiki page Overlapping changesets analysis of some first search for further examples. It seems to indicate that this might happen more often than I first thought.

Support creating/viewing diffs from local files

Is it possible to support uploading local files and then create/render a diff from them, please?
For example, suppose I see one user with 1000 small changesets and I would like to review them; doing this one-by-one with achavi would be inefficient (not due to achavi, but due to the amount of changesets with small changes).

Now suppose that I download all of his osmChanges, merge them with osmium merge-changes -F osc -f osm -o merged.osc <all his osmchanges.osc> and open this local file with the achavi interface.
We would be able to view the before and after of all his 1000 changesets, in just one single page.

This would help a lot (really a lot) with things like openstreetmap/iD#2251 (comment) and https://lists.openstreetmap.org/pipermail/talk/2018-January/080040.html

Could it be possible to do something like this? :-)

Add link to edit in iD

There is a "select in JOSM" link, please also add a link to edit in iD - useful for quickly checking part of the map or for those who don't use JOSM.

Support Non-Western Arabic Numerals as IDs

When using tools, e.g. with localization active in a language that doesn't use Western Arabic Numerals (0123456789) but Persian (۰ ۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹) or Eastern Arabic (See wikipedia article) ones this can result in Achavi links with IDs written in these numerals being created, e.g. https://overpass-api.de/achavi/?changeset=%DB%B1%DB%B1%DB%B8%DB%B6%DB%B2%DB%B3%DB%B3%DB%B1%DB%B7

It would be great if Achavi accepts this number format, too.

See also the bug report in the Rovas JOSM plugin
https://gitlab.com/JOSM/plugin/RovasConnector/-/issues/15

nominatim support

Often I want to jump on a particular point on the planet. Currently if have to scroll and move the tiles around until i found it. Including a quick nominatim support would be a win for your nice gui!

See nominatim query field at overpass turbo, for example.

Thicker lines for mouse-over

I think it would increase achavi's usability if mouse-over elements in changesets were a bit thicker to have a larger target over which I'd get diff popup. Right now it feels like I have to hunt for that specific 1 pixel.

Line and node sizes similar to osmcha or iD would be pretty nice.

Import from url - bad map center (and more)

I try to import my xml-s. It sometimes works, but there are examples when the page loads the nodes from my xml but the center of the maps at 0,0 (?), and when I slowly move the map ro the place I need, the nodes disappear. :(

A problematic version:

[timeout:255]
[adiff:"2015-11-10T02:00:00Z","2015-11-25T02:00:00Z"];
area(3600021335)->.searchArea;
(
node["amenity"="place_of_worship"]["religion"="christian"]["denomination"~"catholic"](area.searchArea);
way["amenity"="place_of_worship"]["religion"="christian"]["denomination"~"catholic"](area.searchArea);
relation["amenity"="place_of_worship"]["religion"="christian"]["denomination"~"catholic"](area.searchArea);
);
out body meta;
>;
out meta skel qt;

A working version:

[timeout:255]
[adiff:"2015-11-18T02:00:00Z","2015-11-25T02:00:00Z"];
area(3600021335)->.searchArea;
(
node["wheelchair"](area.searchArea);
way["wheelchair"](area.searchArea);
relation["wheelchair"](area.searchArea);
);
out body meta;
>;
out meta skel qt;

Link to JOSM

Could you add a link to edit in JOSM when the user clicks in a feature. You could show the link in the window that shows the tags and changeset.

Minimum size of markers ways and relations

When I zoom out to see a full European country all the nodes preserve a minimum marker size so at to make it easy to click on it. But ways and relations has no minimum marker size, so it become an almost impossible task to click on the only pixel in the image when the way or relation is small as a house.

(It can be an other excuse to work on the leaflet version. ;) ).

permanentlink not working

The permanent link works (as in: creates a correct permanent link), but when you load it it will not zoom to the area in the link but will always zoom to the whole changeset + a buffer area. The latter should be avoided when there is a map position in the url

Changeset failed to load

URL: https://overpass-api.de/achavi/?changeset=48727731
Browser: Firefox v53
OS: Ubuntu

I visited the above URL and see the map of the world, but don't see the changeset requested. Looking at the browser console: I see the following error output:

window.controllers is deprecated. Do not use it for UA detection. OpenLayers.js:438:474
patched OpenLayers.Request.issue olex.js:1117:5
"requesting https://www.openstreetmap.org/api/0.6/changeset/48727731" Loader.js:254:5
request: timer startedLoader.js:255
error loading "https://www.openstreetmap.org/api/0.6/changeset/48727731" (0 ) Loader.js:241:9
Loader.prototype.failure https://overpass-api.de/achavi/js/Loader.js:241:9
Loader.prototype.GET/xhr.onerror https://overpass-api.de/achavi/js/Loader.js:299:9

Works find on Chrome/Ubuntu.

Add standard basemap that is *not* dark

I sometimes have trouble to recognize the features in the basemap, because I find it too dark:

image

Is there a possibility to also add the "standard" OpenStreetMap Mapnik style map?

Like this:
image

Pixel-wide hotspots

It is very hard to point mouse cursor at a feature, because all lines are just a pixel wide. Could you please increase "hot" area to 3 pixels? If possible, without increasing visible line widths.

Add username filter

It would be very useful if there would be a possibility to hide the edits of one or more users by setting a filter with usernames.

When I am looking at my "home region", it would be very useful if I could hide my edits, so that I only see the acitivities of other mappers.

For checking vandalism or mistakes made by newbies, it would be useful if edits of even more users could be set as hidden. Then I could ignore the edits of myself and users which I trust, so that I only see suspicious changes.

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.