Release 1.8.0
The largest change is the addition of much more flexible index support in the flex output. The table definitions have a new (optional) field called indexes
now which takes a list of index definitions. If the field is not there, we fall back to what we did before and create a GIST index on the only/first geometry column of a table. But you can also define any kind of index you want: define which index method (BTREE, GIST, ...) to use on which columns, define WHERE
clauses and expression indexes and much more. See the flex-config/indexes.lua
Lua config for some usage examples and the manual for all the details. You can also force osm2pgsql to always build the id indexes which are normally only built in slim mode.
The gazetteer output and the command line option --with-forward-dependencies
are deprecated in this release and will be removed soon. They were only needed for Nominatim which switched to using the flex output recently.
Here are the other changes:
- Fix a problem when using osm2pgsql with a projection other than WGS84 (EPSG:4326) or Web Mercator (EPSG:3857) which made the program really slow.
- New
pole_of_inaccessibility()
Lua function to generate reasonably good label points from polygons. (This function is currently marked as experimental, which means it can change without notice at any time.) - Performance improvement for very small updates. Don't spin up multiple threads when there are less then 100 objects to process, because the extra overhead is not worth it.
- Implement and use our own JSON writer. This removes the dependency on RapidJSON which hasn't seen a new release since 2016.
- Add more checks (or does some checks earlier) to make sure your database uses UTF-8 encoding and that necessary database extensions are loaded and index methods, schemas and tablespaces you refer to in the config are actually available.
- A lot of code needed to be updated so it works correctly with any of the recent versions of the fmt library.
As always there were lots of code cleanups across the board, but especially in code accessing the database and in the C++/Lua glue code to make it more flexible and easier to use internally.