<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://osm2pgsql.org/news/feed.xml" rel="self" type="application/atom+xml" /><link href="https://osm2pgsql.org/" rel="alternate" type="text/html" /><updated>2026-05-14T11:25:38+02:00</updated><id>https://osm2pgsql.org/news/feed.xml</id><title type="html">osm2pgsql</title><subtitle>osm2pgsql</subtitle><entry><title type="html">NGI0 grant for osm2pgsql</title><link href="https://osm2pgsql.org/news/2026/04/25/ngi0-grant-for-osm2pgsql.html" rel="alternate" type="text/html" title="NGI0 grant for osm2pgsql" /><published>2026-04-25T00:00:00+02:00</published><updated>2026-04-25T15:35:20+02:00</updated><id>https://osm2pgsql.org/news/2026/04/25/ngi0-grant-for-osm2pgsql</id><content type="html" xml:base="https://osm2pgsql.org/news/2026/04/25/ngi0-grant-for-osm2pgsql.html"><![CDATA[<p>The amount of data in OSM is climbing continually, and therefore the memory and
disk requirements of osm2pgsql have risen as well. To address this issue we
have <a href="https://nlnet.nl/project/Osm2pgsql/">applied for and won a grant from the NGI0 Commons
Fund</a>. In this project we want to reduce
the memory and disk usage of osm2pgsql by implementing more efficient storage
formats, specifically for “intermediate” data used while processing, often
called the “middle”. We are tentatively calling this CODA, the Compact
OpenStreetMap Data Archive. This will not only help with resource consumption
on the community-run OSM servers, but also enable wider use of OSM data, even
on planet-scale, in low-resource environments available to small NGOs or to
students.</p>

<p>Long-time osm2pgsql developer Jochen Topf will be funded to work on this
project for the next year or so. Progress and all the details will be published
on the <a href="https://osm2pgsql.org/project-coda/">project’s webpage</a>.</p>

<div style="display: flex; flex-wrap: wrap; align-items: center; gap: 20px;">
    <img src="https://osm2pgsql.org/img/nlnet.svg" width="200" style="float: left; padding: 0 40px 40px 0;" />
    <img src="https://osm2pgsql.org/img/ngi0.svg" width="200" style="float: left; padding: 0 40px 40px 0;" />
</div>

<p>This project is funded through the <a href="https://nlnet.nl/commonsfund">NGI0 Commons
Fund</a>, a fund established by
<a href="https://nlnet.nl/">NLnet</a> with financial support from the European
Commission’s <a href="https://ngi.eu/">Next Generation Internet</a> programme, under the
aegis of <a href="https://commission.europa.eu/about-european-commission/departments-and-executive-agencies/communications-networks-content-and-technology_en">DG Communications Networks, Content and
Technology</a>
under grant agreement No
<a href="https://cordis.europa.eu/project/id/101135429">101135429</a>. Additional funding
is made available by the <a href="https://www.sbfi.admin.ch/sbfi/en/home.html">Swiss State Secretariat for Education, Research and
Innovation</a> (SERI).</p>]]></content><author><name></name></author><summary type="html"><![CDATA[The amount of data in OSM is climbing continually, and therefore the memory and disk requirements of osm2pgsql have risen as well. To address this issue we have applied for and won a grant from the NGI0 Commons Fund. In this project we want to reduce the memory and disk usage of osm2pgsql by implementing more efficient storage formats, specifically for “intermediate” data used while processing, often called the “middle”. We are tentatively calling this CODA, the Compact OpenStreetMap Data Archive. This will not only help with resource consumption on the community-run OSM servers, but also enable wider use of OSM data, even on planet-scale, in low-resource environments available to small NGOs or to students.]]></summary></entry><entry><title type="html">OSM-Carto switched to flex output</title><link href="https://osm2pgsql.org/news/2026/04/20/osm-carto-switches-to-flex.html" rel="alternate" type="text/html" title="OSM-Carto switched to flex output" /><published>2026-04-20T00:00:00+02:00</published><updated>2026-04-20T17:20:23+02:00</updated><id>https://osm2pgsql.org/news/2026/04/20/osm-carto-switches-to-flex</id><content type="html" xml:base="https://osm2pgsql.org/news/2026/04/20/osm-carto-switches-to-flex.html"><![CDATA[<p>Nearly six years ago we introduced the “flex” output in osm2pgsql version 1.3.0
and then improved it over the years adding more and more functionality. About a
month ago
<a href="https://github.com/openstreetmap-carto/openstreetmap-carto">OpenStreetMap-Carto</a>,
the iconic OSM map style switched to using the “flex” output in <a href="https://www.openstreetmap.org/user/imagico/diary/408344">version
6.0.0</a>. And now the
<a href="https://en.osm.town/@osm_tech/116397182590585788">OSM Foundation has finished their gradual rollout of the new
version</a>. So the most
important user of osm2pgsql doesn’t need the old “pgsql” output any more.</p>

