[Git][debian-gis-team/osmium-tool][buster-backports] 6 commits: New upstream version 1.13.1

Bas Couwenberg gitlab at salsa.debian.org
Sun Feb 7 05:25:18 GMT 2021



Bas Couwenberg pushed to branch buster-backports at Debian GIS Project / osmium-tool


Commits:
f3871a4e by Bas Couwenberg at 2021-02-01T15:16:04+01:00
New upstream version 1.13.1
- - - - -
801f3806 by Bas Couwenberg at 2021-02-01T15:16:07+01:00
Update upstream source from tag 'upstream/1.13.1'

Update to upstream version '1.13.1'
with Debian dir 67daeffb19fc9ef2198acb34bb204c368d482f54
- - - - -
6e64f6b5 by Bas Couwenberg at 2021-02-01T15:16:19+01:00
New upstream release.

- - - - -
ab7755a3 by Bas Couwenberg at 2021-02-01T15:17:36+01:00
Set distribution to unstable.

- - - - -
c93adad3 by Bas Couwenberg at 2021-02-07T05:57:41+01:00
Merge tag 'debian/1.13.1-1' into buster-backports

releasing package osmium-tool version 1.13.1-1

- - - - -
8aeaf26f by Bas Couwenberg at 2021-02-07T05:57:48+01:00
Rebuild for buster-backports.

- - - - -


12 changed files:

- CHANGELOG.md
- CMakeLists.txt
- debian/changelog
- man/osmium-cat.md
- man/osmium-file-formats.md
- man/osmium-sort.md
- src/command_extract.cpp
- src/command_tags_filter.cpp
- src/command_tags_filter.hpp
- src/extract/strategy_complete_ways_with_history.cpp
- test/include/catch.hpp
- test/io/Makefile.in


Changes:

