Feat: Implement logic for processing professional vender's pbf with OSRM
- Increase bits for node id due to definition in internal pbf is 64 bit range - There are some very long tags in internal pbf, increase upper limit for string definition. - Add additional logs to debug pbf with long tags Closes #7.
This commit is contained in:
parent
fa37e1f618
commit
df383d7e56
@ -11,7 +11,7 @@ namespace extractor
|
||||
namespace detail
|
||||
{
|
||||
template <storage::Ownership Ownership>
|
||||
using PackedOSMIDs = util::detail::PackedVector<OSMNodeID, 33, Ownership>;
|
||||
using PackedOSMIDs = util::detail::PackedVector<OSMNodeID, 63, Ownership>;
|
||||
}
|
||||
|
||||
using PackedOSMIDsView = detail::PackedOSMIDs<storage::Ownership::View>;
|
||||
|
||||
@ -105,6 +105,8 @@ namespace osmium {
|
||||
while (pbf_string_table.next(OSMFormat::StringTable::repeated_bytes_s, protozero::pbf_wire_type::length_delimited)) {
|
||||
const auto str_view = pbf_string_table.get_view();
|
||||
if (str_view.size() > osmium::max_osm_string_length) {
|
||||
std::cout<< "### Overlong string error(max-size, overlong-string-size, overlong-string-content)" << str_view.size() << " "
|
||||
<< osmium::max_osm_string_length << " " << str_view.data() << std::endl;
|
||||
throw osmium::pbf_error{"overlong string in string table"};
|
||||
}
|
||||
m_stringtable.emplace_back(str_view.data(), osmium::string_size_type(str_view.size()));
|
||||
|
||||
@ -66,7 +66,7 @@ namespace osmium {
|
||||
using changeset_comment_size_type = uint32_t;
|
||||
|
||||
// maximum of 256 characters of max 4 bytes each (in UTF-8 encoding)
|
||||
constexpr const int max_osm_string_length = 256 * 4;
|
||||
constexpr const int max_osm_string_length = 256 * 128;
|
||||
|
||||
} // namespace osmium
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user