<p>That switch has been eagerly awaited by the osm2pgsql maintainers, because it
means we can start planning to retire the old “pgsql” output in earnest. This
will allow us to remove a lot of code and simplify other parts of osm2pgsql
making it easier to maintain and improve in the long term. We have already
marked the “pgsql” output as deprecated with <a href="https://osm2pgsql.org/news/2024/09/19/release-2.0.0.html">version
2.0.0</a> released in
2024, so this shouldn’t come as a surprise. The old “pgsql” output will not go
away immediately, but it will also not be available forever. If you are still
using it, start migrating your styles.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Nearly six years ago we introduced the “flex” output in osm2pgsql version 1.3.0 and then improved it over the years adding more and more functionality. About a month ago OpenStreetMap-Carto, the iconic OSM map style switched to using the “flex” output in version 6.0.0. And now the OSM Foundation has finished their gradual rollout of the new version. So the most important user of osm2pgsql doesn’t need the old “pgsql” output any more.]]></summary></entry><entry><title type="html">Test Your Styles with the New Style Tester</title><link href="https://osm2pgsql.org/news/2025/12/04/style-tester.html" rel="alternate" type="text/html" title="Test Your Styles with the New Style Tester" /><published>2025-12-04T00:00:00+01:00</published><updated>2025-12-04T16:24:43+01:00</updated><id>https://osm2pgsql.org/news/2025/12/04/style-tester</id><content type="html" xml:base="https://osm2pgsql.org/news/2025/12/04/style-tester.html"><![CDATA[<p>Styles (configurations) for osm2pgsql are written in the Lua programming
language. And they are becoming more complex. Users have been asking for a long
time for some way of testing those styles to help with writing and debugging
the Lua code. We now have a solution for you.</p>

<p>We have had tests for osm2pgsql, the software, for a long time. This includes
tests that run osm2pgsql with certain inputs and parameters and check that
osm2pgsql produces the correct output, including checks that make sure the
correct information ends up in the correct database tables. These kinds of
tests are really similar to what users need, but the tests were deeply
integrated with the rest of the osm2pgsql testing system, they were hard to
use, and they were not documented.</p>

<p>We have polished that testing framework, documented it and made it work on its
own and are now making it available for osm2pgsql users. So you can now use the
same testing engine used for internal testing to test your style sheets. The
test code builds upon the Python BDD <a href="https://behave.readthedocs.io/">behave</a>
testing framework, and adds all sorts of useful features to the tests. OSM test
data can be integrated in various ways, inline in the test file or as external
data. And we have added various handy features for testing database content.</p>

<p>Style testing will be available in the next version of osm2pgsql, but you can
already try it out. You only need to download a <a href="https://github.com/osm2pgsql-dev/osm2pgsql/blob/master/scripts/osm2pgsql-test-style">single
file</a>
from the current master and can use that with any reasonably modern version
of osm2pgsql. Find the full documentation in <a href="https://osm2pgsql.org/doc/manual.html#style-testing">the
manual</a>.</p>

