get_number_of_chunks

pydriosm.utils.get_number_of_chunks(path_to_file, chunk_size_limit=50)[source]

Compute number of chunks for parsing OSM (mainly PBF) data file in a chunk-wise manner.

Parameters
  • path_to_file (str) – absolute path to a file

  • chunk_size_limit (int) – threshold (in MB) above which the data file is split into chunks, defaults to 50;

Returns

number of chunks

Return type

int or None