Skip to content

Releases: osm2pgsql-dev/osm2pgsql

Release 1.6.0

24 Jan 15:48
Compare
Choose a tag to compare
  • The osm2pgsql-replication script which has been included in the osm2pgsql repository for a while will now be installed together with its man page on "make install". To use it you need Python3, psycopg2 (or psycopg3), and PyOsmium installed. See the manual for details.
  • Ignore relations with more than 32.000 members (which should never happen in real data) instead of failing.
  • Removed the dependency on boost::algorithm.
  • Included libosmium was updated to newest version 2.17.3 which contains an important fix for a problem which can lead to osm2pgsql locking up.

Release 1.5.2

11 Jan 10:49
Compare
Choose a tag to compare

This is a bugfix release with only minor changes.

Changes:

  • Fix parsing problems in style file reader. Some variables were not initialized correctly when parsing a style file, which lead to some surprising behaviour with flags of one config line re-used by the next if the flags field of that line was empty. This could also have lead to buffer overflows in the first line being parsed.
  • Fix: When there is an active progress display, log messages would show up after the progress display instead of the next line.
  • Release some allocated memory earlier in the processing chain.
  • Fix confusing log message: The message "Done postprocessing on table '{}' in {}" was logged twice when --drop is used. This changes one of the log messages to the more specific "Table '{}' dropped in {}".
  • Run ANALYZE on middle tables only in create mode saving some processing time.
  • Add 'status' command to osm2pgsql-replication. Prints the current replication status, and with --json prints that as JSON data. (thanks @amandasaurus)
  • Needs at least CMake 3.5.0 now.
  • Updates the included versions of the catch2, fmt, libosmium, and protozero libraries to current versions.

Note that this is the last version which will compile with C++14. The next version 1.6.0 will need C++17.

Release 1.5.1

29 Jul 09:32
Compare
Choose a tag to compare

This is a bugfix release. It contains some important bug fixes, so everybody is encouraged to update.

Here are the changes:

  • When importing a planet file or a huge extract, something with more than about 1 billion nodes, the new RAM node location store could overflow a 32bit "offset" value which meant that the node locations would not be found again. The result were missing features, because osm2pgsql just ignores features with geometries that can not be built due to missing node locations.
  • Osm2pgsql creates temporary tables as UNLOGGED to get better performance. We fixed a bug where non-temporary output tables were also created as UNLOGGED (when clustering was disabled.)
  • In the flex output table columns marked create_only are now only created in final tables, not temporary tables. This avoids some problems, for instance when using columnn type SERIAL.
  • Make the input data check more strict: Two versions of same object are not allowed in the input.
  • Remove IMMUTABLE volatility classification from validity check trigger function.
  • Make the directory where the config file is available in the flex output through the osm2pgsql.config_dir global Lua variable.
  • Update required libosmium version to 2.17.0. The version 1.5.0 already required this, but it wasn't documented.

Release 1.5.0

02 Jun 09:20
Compare
Choose a tag to compare

This release brings quite a lot of improvements. We removed the "experimental" label from the flex output which we introduced in version 1.3.0. There are some small changes you might have to make to your flex configurations, see the Upgrading chapter of the manual for details.

This release also contains a rewrite of the code used to temporarily store OSM data in memory while processing the data in non-slim mode, i.e. when you import data without --slim. It now uses much less memory.

Other changes:

  • The multi output which was marked as deprecated in the last versions has now been removed.
  • This is the first release that needs a C++14 compiler.
  • New cluster table option in the flex config file which allows you to disable clustering of the table data by geometry.
  • Do not try to create indexes for flex output tables without id.
  • Added flex config example (attributes.lua) showing how to access OSM object attributes (such as timestamp, user name, etc.) from Lua.
  • Added a warning if --flat-nodes/-F is used in non-slim mode.
  • Report cache memory usage when running with --log-level=debug.
  • Report thread number in all log lines when --log-level=debug is set.
  • Use trigger to check geometry validity on first import instead of only doing this when copying the data for clustering. In the flex output this validity check is not used any more for point geometries because they are always valid anyway.
  • The RapidJSON library is now used and included in the source.
  • Now needs libosmium 2.17.0 which is included in the source.
  • Lots of internal cleanups and restructurings.

