OpenStreetMap

TrickyFoxy's Diary

Recent diary entries

Несколько улучшений для osm.org

Posted by TrickyFoxy on 6 May 2024 in Russian (Русский). Last updated on 12 May 2024.

Написал юзерскрипт для Tampermonkey, добавляющий несколько полезных мелочей:

  • Удалятель точек
  • Улучшенная работа с заметками
  • Компактная история объектов
  • HDYC в профиле пользователей
  • Компактная информации о правке
  • Кнопка отката

🔫 Удалятель точек

📝 Улучшенная работа с заметками

  1. При открытии заметок теперь вы можете включить спутниковые снимки
  2. Появилась кнопка с быстрым комментарием к заметке
  3. Появилась кнопка, которая с помощью Overpass показывает состояние карты на момент создания заметки
  4. Убирается мещающая оранжевая обводка около активной заметки

🕒 Компактная история объектов

  1. Показывает на странице истории только изменившиеся теги
  2. Скрывает версии без изменений и скрытые DWG

🪪 HDYC в профиле пользователей

Но только в Firefox и с отключением защиты от отслеживания

🔍 Компактное описание правки и кнопка отката

также компактнее стала вкладка История.


Как установить

  1. Установите расширение Tampermonkey
  2. После откройте файл со скриптом

p.s. Несмотря на то, что юзерскрипты должны работать в любых браузерах одинаково, Chrome отличился: спутниковые снимки и HDYC работать в нём не будут. Переходите на Firefox :)

p.p.s. Функции можно отключать в настройках скрипта, нажав на значок расширения

p.p.p.s. Вы можете использовать расширение в Firefox для Android

upd: в список редакторов добавлена ссылка на Rapid

English version

На последней встрече совет OSMF дал добро на внедрение новой версии OSM API. Полную стенограмму можно найти на вики. Краткое содержание:

🧐️️️️️️Валидация

Правки ломающие геометрию или топологию будут отклонятся, для некритичных ошибок будет API будет возвращать HTTP-статус 267 Doubtful But Okay

🛣 Новая модель данных

Для упрощения модели данных решено отказаться от типа Way. Отношения уже используются для мультиполигонов и могут хранить списки точек, что делает Way бессмысленным.

Такой подход также позволит описывать нелинейные геометрии, что выводит картографирование на абсолютно новый уровень 🚀

📃 Новый формат данных

На смену моральноустаревшему формату XML придёт человекочитаемый YAML. Это позвозит удобно редактировать карту в любом текстовом редакторе и изучать пакеты правок с помощью таких инструментов таких как git diff. Поддержка формата JSON останется.

👮‍♂️Премодерация

Правки новичков будут попадать в очередь премодерации. Одобрять правки сможет любой картограф, мапивший 42 дня за последний год. Избежать очереди можно будет оплатив членство в OSMF.

💵 Премиум-функции

Помимо отключения премодерации, картографы, оплачившие членство в OSMF, получат приоритет при обращении к DWG и OSMF. Длительность блокировок для премиум-картографов будет уменьшена вдвое.

💎 Новый cgimap

Текущая реализация cgimap, написанная на C++, не отвечает требованиям безопасности, поэтому будет переписана на Rust Ruby, на котором уже написана большая часть сайта.

At the last meeting, the OSMF board gave the go-ahead to implement a new version of the OSM API. The full transcript can be found on wiki. Summary:

🧐️️️️️️Validation

Edits that break the geometry or topology will be rejected; for non-critical errors the API will return an HTTP status 267 Doubtful But Okay

🛣 New data model

To simplify the data model, it was decided to abandon the Way type. Relations are already used for multipolygons and can store lists of points, which makes Way meaningless.

This approach will also allow us to describe nonlinear geometries, which takes mapping to a whole new level 🚀

📃 New data format

The obsolete XML format will be replaced by human-readable YAML. This allows you to conveniently edit the map in any text editor and study changesets using tools such as git diff. JSON format support will remain.

👮‍♂️Pre-moderation

New users’ edits will be included in the pre-moderation queue. Edits can be approved by any cartographer who has mapped 42 days in the last year. You can avoid the queue by paying for OSMF membership.

