ent8r / notesreview-api Goto Github PK
View Code? Open in Web Editor NEWAPI for searching OpenStreetMap notes
Home Page: https://notesreview.kongruent.xyz/docs
API for searching OpenStreetMap notes
Home Page: https://notesreview.kongruent.xyz/docs
I use fvasco/pinpoi for various datasets.
Besides PinPoi being an app intended for such purposes, while I'm out surveying I have enough apps running (I collect more than just map data) that I can't also run a Web browser without hitting memory-exhaustion (causing other apps to malfunction).
Thus, using PinPoi means that I can query various (sometimes large) datasets (of features to add / resurvey), and navigate to their PoIs (e.g. a geo
URI intent into a map & routing app), with ease. All while using little enough memory that I don't hit resource constraints.
Aside from avoiding technical problems, PinPoi can output a set of matches integrated from multiple different sources; either as a proximity-ordered list, or on a background map (OSM, of course 🙂). Among other features.
So, even if I could run a browser, PinPoi has significant advantages.
When passing by a notable feature, particularly difficult-to-discover ones (think small & obscure), if I don't have time to stop and map it properly, I'll drop a note (as a reminder, and to easily re-find the feature when I do have time to give it the proper mapping treatment).
Else, when going through descriptive human-readable information (e.g. news announcements of changes to the road network) I'll add notes at those locations as a reference for future attention.
NotesReview is excellent for finding & filtering such specific (topical) notes. Other tools simply show (on a map) the notes within a given bounding box, which must then each be inspected individually (the focus is on location / proximity, not topic).
I would be able to use the output of NotesReview in software of my choosing, to easily identify & navigate to the locations during a survey. And/or during planning of a survey expedition.
For example, all (nearby) notes which request (by mentioning the word) a survey. Else, whatever (topic / keyword) is of interest, as I see fit.
Especially when I'm closing notes once each is solved by a changeset, and querying NotesReview with status=open
, then the returned set is (automagically) a self-updating to-do / task list, until the count of matches reaches zero.
Compare using Overpass Turbo with a (wizard
-generated) query which includes […] & (check_date!~/^202[2-9]-/ or survey:date!~/^202[2-9]-/) […]
; thus as each element is surveyed, it's excluded from the set returned when the query is (next) executed. Thus, only outstanding targets for surveying are shown, rather than every feature of the same type.
This greatly reduces cognitive overhead, when attention should primarily be on mapping what's observed by survey (rather than dataset management; remembering which elements to ignore and mentally filtering them out).
This would all make surveying much more efficient & productive.
Beyond my own specific use-case, I imagine that this feature would be useful to others, in multiple ways
I imagine that adding some extra elements to the share
URL UI widget would be a sensible place.
Folks are gonna want a URL to give to whatever other software they're using. The sharing feature is the obvious place to go to get a properly-formatted perma-URL.
In which case, it may be as simple as including a toggle to add
[…&]format=[…]
to the URL string, specifying the desired format as selected by a drop-down list in the same UI (which appears after enabling the non-HTML output option?).
Else, I suppose you could add values to the view
parameter, but given its name the semantics don't match. Unless view=(format|export)
is the trigger for non-HTML output (instead of the mere presence of format
), and the value of format
specifies the preferred syntax (else a default is used).
Better might be a mode
parameter. Default of mode=view
(for current HTML output), but another value (export
, output
, format
, …?) to trigger non-HTML.
Keeps the semantics cleaner (for future feature additions), and gives clues as to other parameters needed (like with OSM tagging: key=category
implies that category=type
is a sub-tag). It also serves as a
format
in the URL and easily switch between HTML and non-HTML, else leaving format
blank / unspecified to use the current default formatRegardless of generating mechanism, an example of the resultant URL would be something like
//ent8r.github.io/NotesReview/?[mode=(export|format)&]map=12%2F49.2%2F-2.1&apply-bbox=true&status=open&query=survey&format=gpx
The common, well-known ones would seem to suffice:
#SurveyMe
) in several formats — example: osm.mathmos.net/survey/data.cgi?lat=49.2&lon=-2.1&fmt=gpx
(though, N.B., his fmt=kml
includes more descriptive info of each target)format=
to the URL query-string, to output in several non-HTML formats (CSV, JSON, RSS) — example: [searx instance]/search?q=OSM&format=json
I'm assuming that NotesReview isn't entirely dependent on client-side scripting for even the basics (querying the OSM Notes API & returning a list), and that client-side scripting is only for UI / rendering, processing thumbnails, and other nice-to-have features.
Software for fetching datasets is unlikely to have an HTTP client which executes scripting; it'll simply expect a pre-processed response (in one of a few particular formats).
If this isn't true, then could an exception be made, server-side, for when format
is specified in the URL?
PinPoi stores the received set locally (I presume as a cache for performance, and for offline usage), and (at the moment) only issues another HTTP request when manually instructed to. So, the load on the server (and OSM API) should be low. Arguably lower (due to caching) than when using the HTML UI.
I haven't throughly read the OSM Notes API documentation, but I gather that the output is XML-only. However, I could be wrong, and it would be better to query OSM directly rather than through NotesReview. However, NotesReview is a much nicer & easier interface (especially for the less tech-savvy, who would be daunted by querying an API directly).
Based on https://github.com/ENT8R/notesreview-api it appears that some API is available
Is it documented anywhere?
"Packages No packages published" is displayed right now, fortunately this pointless section can be removed.
Edit repo page config to remove it (cog next to the description).
I am not making a PR as it is defined in proprietary github settings, not in a git repository - and I have no rights to modify repo settings.
OSM moderators can remove notes that are clearly spam, or otherwise inappropriate. This operation (compared to closing/reopenning/commenting) will not appear in any RSS feed and querying API for the note will return 404.
Currently NotesReview backend doesn't handle this which causes desync - they are still present on NotesReview despite being gone from osm.org or API. These notes are not present in the subsequent daily note dumps - this is the best way of detecting all the hidden notes (compared to querying all >1M notes to check for 404).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.