Release 1.4.2

07 Apr 07:00
Compare
Choose a tag to compare

This is a minor bugfix release that fixes the following issues:

  • Translate empty strings into NULL instead of 0.0 for columns of type double.
  • Consistently quote table names to handle upper case table prefixes correctly.
  • Avoid querying geometries in stage 2 of the flex output when expiry is disabled.
  • Fix syntax error in index creation with schema enabled.

The release also adds a new osm2pgsql-replication script to simplify the process of downloading and applying updates. It requires pyosmium and psycopg2. See #1411 for more information.

Release 1.4.1

03 Feb 15:30
Compare
Choose a tag to compare

This is a minor release with some bug fixes and internal cleanups and changes, mostly in the "middle" code and geometry processing.

We have released all example config files for the flex output into the Public Domain, so they can be used as widely as possible.

Fixes:

  • Some MultiLineStrings were not assembled correctly from relations. This happened when a relation had exactly two member ways forming a closed ring with the two ways oriented against each other (#1394).
  • Long LineStrings can (optionally) be split by osm2pgsql into shorter segments. In some cases this would produce invalid LineStrings (aee1be1).
  • Do not try to display ANSI color codes on Windows terminals which don't understand them (ab96aeb).

Other changes:

  • When osm2pgsql is started without any arguments, it now shows the help text instead of an error.
  • Write PostGIS version to output when osm2pgsql starts up and show error message when a database without PostGIS extension is used (c7927e8, #1400).
  • Improved progress output and summary information when processing input files.
  • Add log entry with number of threads when thread pool is started (34cf9d8).
  • Report overall memory usage at the end of running osm2pgsql.
  • Updated included library versions (fmt 7.1.3, libosmium 2.16.0, catch 2.13.4).

Release 1.4.0

07 Dec 10:42
Compare
Choose a tag to compare

The project has a new website at https://osm2pgsql.org now with extensive documentation and examples, and with sections on support, contributing, news, etc. Most of the documentation from the repository and the OSM wiki was moved there. We still have a man page, it is now maintained in markdown format. All the documentation, man page, help texts etc. have been cleaned up, made more consistent and brought up to date.

The program has a much improved log output now. Each line is prefixed with a date/timestamp and by default osm2pgsql isn't as verbose any more. You can change the verbosity using several options. You can even have super-verbose logging of all SQL commands issued and all data written to the database. Warnings and errors now appear in red color if your console supports it. Progress output can be disabled, for instance, when the output is redirected to a file. When printing how low something took, osm2pgsql will now not only print the seconds but also a more human readable format with hours, minutes, and seconds.

In the last release (version 1.3.0) we have already added a warning when you used input files with negative OSM object ids or input files which are not ordered correctly. These are now not allowed any more and osm2pgsql will stop with an error if it detects these. See the manual for how to work around this. This allowed us to improve the handling of multiple input files. Osm2pgsql now reads multiple input files at the same time merging the contents. This means that you can now import several extracts in one go. Note that the extracts still have to come from the same point in time!

Changes in the flex output (which is still marked experimental). Not that some of these are breaking changes compared to the behaviour in version 1.3.0:

  • Fix: Flex output sometimes created two id indexes on the same table.
  • Set projection for geometry columns in the table configuration. The command line options --latlong, -m, --merc, -E, and --proj are not used by the flex output any more.
  • Flex mode setting type_column fixed. Now also supports id columns compatible with Imposm.
  • Optionally wrap polygon geometries in multipolygons if the geometry column of the target table is of type MultiPolygon.
  • Switch multipolygon generation from default off to default on. The multi option on the area geometry transformation has been removed and there is a new option split_at.
  • Add several Lua helper functions for flex config files.

Other changes:

  • The middle, pgsql output and flex output now all support setting the schema used for tables, indexes and functions.
  • Add support for the new API of the PROJ library (used since PROJ version 6).
  • Fixed bug in 1.3.0 that didn't disable the PostgreSQL JIT processing which slows down osm2pgsql considerably when using PostgreSQL 12 and above.
  • Do not create planet_osm_nodes table if flat nodes are used.
  • Print database version and check that we are using a supported PostgreSQL version.
  • Allow PostgreSQL conninfo string in -d/--database option.
  • Removed legacy code that tried to alter existing database tables if your config changed since the initial import. This code could only detect and do very few necessary changes and therefore could not be relied upon anyway.
  • Add --with-forward-dependencies option. This allows to disable dependency management. Used for Nominatim.
  • There is a new "bucket index" for the node-to-way-lookup in the middle. It needs a lot less disk space and imports are much faster, but updates will be slower. It is currently not enabled, but osm2pgsql experts are encouraged to try it out and give us feedback. See https://osm2pgsql.org/doc/manual.html#bucket-index-for-slim-mode for details.
  • As usual, there are various code cleanups and bug fixes.

The 'multi' output was already deprecated in the last version (1.3.0), it will be removed in the next release.

Release 1.3.0

28 Jul 08:39
Compare
Choose a tag to compare

This release introduces the new "flex" output. It allows a more flexible
definition of output tables and columns. It also adds a second stage of
processing which makes it possible to get information from relations to
their members, allowing, for instance, to render tags from bicycle route
relations on their member ways. The "flex" output is configured through
Lua scripts.

The flex output is currently still marked as experimental, because it is new
and we want to collect feedback from the community before finalizing the API.
But it already works well and users are encouraged to try it out. Some new
features are only or will only be available in the flex output and we expect
that it will replace the other outputs in the long term.

Some features have been marked as deprecated:

  • The "multi" output will be removed in a future version of osm2pgsql. If you
    are using the multi output, switch to the flex output now and tell us if
    you have any problems.
  • When the input file uses negative OSM object IDs a warning is now generated.
    Negative IDs never worked correctly for all use cases. Future versions of
    osm2pgsql will not allow negative IDs at all. Use "osmium renumber"
    to get rid of the negative IDs.
  • Input files that are not ordered generate a warning. Future versions of
    osm2pgsql will not work any more with unordered files. If you have unordered
    files use "osmium sort" to order them.

Further changes:

  • The multi output now looks for lua script relative to the style.json file.
    This is a breaking change. Users might have to change the file names of
    their lua scripts in the style files.
  • Use the fmt library for formatting strings now instead of a mixture of
    boost::format and hand-written mechanisms. A version of fmt is included
    in the contrib directory.
  • Make PROJ library optional. If the proj library cannot be found by cmake,
    do not offer the option to use arbitrary projections. Only WGS84 and
    WebMercator are supported then.
  • Don't use ST_GeoHash for ordering tables by geometry on Postgis >= 2.4.
    Instead use the default ordering which works better now.
  • Fix: Always print correct relations count and more correct count per seconds
    when showing processing stats.
  • Fix: If a function run in the thread pool throws an exception, this exception
    was never "collected", it was silently ignored. This meant that some errors,
    especially in communication with the database, were not detected correctly.
  • The dependency management, the part of the code which tracks which changes
    in the OSM data trigger which changes in the outputs, was reorganized
    making in much cleaner and removing the last remnants of code written to
    support "old style" multipolygons.
  • Tests have been moved to the Catch framework, extended and the regression
    tests have been reorganised, so they can run independently of each other.
  • A lot of code was cleaned up, modernized, made more robust, and sometimes
    removed.

Release 1.2.2

28 Jun 21:10
Compare
Choose a tag to compare

This release only updates the bundled version of libosmium. The new version 2.15.6 fixes an issue where complicated multipolygons make osm2pgsql hang.