💵 Premium Features

In addition to disabling pre-moderation, cartographers who have paid for an OSMF membership will receive priority when accessing DWG and OSMF. The duration of blockages for premium cartographers will be halved.

💎 New cgimap

The current implementation of cgimap, written in C++, does not meet the security requirements, so it will be rewritten in Rust Ruby, which is already used for most of the site.

When AI is (not) needed

Posted by TrickyFoxy on 17 March 2024 in English.

Looking at the OSM map on website of the university:

Looking at photo:


I look at my yard in MapComplete, and there are some stalls on the road:

I look out the window (well, so that you can see it too, on yandex.panoramas):

You open Rapid and calm down: This is what the AI recognized. Everything is fine with OSM.

But the mapmakers took a wrong turn. Why do you need AI buildings in cities that are mapped by cartographers?!

But the mapmakers are happy with that. This is a long time ago Google with auto-recognition showed.

Смотришь на OSM-карту на сайте универа:

Смотришь на фотографию:


Смотришь на свой двор в MapComplete, а там ларьки какие-то на дороге стоят:

Смотришь в окно (ну а чтобы и вы увидели, на яндекс.панорамы):

Открываешь Rapid и успокаиваешься: это AI нараспознавал. С OSM всё в порядке.

А вот картоделы свернули куда-то не туда. Точнее их всё устраивает. Это давно гугл с автораспознаванием показал.

Disclaimer: I used changesets through August 2023 to calculate the statistics

  • 84% of changesets closed within a minute

  • 99.6% closed within two hours

Diagram of the distribution of changesets durations (count/duration in seconds):

The upper part is in the form of a table:

  • only 1201 were open for more than 12 hours

  • from 2020 to August 2023, only 53 more than 12 hours (of which 39 were made by wheelmap_visitor, 2 by StreetComplete, and the rest by JOSM).


Warning, question:

  • Are we sure we want to spend the whole day monitoring what the user does in their changeset?

OAuthtung!

Posted by TrickyFoxy on 29 January 2024 in English.

TL;DR I wrote a little extension for Firefox for script developers to get an OAuth token in a couple clicks


OSM will soon remove support for Basic Auth and OAuth 1.0.

The proposal is to use OAuth 2.0, which has a much worse UX for novice developers than Basic Auth.

To show that OAuth 2.0 can be made more convenient even than Basic Auth I made a Firefox extension to automatically get an OAuth token:

demo


A bit of technical details and emotion:

  • Works with any Redirect URI

  • We have a confidential OAuth applications. In order to use them, you need a user account. I.e. such applications are useless because you can’t do anything with only client_id and client_secret.

  • It follows that the client_secret parameter is useless. The extension, by the way, does not use it ¯\(ツ)

  • Did you know that you can specify multiple Redirect URIs? Guess what delimiter to use in the input field? And then how do you do authorization?

  • Did you know about the magic urn:ietf:wg:oauth:2.0:oob ?

  • And about the fact that without HTTPS you can only use 127.0.0.1?

There is somewhere on the wiki at the end of the page after the description of OAuth 1.0 and 2.0 about it…..

You couldn’t google it? You are a bad programmer! </sarcasm>

(!) It’s a draft written in Russian. I don’t like machine translation, so the English version needs to be worked on separately. (!) This material can cause conflicting feelings

Большие правки бесят. Но больше bbox-ов меня бесит реакция вахтёров на них. За три года я увидел лишь одну адекватную попытку бороться с проблемой… Но давайте по порядку.


Я бы разбил большие правки на:

Правки больших отношений/линий

Они неизбежны. Хорошая новость: таких объектов мало, а значит таких правок будет мало.

Правки пересекающие 180-ый меридиан

… возникают при откате этимологии массовых правках на территориях разделённых им. Или при редактировании объектов около него.

В осмовском bbox правая граница больше левой. А что если мы вспомним, что живём на шаре? Какую рамку мы бы хотели увидеть? Подсказка:

Ну не, переделывать bbox мы не хотим. А что если бы OSM API выставляло бы пакету правок тег с адекватным bbox? Тогда бы инструменты просмотра правок могли бы отбрасывать такие правки и они бы не мешалась.