=====================================
CHANGELOG.md
=====================================
@@ -13,6 +13,21 @@ This project adheres to [Semantic Versioning](https://semver.org/).
 ### Fixed
 
 
+## [1.13.1] - 2021-02-01
+
+### Changed
+
+- Update `osmium-file-formats` man page to include newer file format options.
+
+### Fixed
+
+- The `extract` command did not work correctly on history files. Sometimes
+  deleted objects were not detected as such and the resulting file was not
+  a correct history file.
+- Open input file only once in `tags-filter` command if `-R`,
+  `--omit-referenced` is used. This way it works when reading from STDIN.
+
+
 ## [1.13.0] - 2021-01-08
 
 ### Added
@@ -593,7 +608,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
 - Minor updates to documentation and build system
 
 
-[unreleased]: https://github.com/osmcode/osmium-tool/compare/v1.13.0...HEAD
+[unreleased]: https://github.com/osmcode/osmium-tool/compare/v1.13.1...HEAD
+[1.13.1]: https://github.com/osmcode/osmium-tool/compare/v1.13.0...v1.13.1
 [1.13.0]: https://github.com/osmcode/osmium-tool/compare/v1.12.1...v1.13.0
 [1.12.1]: https://github.com/osmcode/osmium-tool/compare/v1.12.0...v1.12.1
 [1.12.0]: https://github.com/osmcode/osmium-tool/compare/v1.11.1...v1.12.0


=====================================
CMakeLists.txt
=====================================
@@ -26,7 +26,7 @@ project(osmium)
 
 set(OSMIUM_VERSION_MAJOR 1)
 set(OSMIUM_VERSION_MINOR 13)
-set(OSMIUM_VERSION_PATCH 0)
+set(OSMIUM_VERSION_PATCH 1)
 
 set(OSMIUM_VERSION ${OSMIUM_VERSION_MAJOR}.${OSMIUM_VERSION_MINOR}.${OSMIUM_VERSION_PATCH})
 


=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+osmium-tool (1.13.1-1~bpo10+1) buster-backports; urgency=medium
+
+  * Rebuild for buster-backports.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Sun, 07 Feb 2021 05:57:45 +0100
+
+osmium-tool (1.13.1-1) unstable; urgency=medium
+
+  * New upstream release.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Mon, 01 Feb 2021 15:17:26 +0100
+
 osmium-tool (1.13.0-1~bpo10+1) buster-backports; urgency=medium
 
   * Rebuild for buster-backports.


=====================================
man/osmium-cat.md
=====================================
@@ -21,6 +21,8 @@ This commands reads its input file(s) only once and writes its output file
 in one go so it can be streamed, ie. it can read from STDIN and write to
 STDOUT.
 
+Usually this is not the right command to merge two or more typical OSM files,
+see **osmium merge** for that.
 
 # OPTIONS
 
@@ -81,6 +83,6 @@ Remove changeset, uid, and user from a file to protect personal data:
 
 # SEE ALSO
 
-* **osmium**(1), **osmium-file-formats**(5)
+* **osmium**(1), **osmium-file-formats**(5), **osmium-merge**(1)
 * [Osmium website](https://osmcode.org/osmium-tool/)
 


=====================================
man/osmium-file-formats.md
=====================================
@@ -8,9 +8,9 @@ osmium-file-formats - OSM file formats known to Osmium
 OSM uses three types of files for its main data:
 
 **Data files**
-:   These are the most common files containing the OSM data at a specific point
-    in time. This can either be a planet file containing *all* OSM data or some
-    kind of extract. At most one version of every object (node, way, or
+:   These are the most common files. They contain the OSM data from a specific
+    point in time. This can either be a planet file containing *all* OSM data
+    or some kind of extract. At most one version of every object (node, way, or
     relation) is contained in this file. Deleted objects are *not* in this
     file. The usual suffix used is `.osm`.
 
@@ -26,8 +26,8 @@ OSM uses three types of files for its main data:
 **Change files**
 :   Sometimes called *diff files* or *replication diffs* these files
     contain the changes between one state of the OSM database and another
-    state. Change files can contains several versions of an object.
-    The usual suffix used is `.osc`.
+    state. Change files can contains several versions of an object and also
+    deleted objects. The usual suffix used is `.osc`.
 
 All these files have in common that they contain OSM objects (nodes, ways, and
 relations). History files and change files can contain several versions of the
@@ -78,13 +78,31 @@ The following options can be added when writing OSM files:
 `pbf_dense_nodes`=`true`/`false` (*default: true*)
 :   Enable/disable DenseNodes format for PBF files.
 
-`pbf_compression`=`true`/`false` (*default: true*)
-:   Enable/disable compression in PBF files. Disabling this will make writing
-    files a bit faster, but the resulting files are 2 to 3 times bigger.
+`pbf_compression`=`none`/`zlib`/`lz4` (*default: zlib*)
+:   Set compression type in PBF files. `zlib` (or `true`) is the default and
+    almost all files use this. `none` (or `false`) disables compression which
+    will make writing files a bit faster, but the resulting files are 2 to 3
+    times bigger. The `lz4` compression is not quite as good as `zlib` but much
+    faster to compress and decompress, it is currently not supported by most
+    OSM file readers.
 
-`add_metadata`=`true`/`false` (*default: true*)
+`pbf_compression_level`=...
+:   Set compression level for PBF. Available values and default depend on the
+    compression type used, see the OSM File Formats Manual for details.
+
+`add_metadata`=`true`/`false`/... (*default: true*)
 :   Enable/disable writing of object metadata such as changeset id, username,
-    etc. Disabling this will make files a bit smaller.
+    etc. Disabling this will make files a bit smaller. This can also be set
+    to other values, see the OSM File Formats Manual for details.
+
+`locations_on_ways`=`true`/`false` (*default: false*)
+:   Add node locations to way nodes. (PBF, XML, OPL only.)
+
+`use_color`=`true`/`false` (*default: false*)
+:   Output with ANSI colors. (DEBUG format only.)
+
+`add_crc32`=`true`/`false` (*default: false*)
+:   Add CRC32 checksum to all objects. (DEBUG format only.)
 
 
 # EXAMPLES


=====================================
man/osmium-sort.md
=====================================
@@ -40,7 +40,7 @@ STDOUT. (Unless the *multipass* strategy is used.)
     the input files in three passes, one for nodes, one for ways, and one for
     relations. After reading all objects of each type, they are sorted and
     written out. This is a bit slower than the "simple" strategy, but uses
-    less memory. The "multi" strategy doesn't work when reading from STDIN.
+    less memory. The "multipass" strategy doesn't work when reading from STDIN.
     Default: "simple".
 
 


=====================================
src/command_extract.cpp
=====================================
@@ -480,7 +480,7 @@ bool CommandExtract::setup(const std::vector<std::string>& arguments) {
             warning("Ignoring --output-format/-f option.\n");
         }
         m_config_file_name = vm["config"].as<std::string>();
-        auto slash = m_config_file_name.find_last_of('/');
+        const auto slash = m_config_file_name.find_last_of('/');
         if (slash != std::string::npos) {
             m_config_directory = m_config_file_name;
             m_config_directory.resize(slash + 1);
@@ -492,6 +492,9 @@ bool CommandExtract::setup(const std::vector<std::string>& arguments) {
             warning("Ignoring --directory/-d option.\n");
         }
         check_output_file();
+        if (m_with_history) {
+            m_output_file.set_has_multiple_object_versions(true);
+        }
         m_extracts.emplace_back(new ExtractBBox{m_output_file, "", parse_bbox(vm["bbox"].as<std::string>(), "--box/-b")});
     }
 
@@ -500,6 +503,9 @@ bool CommandExtract::setup(const std::vector<std::string>& arguments) {
             warning("Ignoring --directory/-d option.\n");
         }
         check_output_file();
+        if (m_with_history) {
+            m_output_file.set_has_multiple_object_versions(true);
+        }
         m_extracts.emplace_back(new ExtractPolygon{m_output_file, "", m_buffer, parse_multipolygon_object("./", vm["polygon"].as<std::string>(), "", m_buffer)});
     }
 


=====================================
src/command_tags_filter.cpp
=====================================
@@ -335,24 +335,7 @@ void CommandTagsFilter::find_referenced_objects() {
     m_vout << "Done following references.\n";
 }
 
-bool CommandTagsFilter::run() {
-    m_vout << "Opening input file to get header...\n";
-    osmium::io::Reader reader_only_for_header{m_input_file, osmium::osm_entity_bits::nothing};
-
-    m_vout << "Opening output file...\n";
-    osmium::io::Header header{reader_only_for_header.header()};
-    setup_header(header);
-    reader_only_for_header.close();
-
-    osmium::io::Writer writer{m_output_file, header, m_output_overwrite, m_fsync};
-
-    if (m_add_referenced_objects) {
-        find_referenced_objects();
-    }
-
-    m_vout << "Opening input file...\n";
-    osmium::io::Reader reader{m_input_file, get_needed_types()};
-
+void CommandTagsFilter::copy_matching_objects(osmium::io::Reader& reader, osmium::io::Writer& writer) {
     m_vout << "Copying matching objects to output file...\n";
     ++m_count_passes;
     osmium::ProgressBar progress_bar{reader.file_size(), display_progress()};
@@ -378,10 +361,42 @@ bool CommandTagsFilter::run() {
 
     m_vout << "Closing input file...\n";
     reader.close();
+}
+
+bool CommandTagsFilter::run() {
+    if (m_add_referenced_objects) {
+        m_vout << "Opening input file to get header...\n";
+        osmium::io::Reader reader_only_for_header{m_input_file, osmium::osm_entity_bits::nothing};
+
+        m_vout << "Opening output file...\n";
+        osmium::io::Header header{reader_only_for_header.header()};
+        setup_header(header);
+        reader_only_for_header.close();
+
+        osmium::io::Writer writer{m_output_file, header, m_output_overwrite, m_fsync};
+
+        find_referenced_objects();
+
+        m_vout << "Opening input file...\n";
+        osmium::io::Reader reader{m_input_file, get_needed_types()};
+
+        copy_matching_objects(reader, writer);
+    } else {
+        m_vout << "Opening input file...\n";
+        osmium::io::Reader reader{m_input_file, get_needed_types()};
+
+        m_vout << "Opening output file...\n";
+        osmium::io::Header header{reader.header()};
+        setup_header(header);
+
+        osmium::io::Writer writer{m_output_file, header, m_output_overwrite, m_fsync};
+
+        copy_matching_objects(reader, writer);
+    }
 
     show_memory_used();
 
-    m_vout << "Needed " << m_count_passes << " passes through the input file.\n";
+    m_vout << "Needed " << m_count_passes << " pass(es) through the input file.\n";
     m_vout << "Done.\n";
 
     return true;


=====================================
src/command_tags_filter.hpp
=====================================
@@ -29,6 +29,8 @@ along with this program.  If not, see <https://www.gnu.org/licenses/>.
 #include <osmium/index/id_set.hpp>
 #include <osmium/index/nwr_array.hpp>
 #include <osmium/index/relations_map.hpp>
+#include <osmium/io/reader.hpp>
+#include <osmium/io/writer.hpp>
 #include <osmium/osm/entity_bits.hpp>
 #include <osmium/osm/item_type.hpp>
 #include <osmium/osm/types.hpp>
@@ -71,6 +73,8 @@ class CommandTagsFilter : public Command, public with_single_osm_input, public w
     void parse_and_add_expression(const std::string& expression);
     void read_expressions_file(const std::string& file_name);
 
+    void copy_matching_objects(osmium::io::Reader& reader, osmium::io::Writer& writer);
+
 public:
 
     explicit CommandTagsFilter(const CommandFactory& command_factory) :


=====================================
src/extract/strategy_complete_ways_with_history.cpp
=====================================
@@ -161,13 +161,13 @@ namespace strategy_complete_ways_with_history {
             throw osmium::io_error{"Can not read from STDIN when using 'complete_ways' strategy."};
         }
 
-        vout << "Running 'complete_ways' strategy in two passes...\n";
+        vout << "Running 'complete_ways' strategy on history file in two passes...\n";
         const std::size_t file_size = osmium::file_size(input_file.filename());
         osmium::ProgressBar progress_bar{file_size * 2, display_progress};
 
         vout << "First pass (of two)...\n";
         Pass1 pass1{*this};
-        pass1.run(progress_bar, input_file, osmium::io::read_meta::no);
+        pass1.run(progress_bar, input_file);
         progress_bar.file_done(file_size);
         pass1.add_extra_nodes();
 


=====================================
test/include/catch.hpp
=====================================
@@ -2129,6 +2129,9 @@ namespace Catch{
         #define CATCH_TRAP() \
                 __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \
                 : : : "memory","r0","r3","r4" ) /* NOLINT */
+    #elif defined(__aarch64__)
+        // Based on https://github.com/catchorg/Catch2/commit/a25c1a24af8bffd35727a888a307ff0280cf9387
+        #define CATCH_TRAP() __asm__(".inst 0xd4200000")
     #else
         #define CATCH_TRAP() __asm__("int $3\n" : : /* NOLINT */ )
     #endif


=====================================
test/io/Makefile.in
=====================================
@@ -224,10 +224,10 @@ $(DIR)/osmium.osm.bz2: $(INPUT) $(DIR) $(OSMIUM)
 	$(OSMIUM_CMD) $< -o $@
 
 $(DIR)/osmium-DCbMg.osm.pbf: $(INPUT) $(DIR) $(OSMIUM)
-	$(OSMIUM_CMD) $< -o $@ -f pbf,pbf_dense_nodes=true,pbf_compression=gzip,add_metadata=true
+	$(OSMIUM_CMD) $< -o $@ -f pbf,pbf_dense_nodes=true,pbf_compression=zlib,add_metadata=true
 
 $(DIR)/osmium-dCbMg.osm.pbf: $(INPUT) $(DIR) $(OSMIUM)
-	$(OSMIUM_CMD) $< -o $@ -f pbf,pbf_dense_nodes=false,pbf_compression=gzip,add_metadata=true
+	$(OSMIUM_CMD) $< -o $@ -f pbf,pbf_dense_nodes=false,pbf_compression=zlib,add_metadata=true
 
 $(DIR)/osmium-DcbMg.osm.pbf: $(INPUT) $(DIR) $(OSMIUM)
 	$(OSMIUM_CMD) $< -o $@ -f pbf,pbf_dense_nodes=true,pbf_compression=none,add_metadata=true
@@ -236,7 +236,7 @@ $(DIR)/osmium-dcbMg.osm.pbf: $(INPUT) $(DIR) $(OSMIUM)
 	$(OSMIUM_CMD) $< -o $@ -f pbf,pbf_dense_nodes=false,pbf_compression=none,add_metadata=true
 
 $(DIR)/osmium-DCbmg.osm.pbf: $(INPUT) $(DIR) $(OSMIUM)
-	$(OSMIUM_CMD) $< -o $@ -f pbf,pbf_dense_nodes=true,pbf_compression=gzip,add_metadata=false
+	$(OSMIUM_CMD) $< -o $@ -f pbf,pbf_dense_nodes=true,pbf_compression=zlib,add_metadata=false
 
 # osmium from osmosis output
 



View it on GitLab: https://salsa.debian.org/debian-gis-team/osmium-tool/-/compare/47f20c3276507369aebe21abcea488bcf7588062...8aeaf26fc08f2e658870fd1598312790c4be00c7

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/osmium-tool/-/compare/47f20c3276507369aebe21abcea488bcf7588062...8aeaf26fc08f2e658870fd1598312790c4be00c7
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20210207/d17d9ff6/attachment-0001.html>


More information about the Pkg-grass-devel mailing list