
TrickyFoxy's Diary
Recent diary entries
better-osm-org 0.8: ⚡️📸🏃♂️💬🫂🛰⌨️
Posted by TrickyFoxy on 31 January 2025 in English. Last updated on 2 February 2025.Today I will talk about the new version 0.8 of userscript that adds several useful features to osm.org.
You can view existing features of the script and install it on GitHub or in the OSM Wiki
⚡️ Faster rendering
My first PR was merged to openstreetmap-website code, and now the Map Data layer loads instantly. Be sure to try it. Thanks to the maintainers for help!
For the script, this means a huge acceleration in rendering large relations and GPS tracks (yes, tracks, read more!):
icon 👥 near relations is clickable 😉
📸 Photos from Panoramax, StreetComplete, Wikipedia Commons
Now they are displayed directly on the website. In notes, in tag history, and in changesets.
better-osm-org v0.5
Posted by TrickyFoxy on 26 September 2024 in English. Last updated on 6 October 2024.Visualization of changesets, dis/likes, more hotkeys and viewing old versions of map objects
🖼 Visualization of changesets
Previously, you could only view changes in tags and only minor changesets. Now you can see objects that have been changed, and pagination is removed whenever possible:
Утром:
- Чаты читать
- Правки проверять
- Комментарии оставлять
- Заметки закрывать
Вечером:
- Со стриткомплитом гулять
- Заметки оставлять
- Рулетку решать
- Правки закрывать
Better-osm-org for watchmans
Posted by TrickyFoxy on 25 June 2024 in English. Last updated on 9 July 2024.In new version of userscript, I focused on analyzing edits. QuickLook for changesets, hotkeys, filtering changesets, mass actions and more.
Help wanted: I would be grateful if someone knows how to get into the site code and manage the map (add new objects, change layers, colors …) This would make it much easier for new features to appear. Otherwise, they will only be available in OSM-NG (: upd: solution found!
👮♂️ QuickLook of changes in tags
Now you don’t need to open OSMCha for simple changesets. Tag changes will be visible directly on the changeset page.
Isn’t there a navigator yet that builds routes in the shadow?
Несколько улучшений для osm.org
Posted by TrickyFoxy on 6 May 2024 in Russian (Русский). Last updated on 12 May 2024.Написал юзерскрипт для Tampermonkey, добавляющий несколько полезных мелочей:
- Удалятель точек
- Улучшенная работа с заметками
- Компактная история объектов
- HDYC в профиле пользователей
- Компактная информации о правке
- Кнопка отката
🔫 Удалятель точек
📝 Улучшенная работа с заметками
- При открытии заметок теперь вы можете включить спутниковые снимки
- Появилась кнопка с быстрым комментарием к заметке
- Появилась кнопка, которая с помощью Overpass показывает состояние карты на момент создания заметки
- Убирается мещающая оранжевая обводка около активной заметки
⚡⚡⚡ OSM API v1.0⁴: Новая модель данных, валидация, премиум-подписка и не только
Posted by TrickyFoxy on 1 April 2024 in Russian (Русский).На последней встрече совет 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, на котором уже написана большая часть сайта.
⚡⚡⚡ OSM API v1.0⁴: New data model, validation, OSM Premium and more
Posted by TrickyFoxy on 1 April 2024 in English.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.
Don't map for render
Don't map for geocoder
Don't map for validator
Don't map for database
Don't map for Overpass
Don't map for editors
Don't map for laws
Don't map for statistics
Don't map for yourself
Don't map! Soon the AI will map it all out.
A minute of facts about the duration of changesets
Posted by TrickyFoxy on 31 January 2024 in English.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:
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:
A bit of technical details and emotion:
(!) 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 правая граница больше левой. А что если мы вспомним, что живём на шаре? Какую рамку мы бы хотели увидеть? Подсказка:
-
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?
-
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?
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.
Everyone knows that StreetComplete is a simple editor. But did you know that it has more features than it seems at first glance?
On osm.org does not support video, so the article will be on telegra.ph https://telegra.ph/Advanced-StreetComplete-08-04
На русском языке: https://telegra.ph/Prodvinutyj-StreetComplete-08-05
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
- Select in QGIS:
Processing->Toolbox->Raster Tools->Generate XYZ tiles (MBTiles)
- 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
- to
- Click Run and wait for rendering to finish.
- Install the
mbtiles
plugin in JOSM - 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
- Select in QGIS:
Processing->Toolbox->Raster Tools->Generate XYZ tiles (Directory)
- 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.
- to
- Click Run and wait for rendering to finish.
- 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
- In JOSM, open
Preferences->Layers->+TMS
- Enter a URL like this:
http://localhost/<tile folder name>/{zoom}/{x}/{y}.png
- 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 в ваших редакторах. С QGIS, но проще
Posted by TrickyFoxy on 2 August 2023 in Russian (Русский). Last updated on 3 August 2023.Кажется существует единственная инструкция по получению свежих снимков Sentinel-2. Она неплохо рассказывает, как подготовить снимки, но сложно объясняет, как использовать их в редакторах OSM. Поэтому после шага 7, можно обойтись
без GeoTIFF и тайлового сервера
- Выберите в QGIS:
Processing->Toolbox->Raster Tools->Generate XYZ tiles (MBTiles)
- Задайте параметры:
- в
Extent
нужную вам область карты. -
Maximum Zoom
скорее всего вам нужен 15. - В
Output Path
задайте куда сохранить файл с тайлами
- в
- Нажмите Run и дождись завершения рендеринга.
- В JOSM установите плагин
mbtiles
- Отройте файл полученный на шаге 3.
Кстати, недавно Guru Maps научился отрывать MBTiles https://gurumaps.app/blog/2023/06/14/mbtiles
Но если вы тайловый сервер всё-таки хочется, то можно обойтись без tileserver-php из инструкции. И без плагина QTiles, что будет ещё и быстрее работать!
Классические тайлы с веб-сервером
- Выберите в QGIS:
Processing->Toolbox->Raster Tools->Generate XYZ tiles (Directory)
- Задайте параметры:
- Задайте в
Extent
нужную вам область карты. -
Maximum Zoom
скорее всего вам нужен 15. - Задайте
Output Directory
. Можно сразу выбрать директорию вашего веб-сервера.
- Задайте в
- Нажмите Run и дождись завершения рендеринга.
- Запустите ваш веб-сервер. Если вы не работали Nginx или Apache, то откройте в терминале папку с вашими тайлами и попробуйте использовать веб-сервер в Python:
python -m http.server 80
или PHP:php -S 127.0.0.1:80
- В JOSM откройте
Настройки->Слои->+TMS
. - Введите URL вида:
http://localhost/<имя папки с тайлами>/{zoom}/{x}/{y}.png
- Приблизьтесь к нужной вам территории в JOSM и в меню Слои выберите ваш новый слой.
p.s. я использовал QGIS 3.32.1-Lima.
Классические тайлы для JOSM без тайлового сервера
Вместо запуска веб-сервера в JOSM можно указать URL вида:
file://<абсолютный путь до папки с тайлами>/{zoom}/{x}/{y}.png