Skip to content

Release 2.0.0

Latest
Compare
Choose a tag to compare
@lonvia lonvia released this 19 Sep 14:33
· 9 commits to master since this release

The day has finally arrived where we are releasing version 2.0.0. of osm2pgsql, five years after the release of 1.0.0.

This release marks a milestone in modernizing osm2pgsql. We removed a lot of accumulated cruft from more than a decade of development. This makes osm2pgsql easier to understand for users and for developers. And it has allowed us to solve some long-standing issues and will allow further improvements in the future.

Major breaking changes:

  • The legacy format for the middle tables has been removed as well as the old non-bucket way node index.
  • The gazetteer output (used by Nominatim) has been removed.
  • Several command line options have been removed and others are checked more strictly.
  • There are some new library requirements and Lua is not optional any more.
  • The add_row() function in the flex Lua config has been removed, use insert() instead.
  • Check that Lua functions on OSM object are called correctly using the colon-syntax.
  • Handling of untagged objects and object attributes has changed.

Please see the Upgrading appendix for the details of these changes. We suggest you update to version 1.11.0 first and resolve any issues you see there before upgrading to version 2.0.0.

This is the first release that deprecates the "pgsql" output, please start moving towards the "flex" output instead. See this FAQ entry for the details.

New features in the flex output:

  • Two-stage processing now also supports node members of relations, not only way members
  • Optionally build id index as unique index
  • Allow setting the names of indexes in the database
  • New after_nodes|ways|relations() processing functions in flex Lua config files
  • Make osm2pgsql properties available in Lua in osm2pgsql.properties table
  • Add get_bbox() function to geometries in Lua
  • Allow empty config file in flex output, useful for some corner uses

Changes in the generalization code:

  • Add tile-based generalizer calling SQL commands
  • Fix: Do not run ANALYZE in append mode, autovacuum will do that for us
  • Fix: Handle errors in threads correctly stopping the program with an error message

Other fixes and features:

  • Make --flat-nodes also work in non-slim mode, useful if memory is tight
  • Fix off-by-one error in expire code generating out of bounds tiles
  • Property changes are stored later to database to avoid changing the database if anything breaks
  • Report (up to 100) missing nodes in the input file (in debug log)
  • Simplified code for area assembly from multipolygon relations
  • Replication: guess state from file when state info is not available
  • Flush and close COPYs after nodes, ways, and relations in flex output avoid COPYs that are open for a long time
  • Remove special case for old PostGIS versions when clustering
  • Avoid looking for parents of new nodes and ways in the database middle speeding up changes
  • As always: Lots of code cleanups, refactorings and small fixes