OpenStreetMap logo OpenStreetMap

Users' Diaries

Recent diary entries

A seguir um roteiro que elaborei para facilitar a adição dos dados de Uso e Cobertura de Terra do MapBiomas no OpenStreetMap. A autorização do uso dos dados pode ser vista aqui. Alguns exemplos de cobertura de vegetação do Mapbiomas já adicionadas no OpenStreetMap podem ser vistos no Parque Nacional da Serra do Teixeira, Paraíba e nos municípios de Cuité e Damião, na Paraíba.

Mapa com imagem de satélite do território brasileiro.

Do que vou precisar?

  • Acesso ao Google Earth Engine com uma conta do Google;
  • Programa QGIS;
  • Programa JOSM e
  • Seguir as etapas com paciência e cautela.

Download do arquivo no MapBiomas

See full entry

This blog post explains how I handle a typical bug report for the new OSMF Shortbread tiles. Here, I focus on the “island” seems to be missing from “place_labels” report from SomeoneElse

After verifying that the report is correct, I set up my editor environment. It’s useful to have an environment that syntax highlights Jinja SQL files, as well as other files. I use a Visual Studio Code-based editor with the Better Jinja plugin.

The issue is in the place_labels layer. After checking Shortbread, I see that place=island should show at zoom 10 or higher, so there is a bug. Tilekiln creates tiles by reading definitions from shortbread.yaml, so I check there for the place_labels definition.

place_labels:
    description: Holds label points for populated places.
    fields:
        kind: Value of OSM place tag
        name: *name
        name_en: *name_en
        name_de: *name_de
        population: Value of OSM population tag
    sql:
    - minzoom: 4
        maxzoom: 14
        file: shortbread_original/place_labels.04-14.sql.jinja2

This file shows that for zooms 4 to 14, the SQL for the layer is in shortbread_original/place_labels.04-14.sql.jinja2. Since this file is in shortbread_original, osm2pgsql-themepark created it, and it remains unchanged.

SELECT
        ST_AsMVTGeom(geom, {{unbuffered_bbox}}, {{extent}}, {{buffer}}) AS way,
        name,
        name_de,
        name_en,
        kind,
        population
    FROM place_labels
    WHERE geom && {{bbox}}
        AND {{zoom}} >= minzoom
    ORDER BY population desc

There aren’t any obvious bugs in the SQL. There’s no filtering out of islands, so either the data isn’t making it into the place_labels table or it has the wrong zoom. The data is loaded by osm2pgsql, and shortbread.lua tells osm2pgsql how to do that.

themepark:add_topic('shortbread/places')

See full entry

Posted by -karlos- on 18 April 2025 in English.