<p>We’d love it if you tried the new style tester and tell us what you think. We
are sure there will be some teething problems you can help us find and fix
before the next release.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Styles (configurations) for osm2pgsql are written in the Lua programming language. And they are becoming more complex. Users have been asking for a long time for some way of testing those styles to help with writing and debugging the Lua code. We now have a solution for you.]]></summary></entry><entry><title type="html">Release 2.2.0</title><link href="https://osm2pgsql.org/news/2025/09/17/release-2.2.0.html" rel="alternate" type="text/html" title="Release 2.2.0" /><published>2025-09-17T00:00:00+02:00</published><updated>2025-09-17T20:23:21+02:00</updated><id>https://osm2pgsql.org/news/2025/09/17/release-2.2.0</id><content type="html" xml:base="https://osm2pgsql.org/news/2025/09/17/release-2.2.0.html"><![CDATA[<p>We are excited to publish version 2.2.0 of osm2pgsql. This release adds two powerful building blocks that can be used to implement all sorts of new features. The new “Locators” and the “deleted callbacks” features seem simple by themselves, but they can be used as basis for many features that have been requested for years.</p>

<h2 id="new-locator-feature">New Locator feature</h2>

<p>This release introduces a new feature: Locators. They help with a common problem, namely how to quickly find out in which region an OSM object is. The region can be a country or any other area. A locator is initialized with one or more regions, each region has a name and a polygon or bounding box. A geometry of an OSM object can then be checked against this region list to figure out in which region(s) it is located. This check is much faster than it would be to do this inside the database after import.</p>

<p>Locators can be used for all sorts of interesting features, for instance:</p>

<ul>
  <li>Read larger OSM file but import only data inside some area.</li>
  <li>Annotate each OSM object with the country (or other region) it is in. This can then, for instance, be used to show special highway shields for each country.</li>
  <li>Use the information which region the data is in for further processing, for instance setting of default values for the speed limit or using special language transliterations rules based on country.</li>
</ul>

<p>For details see the <a href="https://osm2pgsql.org/doc/manual.html#locators">manual</a> and look at the example config files provided in the flex-config/locator directory.</p>

<h2 id="callbacks-for-deleted-objects">Callbacks for deleted objects</h2>

<p>The Lua callback functions <code class="language-plaintext highlighter-rouge">process_node()</code>, <code class="language-plaintext highlighter-rouge">process_way()</code>, and <code class="language-plaintext highlighter-rouge">process_relation()</code> (and their <code class="language-plaintext highlighter-rouge">untagged</code> companions) only get called for new or changed OSM objects. Deleted objects are usually handled behind the scenes and for most use cases this is enough.</p>

<p>But sometimes it is useful to also know when an object was deleted. That’s why we have new <code class="language-plaintext highlighter-rouge">process_deleted_node/way/relation()</code> callbacks now. These open up a lot of new processing options for working with changes. Some users do advanced processing of OSM data inside the database after the data is imported with osm2pgsql. This is much easier now because you don’t need database triggers anymore to detect and process deleted objects.</p>

<h2 id="new-osm2pgsql-expire-command">New osm2pgsql-expire command</h2>

<p>We have added a osm2pgsql-expire command. It is currently marked as experimental so it might change without notice. You can use it to turn entries in expire files (that look like <code class="language-plaintext highlighter-rouge">ZOOM/X/Y</code>) into a GeoJSON file visualizing the tiles. When given an OSM data file it can generate the tile output (in expire file format or as GeoJSON). This tool is intended as a debugging aid.</p>

<h2 id="other-features-and-fixes">Other features and fixes</h2>