Правки только тегов

Есть компания RocketData, которая занимается импортом POI и поддержанием их актуальности. Мечта! Но неет, сообщество это бесит. Лучше мы будем изучать тысячи маленьких правок. Удачи.

Наши инструменты для вахтёрства не позволяют нормально изучить такие правки. Делите пакеты правок, иначе забаним. Это же ведь проще чем написать нормальные инструменты.

Проблема не ограничивается рокетдатой. Есть ещё исправления опечаток, нормализация названий улиц и т.п. Я и сам вахтёрю и меня такие правки бесят. Почему?

  1. Потому что они засоряют https://osm.org/history А фильтров там никаких нет.

  2. Их сложно проверить. А ведь, эти правки даже не меняют никакой геометрии!

Казалось бы, нужен инструмент, который выводит какие теги изменились. И кажется это есть только в OsmCha:

Круто Ну Етож Круто

Правда почему-то это работает только для небольших правок….

Мнение: массовые исправления тегов в одной большой правке — нормально. Опять же, OSM API могло быть указывать в тегах пакета правок, что он изменил только теги объектов.

Аналогия для программистов:

Представьте компанию, кодовая база которой измеряется терабайтами. В компании много отделов, в каждом используют различные бибилотеки. И вот вам нужно срочно обновить везде библиотеку, в которой нашли уязвимость. Или наоборот откатить сломанную версию.

А теперь у вас есть куча репозиториев с кодом, в каждом из которых нужно внести отдельное изменение. Наверное круто было бы иметь монорепозиторий и одним коммитом обновить библиотеку? Так компании так и делают https://habr.com/ru/companies/yandex/articles/482926/

Так и в осм. У какой-то сети магазинов изменился сайт? сделайте отншение всех магазинов сети Измените его везде одной правкой. Какая разница, когда открыв свой район в osm.org/history вы увидете одну большую правку или одну предназначенную для вашего города?

4. Случайное редактирование в удалённых друг от друга местах

Например. Прилетаете вы со StreetComplete, Organic Maps на другой континент и вам сразу хочется что-нибудь замапить. Но взамен вы за это получите упрёк в комментариях к правке: https://github.com/streetcomplete/StreetComplete/issues/4582

Правильная реакция: прийти на GitHub к разработчику, поставить 👍 к проблеме и оставить маппера в покое.

Бывает иначе. Решали когда-нибудь задания в MapRoulette? Тогда вы знаете как надоедает постоянно отправлять свои правки. Поэтому вы решаете несколько близких заданий за раз. В какой-то момент вас отправляет на несколько километров.  Вы редактируете и отправляете правку.

tink.jpg

Хотя JOSM при отправке предупредит. Только что дальше делать-то? Удобно разбить правку в iD и JOSM нельзя.

Единственный редактор, который научился разбивать правки — EveryDoor. И хоть он работает только с точками, я не вижу проблемы в других редакторах, чтобы сделать хоть какое-то разбитие пакета правок. Хотя бы, чтобы разбить случайные правки в Чили и на Камчатке.

Мнение: пока в редакторах нет функции разбиения больших правок или хотя бы предупреждения, что вы затронули большую территорию — отстаньте от мапперов и идите на GitHub к разработчикам.

else

Остальные большие правки это либо нарочно большие правки, либо откаты больших правок:)

AI come to us 🙏

Posted by TrickyFoxy on 8 November 2023 in English.
A couple of million-dollar ideas
  1. Do you like to write descriptions for edits? And review other people’s edits if there is an unclear comment? Autogeneration of descriptions like in MAPS.ME and EveryDoor is interesting. But why not make ChatGPT do it?

  2. ChatGPT is already pretty good at recognising pictures. And we have thousands of open notes from StreetComplete with signs of establishments. It would be nice to add tags to the object in a couple of clicks that ChatGPT could recognize. Or build this function directly into some editor.


What kind of work would you put AI to?

Who is OSM for?

Posted by TrickyFoxy on 21 August 2023 in English.

To start editing OSM, a new user needs to go through a cluttered registration form.

At the same time, vandals easily register thousands of new accounts.


One vandal with an army of bots can paralyze the work of hundreds of mappers in an instant.

