Skip to content

Tags: githubypf/osm2pgsql

Tags

1.5.1

Toggle 1.5.1's commit message
Release 1.5.1

This is a bugfix release. It contains some important bug fixes,
so averybody 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.

1.5.0

Toggle 1.5.0's commit message
Release 1.5.0

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](https://osm2pgsql.org/doc/manual.html#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](https://osm2pgsql.org/doc/manual.html#advanced-table-definition) 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](https://rapidjson.org) library is now used and included
  in the source.
* Now needs [libosmium](https://osmcode.org/libosmium/) 2.17.0 which is
  included in the source.
* Lots of internal cleanups and restructurings.

1.4.2

Toggle 1.4.2's commit message
prepare release 1.4.2

1.4.1

Toggle 1.4.1's commit message
Release 1.4.1

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 (osm2pgsql-dev#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, osm2pgsql-dev#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).

1.4.0

Toggle 1.4.0's commit message
Release 1.4.0

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 is disabled when the output is redirected to a file (but there
is an option to re-enable it). 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 memory 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.

1.3.0

Toggle 1.3.0's commit message
Release 1.3.0

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 pgsql 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.

1.2.2

Toggle 1.2.2's commit message
Release 1.2.2

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

1.2.1

Toggle 1.2.1's commit message
Release 1.2.1

This release only updates the bundled version of libosmium.
The new version 2.15.4 fixes an issue with area building where
complex relations would use many GB of memory.

1.2.0

Toggle 1.2.0's commit message
Release 1.2.0

This is a bug fix release.

Changes include

- limit number of buffers queued for COPYing to PostgreSQL
  to avoid out-of-memory issues when importing data in slim
  mode without the flatnode option
- reduce default number of threads to 4 to avoid running
  out of PostgreSQL connections
- fix import failures when importing large values into
  int4 columns

1.0.0

Toggle 1.0.0's commit message
Release 1.0.0

This release finally drops support for old-style multipolygons.

Doing so allowed a major overhaul of the processing pipeline.
Imports are now entirely done in the first processing stage. The second,
much slower processing stage is only needed when updating existing
databases. Data is entirely streamed into the database using COPY, which
reduces the number of database connections needed.

Other major changes include

- better error handling in Lua backend
- process all OSM objects again when extra attributes are requested
- enable running tests in pg_virtualenv
- add support for configurable Gazetteer style
- allow to disable RAM node cache with -C 0