<ul>
  <li>Fix: Ways and relations that didn’t change themselves but were processed due to some of their members changing were always send to the normal <code class="language-plaintext highlighter-rouge">process_node/way/relation()</code> callback even if they had no tags. This is now fixed, the <code class="language-plaintext highlighter-rouge">process_untagged_*()</code> callbacks are called instead.</li>
  <li>Fix problem when detecting PostGIS version at the start of osm2pgsql. If the PostGIS version can not be detected, we report that properly.</li>
  <li>Allow both <code class="language-plaintext highlighter-rouge">--username</code> and <code class="language-plaintext highlighter-rouge">--user</code> command line options in all commands, there was an inconsistency between osm2pgsql and osm2pgsql-replication before.</li>
  <li>When using the RAM middle, untagged nodes that were members of a relation were not found when building the geometry for that relation. This is now fixed and MultiPoint and GeometryCollection geometries are built correctly.</li>
  <li>Fixed bounding box calculation for relations with node members.</li>
  <li>Reworked README.md, CONTRIBUTING.md and Contribution Guide on the website.</li>
  <li>Refactored a lot of the boilerplate code handling the Lua integration. This code is now shorter and easier to understand and maintain.</li>
  <li>Fixed bugs in wildcard matching of old C transforms.</li>
  <li>Fixed and improved tests around index creation.</li>
  <li>Finally fixed the last warnings reported by clang-tidy, see https://osm2pgsql.org/news/2025/08/21/zero-warnings.html, from now on new code is only allowed in if it checks cleanly with clang-tidy.</li>
  <li>Various cleanups in flex example config files.</li>
  <li>Lots of code cleanups, mainly to bring naming and formatting to a consistent state.</li>
  <li>As always, some code was refactored and there were many small fixes to the code and docs.</li>
</ul>]]></content><author><name></name></author><summary type="html"><![CDATA[We are excited to publish version 2.2.0 of osm2pgsql. This release adds two powerful building blocks that can be used to implement all sorts of new features. The new “Locators” and the “deleted callbacks” features seem simple by themselves, but they can be used as basis for many features that have been requested for years.]]></summary></entry><entry><title type="html">Updated Contributor Docs</title><link href="https://osm2pgsql.org/news/2025/08/25/developer-docs-updated.html" rel="alternate" type="text/html" title="Updated Contributor Docs" /><published>2025-08-25T00:00:00+02:00</published><updated>2025-08-25T16:06:17+02:00</updated><id>https://osm2pgsql.org/news/2025/08/25/developer-docs-updated</id><content type="html" xml:base="https://osm2pgsql.org/news/2025/08/25/developer-docs-updated.html"><![CDATA[<p>Over the last few weeks we have updated and overhauled the “Contributing”
section on the osm2pgsql website. We want to make it easier for users and
contributors to understand what our plans are for osm2pgsql, what are the
open issues and what you can do to help.</p>

<p>The new <a href="/contribute/">Contributing Overview</a> no longer
focuses on coding because there are so many more ways to help the project
than with code. Whether you are a user, have ideas on improving the
documentation, or want to show your use case, everything helps to make
osm2pgsql better.</p>

<p>We have also updated the <a href="/about/road-map.html">road map</a> with the
most important milestones for getting to the next major release 3. If you
are looking at a concrete project to work on, have a look at the updated
<a href="/contribute/project-ideas.html">project ideas</a>.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Over the last few weeks we have updated and overhauled the “Contributing” section on the osm2pgsql website. We want to make it easier for users and contributors to understand what our plans are for osm2pgsql, what are the open issues and what you can do to help.]]></summary></entry><entry><title type="html">Achievement unlocked: Zero Warnings</title><link href="https://osm2pgsql.org/news/2025/08/21/zero-warnings.html" rel="alternate" type="text/html" title="Achievement unlocked: Zero Warnings" /><published>2025-08-21T00:00:00+02:00</published><updated>2025-08-21T11:21:38+02:00</updated><id>https://osm2pgsql.org/news/2025/08/21/zero-warnings</id><content type="html" xml:base="https://osm2pgsql.org/news/2025/08/21/zero-warnings.html"><![CDATA[<p>New code will probably have some errors, the compiler finds some of them and
refuses to produce the final program. So far so good. But code also contains
lots of issues that are not outright errors, they just look “suspicious” to the
compiler in one way or another. Some of them turn out to be actual errors, but
sometimes the code is totally okay in the specific context. The compiler can’t
tell for sure, so it emits a warning and keeps going. Different compilers and
different versions of those compilers print different warnings.</p>