At the same time, only the gradual careful work of one person can correctly correct a damaged map.


The project is 19 years old, it’s time to grow up.

Fresh Sentinel-2 in your editors. With QGIS, but easier

Posted by TrickyFoxy on 2 August 2023 in English. Last updated on 3 August 2023.

It seems that there is only one instruction for getting fresh Sentinel-2. It tells you quite well how to prepare images, but it is difficult to explain how to use them in OSM editors. So after step 7, you can do

without GeoTIFF and tile server

  1. Select in QGIS: Processing->Toolbox->Raster Tools->Generate XYZ tiles (MBTiles)
  2. Set the parameters:
    • to Extent of the map area you need.
    • Maximum Zoom is most likely 15.
    • In Output Path, specify where to save the tile file
  3. Click Run and wait for rendering to finish.
  4. Install the mbtiles plugin in JOSM
  5. Open the file you received in step 3.

By the way, recently Guru Maps learned how to tear off MBtiles https://gurumaps.app/blog/2023/06/14/mbtiles


But if you still want a tile server, you can do without tileserver-php from the instructions. And without the QTiles plugin, it will also work faster!

Classic tiles with a web server

  1. Select in QGIS: Processing->Toolbox->Raster Tools->Generate XYZ tiles (Directory)
  2. Set the parameters:
    • to Extent of the map area you need.
    • Maximum Zoom is most likely 15.
    • Set Output Directory. You can immediately select the directory of your web server.
  3. Click Run and wait for rendering to finish.
  4. Start your web server. If you didn’t use Nginx or Apache, open the folder with your tiles in the terminal and try using the web server in Python: python -m http.server 80 or PHP: php -S 127.0.0.1:80
  5. In JOSM, open Preferences->Layers->+TMS
  6. Enter a URL like this: http://localhost/<tile folder name>/{zoom}/{x}/{y}.png
  7. Get closer to the desired area in JOSM and select your new layer from the Layers menu.

p. s. I used QGIS 3.32.1-Lima.


upd: method from @maraf24

Classic tiles for JOSM without a web server

Instead of starting the web server, specify the following URL in JOSM: file://<absolute path to the folder with tiles>/{zoom}/{x}/{y}.png

Кажется существует единственная инструкция по получению свежих снимков Sentinel-2. Она неплохо рассказывает, как подготовить снимки, но сложно объясняет, как использовать их в редакторах OSM. Поэтому после шага 7, можно обойтись

без GeoTIFF и тайлового сервера

  1. Выберите в QGIS: Processing->Toolbox->Raster Tools->Generate XYZ tiles (MBTiles)
  2. Задайте параметры:
    • в Extent нужную вам область карты.
    • Maximum Zoom скорее всего вам нужен 15.
    • В Output Path задайте куда сохранить файл с тайлами
  3. Нажмите Run и дождись завершения рендеринга.
  4. В JOSM установите плагин mbtiles
  5. Отройте файл полученный на шаге 3.

Кстати, недавно Guru Maps научился отрывать MBTiles https://gurumaps.app/blog/2023/06/14/mbtiles


Но если вы тайловый сервер всё-таки хочется, то можно обойтись без tileserver-php из инструкции. И без плагина QTiles, что будет ещё и быстрее работать!

Классические тайлы с веб-сервером

  1. Выберите в QGIS: Processing->Toolbox->Raster Tools->Generate XYZ tiles (Directory)
  2. Задайте параметры:
    • Задайте в Extent нужную вам область карты.
    • Maximum Zoom скорее всего вам нужен 15.
    • Задайте Output Directory. Можно сразу выбрать директорию вашего веб-сервера.
  3. Нажмите Run и дождись завершения рендеринга.
  4. Запустите ваш веб-сервер. Если вы не работали Nginx или Apache, то откройте в терминале папку с вашими тайлами и попробуйте использовать веб-сервер в Python: python -m http.server 80 или PHP: php -S 127.0.0.1:80
  5. В JOSM откройте Настройки->Слои->+TMS.
  6. Введите URL вида: http://localhost/<имя папки с тайлами>/{zoom}/{x}/{y}.png
  7. Приблизьтесь к нужной вам территории в JOSM и в меню Слои выберите ваш новый слой.

