Better-osm-org: a script that adds useful little things to osm.org

With regard to validations …

You see a number of cases of <buildingq=*> (& other similar shapes), where somebody (& I’ve done it myself! :zany_face:) has drawn a building then incorrectly also immediately hit Q to square it.

Would it be possible to create a validator to check for “q” on the end of a key / tag & pop up a warning?

1 Like

It’s possible, but I can see that my current approach doesn’t scale well. It’s just that the list of problematic/good keys will quickly grow in the script code.

For individual objects, it’s probably best to query Taginfo/Wiki for each tag and provide some sort of hint. However, for changesets, it’s unclear how many queries will need to be made.

For now, I’m testing the waters for a good solution with these simple checks :)

Plus, I don’t want to flood it with all sorts of checks that mappers will be too lazy to fix.

1 Like

For “building types that end in q” overpass is pretty capable. This is UK and Ireland (nwr["building"~"q$"]({{bbox}})).

nwr["building"~"q$", i]({{bbox}}) ;-)

Thanks, but does that assume that OT actually works! :cry: :unamused_face:

btw, a regular expression to find tags where phone numbers are separated without ;

nwr[phone~"\\+[^;]*\\+"]

Just a heads up.

For phone number validation there is https://github.com/confusedbuffalo/phone-report . He is using libphonenumber-js as well and there seem to be a lot of tweaks necessary to conform to local preferences, that libphonenumber-js is flagging als invalid.

2 Likes

I know about this project, but unfortunately, there are only a few countries involved yet, and it seems to be a bit noisy with formatting alerts.

In my opinion, the only errors that are valuable are those that prevent you from calling a phone number in your navigator, That’s why I only use isPossiblePhoneNumber() in my script.

One of the big advantages to shortbread is that users can easily switch to their own tiles. (yet another switch2osm guide to write). Copy a pmtiles file to a web server or cloud storage and that’s all you need for a hosting setup.

You won’t get the minutely updates of OSMF tiles, but most sites don’t need that.

As a practical matter, the “problematic usage” levels of vector tiles will probably be much higher than raster tiles because of overzoom, 512px tiles, most stuff being rendered in advance, and per-layer rendering.

2 Likes

1.6.4

  • In Overpass search, you can now type panoramax|mapillary|... and it will expand to:
(
  nwr[panoramax];
  nwr[mapillary];
  nwr[...]
);

or ~panoramax which will expand to nwr[~"panoramax"~".*"].

There are examples in the interface (I hope I will someday remake it from a simple browser alert())

  • photo previews in search results now support both mapillary and wikimedia_commons

  • wikimedia_commons=Category:* is now supported:

7 Likes

I tested ScriptCat again in Chrome and it seems to be fully compatible with the script now.

It claims to be an open source script manager, so it’s probably a good alternative to Violentmonkey for Chrome.

Hi,
I’m getting an “not secure” error when clicking the “close note” :ok_hand: button:

Try opening the iD and trying again: https://www.openstreetmap.org/edit?editor=id

Now the script is reusing authorization from there and something went wrong.

A small bonus among the latest bug-fix updates (1.6.4.3):

5 Likes