<p>And then there are things that are not problems by themselves, they just make
the code harder to read, possibly leading to more problems down the line. Or
sometimes a tool can detect that you are using an “old-fashioned” way of doing
things and there is a better, more modern or more efficient way, to achieve the
same thing. Some of these issues are also detected by the compiler, but for
most programming languages there are extra tools, so called “linters”, that
find those issues. For C++ “clang-tidy” is such a tool.</p>

<p>We have been compiling with lots of warnings enabled for years now. And we have
also been running “clang-tidy” regularly for a long time, chipping away at the
problems mentioned. Some warnings are easily dealt with, but others are more
complicated and need more code changes for a good solution. And in some cases,
after careful consideration, warnings have to be disabled, either for the whole
code or for specific places in the code. Osm2pgsql is 19 years old now, the
first implementation was written in C, along the way we switched to C++98, then
C++11, C++14 and then C++17. So the way things can and should be done changed
over time. New versions of compilers and new versions of clang-tidy came up
with new warnings. As part of our work on osm2pgsql we looked at those warnings
whenever there was time and fixed something here or there. But there was always
another warning, another sometimes very old and sometimes newly introduced
problem. Until now.</p>

<p>For a long time now our code has compiled cleanly with the GCC and Clang
compilers, today we reached the point where it also compiles cleanly on MSVC.
And it passes all checks configured in clang-tidy. To “lock in” that
achievement we have changed the CI settings so that any warnings will show up
as errors blocking us from merging the code. This way we can be sure to keep
the “zero warnings” achievement.</p>

<p>Full disclosure: For some legacy code we have disabled a few warnings. That
part of osm2pgsql is already deprecated and will be removed, it just doesn’t
make sense to spend time fixing code that’s more than a decade old when that
code is going away anyway. Especially as fixing warnings can sometimes
introduce new bugs in the process.</p>

<p>For clang-tidy we enable all checks by default and then selectively disable all
checks that don’t make sense for us. The clang-tidy config file contains
comments explaining why the checks are disabled. We will probably revisit some
decisions on what checks to disable in the future as our code improves further.</p>

<p>This is not the end of our journey to improve the osm2pgsql code, there is
plenty more to do. But it is a major milestone in that it makes sure we are not
sliding back behind what we have already achieved, regardless of any new
changes we make.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[New code will probably have some errors, the compiler finds some of them and refuses to produce the final program. So far so good. But code also contains lots of issues that are not outright errors, they just look “suspicious” to the compiler in one way or another. Some of them turn out to be actual errors, but sometimes the code is totally okay in the specific context. The compiler can’t tell for sure, so it emits a warning and keeps going. Different compilers and different versions of those compilers print different warnings.]]></summary></entry><entry><title type="html">Release 2.1.1</title><link href="https://osm2pgsql.org/news/2025/04/14/release-2.1.1.html" rel="alternate" type="text/html" title="Release 2.1.1" /><published>2025-04-14T00:00:00+02:00</published><updated>2025-04-14T11:39:46+02:00</updated><id>https://osm2pgsql.org/news/2025/04/14/release-2.1.1</id><content type="html" xml:base="https://osm2pgsql.org/news/2025/04/14/release-2.1.1.html"><![CDATA[<p>This is a bug fix release which contains the following:</p>

<ul>
  <li>refuse to update database when the flatnode is missing</li>
  <li>fix regression where writing to tables without a managed id column was not possible</li>
