GeofabrikReader

class pydriosm.reader.GeofabrikReader(max_tmpfile_size=5000, data_dir=None)

Read Geofabrik data extracts.

Parameters
  • max_tmpfile_size (int or None) – defaults to 5000, see also gdal_configurations()

  • data_dir (str or None) – (a path or a name of) a directory where a data file is; if None (default), a folder osm_geofabrik under the current working directory

Variables

Example:

>>> from pydriosm.reader import GeofabrikReader

>>> geofabrik_reader = GeofabrikReader()

>>> print(geofabrik_reader.Name)
Geofabrik OpenStreetMap data extracts

Methods

get_osm_pbf_layer_names(subregion_name[, …])

Get indices and names of all layers in the PBF data file of a given (sub)region.

get_path_to_osm_file(subregion_name, …[, …])

Get the local path to an OSM data file of a geographic region.

get_path_to_osm_shp(subregion_name[, …])

Get path(s) to .shp file(s) for a geographic region (by searching a local data directory).

merge_subregion_layer_shp(subregion_names, …)

Merge shapefiles for a specific layer of two or multiple geographic regions.

read_osm_pbf(subregion_name[, data_dir, …])

Read a PBF (.osm.pbf) data file of a geographic region.

read_shp_zip(subregion_name[, layer_names, …])

Read a .shp.zip data file of a geographic region.

Attributes

DataDir