p.s. я использовал QGIS 3.32.1-Lima.


способ от @maraf24:

Классические тайлы для JOSM без тайлового сервера

Вместо запуска веб-сервера в JOSM можно указать URL вида: file://<абсолютный путь до папки с тайлами>/{zoom}/{x}/{y}.png

Если вам срочно нужны свежие карты для Organic Maps (OM), то:

  1. Выберите на https://extract.bbbike.org нужный вам регион
  2. Укажите почту, на которую вам придёт выгрузка
  3. Запросите выгрузку и дождись письма. Следить за статусом выгрузки можно здесь: https://download.bbbike.org/osm/extract/ В принципе, с этой страницы тоже можно скачать выгрузку
  4. Скачайте полученный архив и распакуйте его.
  5. Найдите на телефоне папку Android/data/app.organicmaps/files/<дата из шести цифр>/ Для iOS: подключите iPhone к макбуку->Finder->File Sharing найдите папку organicmaps
  6. Переместите в неё файл из архива заканчивающийся на .mwm
  7. Дайте ему имя вида: Russia_Lipetsk Oblast.mwm. Чтобы точно узнать имя файла сначала скачайте карту этого региона через OM. Запомните имя, удалите файл и переименуйте перемещённый файл

⚠️ Иногда карты могут быть не совместимы с последней версией OM. Тогда может помочь перемещение карт в папку карт прошлого месяца.

⚠️ Могут возникать и другие проблемы, это не официальный способ от разработчиков

Актуальную инструкцию, но на английском можно найти здесь https://extract.bbbike.org/extract.html

Why you should try Every Door

Posted by TrickyFoxy on 2 January 2023 in English.

Recently, the Every Door editor became available in F-Droid, and I thought this was a great reason to tell you what I like about this editor.

On osm.org does not support video, so the article will be on telegra.ph https://telegra.ph/Why-you-should-try-Every-Door-01-02

Оригинал на русском языке: https://telegra.ph/Pochemu-vy-dolzhny-poprobovat-EveryDoor-01-02

My terrible experience of registering on openstreetmap.org

Posted by TrickyFoxy on 23 July 2022 in English. Last updated on 24 July 2022.

This is an auto-translation of my message from May 8 in the Russian-language OSM chat https://t.me/ruosm/648650

I will try to report some of the following. But now my goal is to say that registration in OSM is something that the already registered participants have forgotten about.


Suppose a person was not afraid and decided to register after all. Next is the real case.

One of the likely situations: a person learns about StreetComplete/EveryDoor and registers through them.

At first, for some reason, he is greeted by a page in English. Well, maybe the problem is in the browser. But why can’t I switch the language on the page?

Well, okay, he thinks, now I quickly register through social networks. Pokes into a conditional Google, gives access and is met by a form in which you need to enter mailS / login / passwordS. What the hell?! For the sake of a login? So just ask him.

Enters the login, password, clicks Register and after refreshing the page finds out that the login is already occupied, the passwords do not match. Enters a new username / password: the login is already there, the password is too weak. But you just need a little JS….

Then there are some agreements that no one reads and.... confirm the email address using the link in the email.

He waits for the letter, pokes at the link and if he still remembers why he did it, returns to the application, logs in and finally decides to upload his changes.

Sadness.


The issue of improving the registration form https://github.com/openstreetmap/openstreetmap-website/issues/3546

upd: Issue to simplify registration via Google https://github.com/openstreetmap/openstreetmap-website/issues/2287

Ticket about simplification of registration. It has been open since 2015! https://github.com/openstreetmap/openstreetmap-website/issues/894

Come in if you also think that registration needs to be simplified 🙏


Try to register now from your smartphone via Google. I have now decided to repeat with a new Google account and I was unable to register!🤦‍♂️ And now when I try to use a Google account, registration through which I have not completed, I received

Sadness.

p.s. Maybe I’m an unlucky person, but it seems to me that if someone tries to register again, he will find other inconvenient things.

p.s.s. By the way, StreetComplete generally uses a separate built-in browser, in which you need to log in to your Google account separately.