</ul>]]></content><author><name></name></author><summary type="html"><![CDATA[This is a bug fix release which contains the following:]]></summary></entry><entry><title type="html">Release 2.1.0</title><link href="https://osm2pgsql.org/news/2025/04/07/release-2.1.0.html" rel="alternate" type="text/html" title="Release 2.1.0" /><published>2025-04-07T00:00:00+02:00</published><updated>2025-04-07T16:38:05+02:00</updated><id>https://osm2pgsql.org/news/2025/04/07/release-2.1.0</id><content type="html" xml:base="https://osm2pgsql.org/news/2025/04/07/release-2.1.0.html"><![CDATA[<p>Today we released version 2.1.0, a bugfix and maintenance release. The main
visible change is that osm2pgsql now works better together with connection
poolers and similar database middleware: prepared statements now use protocol
level prepare instead of <code class="language-plaintext highlighter-rouge">PREPARE</code> SQL commands and there is a new option to
explicitly create a primary key on flex tables.</p>

<p>Other fixes and features:</p>

<ul>
  <li>check flat node file format for forwards compatibility to prepare for future changes of the flatnode file format</li>
  <li>fix two-stage processing when flat node file is used</li>
  <li>fix getting node locations in slim node with two-stage processing</li>
  <li>updated included libosmium, protozero and fmt libraries</li>
</ul>]]></content><author><name></name></author><summary type="html"><![CDATA[Today we released version 2.1.0, a bugfix and maintenance release. The main visible change is that osm2pgsql now works better together with connection poolers and similar database middleware: prepared statements now use protocol level prepare instead of PREPARE SQL commands and there is a new option to explicitly create a primary key on flex tables.]]></summary></entry><entry><title type="html">Sovereign Tech Fellowship for osm2pgsql</title><link href="https://osm2pgsql.org/news/2025/02/06/sovereign-tech-fellowship.html" rel="alternate" type="text/html" title="Sovereign Tech Fellowship for osm2pgsql" /><published>2025-02-06T00:00:00+01:00</published><updated>2025-02-06T14:37:31+01:00</updated><id>https://osm2pgsql.org/news/2025/02/06/sovereign-tech-fellowship</id><content type="html" xml:base="https://osm2pgsql.org/news/2025/02/06/sovereign-tech-fellowship.html"><![CDATA[<p>We are happy to announce that osm2pgsql maintainer Sarah has been selected as
one of the fellows for the one-year pilot of the
<a href="https://www.sovereign.tech/news/meet-the-sovereign-tech-fellows">Sovereign Tech Fellowship programme</a>
of the Sovereign Tech Agency. The programme recognises and financially supports
the significant amount of time that goes into the daily maintenance of an
open-source project. Read more about the fellowship in
<a href="https://nominatim.org/2025/02/06/sovereign-tech-fellowship.html">Sarah’s post over at nominatim.org</a>.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[We are happy to announce that osm2pgsql maintainer Sarah has been selected as one of the fellows for the one-year pilot of the Sovereign Tech Fellowship programme of the Sovereign Tech Agency. The programme recognises and financially supports the significant amount of time that goes into the daily maintenance of an open-source project. Read more about the fellowship in Sarah’s post over at nominatim.org.]]></summary></entry><entry><title type="html">Release 2.0.1</title><link href="https://osm2pgsql.org/news/2024/12/02/release-2.0.1.html" rel="alternate" type="text/html" title="Release 2.0.1" /><published>2024-12-02T00:00:00+01:00</published><updated>2024-12-02T09:29:20+01:00</updated><id>https://osm2pgsql.org/news/2024/12/02/release-2.0.1</id><content type="html" xml:base="https://osm2pgsql.org/news/2024/12/02/release-2.0.1.html"><![CDATA[<p>This release fixes some small issues with 2.0.0:</p>

<ul>
  <li>fix forwarding of <code class="language-plaintext highlighter-rouge">--schema</code> parameter from osm2pgsql-replication to osm2pgsql</li>
  <li>install <code class="language-plaintext highlighter-rouge">osm2pgsql_find_changed_ways</code> function in the right schema (thanks @falko17)</li>
  <li>install osm2pgsql-gen binary by default</li>
</ul>]]></content><author><name></name></author><summary type="html"><![CDATA[This release fixes some small issues with 2.0.0:]]></summary></entry></feed>