OpenStreetMap logo OpenStreetMap

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.

See full entry

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.

I wonder how well this phenomenon is known in the world 🤔

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.

See full entry

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

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

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

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

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

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

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

See full entry

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.

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:

See full entry

(!) 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 правая граница больше левой. А что если мы вспомним, что живём на шаре? Какую рамку мы бы хотели увидеть? Подсказка:

See full entry

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