Once I had a concept to render gabled roofs in 3D with OSMgo.org but it did not work. Often the roof looked like broken down. After a long time of abandoning OSMgo, I found a “working” solution and used it in my code. But no, the browser got stuck in an infinite loop %-(

May be update the version of ThreeJS, after years? That took me many many hours. For the geeks: Using es6 needed much export and import. After hours of typing, I fond at last VS-Code plugin to show me the missing variables. Not using “with” any more needed a lot of “this”. Worse, ThreeJS dropped the geometry.merge() and changed the geometry attributes, typing, typing. Hey, something positive!: Because now Vertex-Colours are used, only one Draw-Call per 3D-tile is needed. OSMgo should run faster now.

With the new ThreeJS the infinite loop was gone, but: the roof was at the wrong place and direction. Some adaptions of the theft code were needed. Now, the City of London looked much better than before. Oh wait, all roofs were mirrored, one more adaption.

See full entry

Posted by kumakyoo on 18 April 2025 in English. Last updated on 25 April 2025.

This blog post is part of a series of blog posts about the new OSM file format “OMA”. This is the seventh post. At the end of the article you’ll find links to the other blog entries.

 

To create and use blocks and slices, you need to know the type of an element - is it a highway, a landuse or a barrier. And if it is a highway, is it a primary, a secondary or a footway.

 

Keys

Apart from relations where the type key stores it, this information is not available within OSM data. Again, it has to be guessed, and there is much discussion on the forums and elsewhere about the “main keys”, as they are sometimes called. Several apps, such as most OSM editors, contain such a list, but the lists are not always the same.

The approach I took was this: I counted all the keys of all the tags of all the elements and took the one that appeared most often in this list. I considered this the first main key and removed all elements with this key from the set of elements. Then I repeated this process.

After a while some “dirt” remains: elements that do not show a clear “main key”. I think if you start digging around in that dirt, you might find some hidden gems, that is, main keys that aren’t used very often, because the items they represent do not exist very often in the real world. But I didn’t.

I repeated this process twice,1 once for nodes and once for ways. You have to keep an open mind, because sometimes the top key is clearly not a “main key”, for example name pops up after a while. Addresses needed some special treatment, because there is no address key. Addresses are stored as a collection of addr:* keys. Fortunately the addr:housenumber is almost always present, so I used that as the key for addresses.2

 

Values

See full entry

This post is the result of a student project. The work was done by the following group of students: Alice Rey, Jihene Haj Hamouda, Yahia Heni, Mohammed El Mehdi Alaoui, Kaies Mhadhbi.

Example

Try our online demonstration to find your own shade-optimized route! Discover how we improve pedestrian comfort during hot days by prioritizing shaded paths. (demo restricted to the Nantes Area)

Introduction

This project focuses on enhancing pedestrian routing in OpenStreetMap (OSM) by incorporating shade into route computations. Exposure to direct sunlight significantly affects pedestrian comfort, especially during hot weather, making shaded routes preferable even if slightly longer. Despite this importance, existing OSM data related to shade has typically been qualitative and limited in precision. To address this, we developed and implemented two complementary methods to integrate detailed shading information into OSM-based routing engines like Graphhopper:

See full entry

🗺️ Guia de Mapeamento com o Editor iD no OpenStreetMap

🌍 Mapping Guide with iD Editor in OpenStreetMap

  1. Crie sua conta no OpenStreetMap

    Acesse: www.openstreetmap.org

    Clique em “Sign Up” (ou “Inscrever-se”).

    Preencha com seu e-mail, nome de usuário e senha.

    Confirme o cadastro pelo e-mail.

  2. Entre no mapa

    Faça login no site.

    Navegue até a área que você conhece (sua cidade, bairro etc.).

    Clique em “Editar” no topo da tela — o editor iD será carregado.

  3. Conheça a interface do editor iD

    Mapa ao centro: onde você vai editar.

    Menu lateral esquerdo: para escolher o que deseja adicionar (ponto, linha, área).

    Menu lateral direito: com camadas e imagens de satélite (ajuda na visualização).

    Barra superior: salvar, desfazer/refazer, configurações e ajuda.

  4. Escolha o que mapear

Comece por coisas simples que você conhece bem, como:

See full entry

Location: Boa Vista, Recife, Região Geográfica Imediata do Recife, Região Metropolitana do Recife, Região Geográfica Intermediária do Recife, Pernambuco, Região Nordeste, Brasil

Simple 3D buildings

They are ofcourse not M4TR as you use the building=yes tag and you add colours, height and roof shapes.

But for more complicated buildings?

What if there is an apartment building with different colours? Am i allowed to use building:part=yes for each colour? Or is that M4TR?

Monuments

Monuments can be a little sad to just se as a square or even a node, so could i map them in 3D? That sure is M4TR, but we want to map how it is in reality. So therefore it should be allowed? Right?

Posted by daniel-j-h on 17 April 2025 in English. Last updated on 29 April 2025.

How an algorithm from the 80s sets the new standard for modern spatial indices

Geospatial indices are all around us. They allow us to search through millions of points in an instant answering questions such as “find me the closest bike repair shop” efficiently.

And yet there are still forgotten gems in the archives of computational geometry: Space-filling curve based spatial indices. With an optimization going back to the year 1981 this spatial index delivers surprising efficiency; and yet it is rarely discussed in the geospatial community.

Let’s go back in time and rediscover how we can build a spatial index on top of a space-filling curve to accelerate geospatial queries and simplify geospatial indexing for location-based applications.

Note: If you know about Z-Order Curves or Hilbert Curves already I still recommend you reading this as the post below will show you how use Z-Order Curves efficiently as a spatial index and that is something you probably don’t know yet.

Note: Now available on NPM as zbush

npm install zbush

The Z-Order Curve

The Z-Order Curve is one of many space-filling curves transforming multi-dimensional data into a single dimension while preserving locality. In the geospatial domain it allows us for example to transform longitude and latitude into a single number while preserving geographic proximity.

For spatial queries such as “find me the closest bike repair shop” we want to find points within a rectangular area. To search a rectangular area on the Z-Order Curve (highlighted in gray below) we start at the top left Z value of the rectangular area and walk the curve until we’re at the bottom right.

See full entry

At this point I’ve officially mapped out half of Bell Island, Newfoundland. Although I’m geographically halfway, the southern portion which I’ve mapped out is much less geospatially dense than the northern portion, so I’d estimate I’m about a third of the way through this project.

The ID Editor has been very intuitive so far in this process, and I have also learned a bit on how to use the JOSM editor for more specific geospatial processes. One thing I have yet to figure out is the display order of overlapping features, however I believe this is tweaked through the relations mechanic in the ID editor.

So far the minimal existing geospatial data that is present in this area has been accurate for the most part, with only slight alterations required to match the current satellite data that I’m basing my new features off of. That being said, quality varies, and it’s clear that some of these features were one-off additions by likely inexperienced users.

I think I’ll be able to keep up this mapping pace for the foreseeable future, so this project will hopefully get within the mopping up phase within a couple of months.

Location: Unincorporated Newfoundland, Newfoundland, Newfoundland and Labrador, Canada
Posted by CoreyN on 15 April 2025 in English.

Belfast Maine - Little City by the Water

Hello! I have just started getting into OpenStreetMap in the last few days, I absolutely love the way it works, and love to map out different towns. I lived in the town of Belfast, Maine for many years and visit this town so it holds a special part to me.

I’ve been adding all the “Downtown” houses that aren’t mapped, they are just Address points, and different new Houses, roads ETC. I just found out last night that I can actually MERGE address points with areas for houses so it’ll speed the process up a lot for me.

Location: Belfast, Waldo County, Maine, 04915, United States
Posted by JosephTJames on 15 April 2025 in English.

Khumalo 01

Overview

This is inspired by laambda19’s diary post on their mapping project, I want to document my work the same way with clear examples of before and after, adding more detail to the Bulawayo map. Aerial photography and local knowledge are the main driving force in mapping. There is scarce information available online, what little there is often requires a Facebook account.

Changes made

*I added colour to buildings and roofs

before & after

Nothing to see on Carto renderers but in simple3D renderers

Location: Khumalo, Bulawayo, Bulawayo Province, Zimbabwe
Posted by Jaiden1254 on 14 April 2025 in English.
Posted by Jaiden1254 on 13 April 2025 in English. Last updated on 14 April 2025.