utils

Helper functions.

Specify resource homepages

geofabrik_homepage()

Specify the homepage URL of the free Geofabrik data extracts.

bbbike_homepage()

Specify the homepage URL of the free BBBike data extracts.

Specify directory/file paths

cd_dat(*sub_dir[, dat_dir, mkdir])

Change directory to dat_dir and its sub-directories within a package.

cd_dat_geofabrik(*sub_dir[, mkdir])

Change directory to dat_Geofabrik and its sub-directories within a package.

cd_dat_bbbike(*sub_dir[, mkdir])

Change directory to dat_BBBike and its sub-directories.

Specify geometric object types/names

get_pbf_layer_feat_types_dict()

A dictionary for PBF layers and the corresponding geometry types.

get_osm_geom_object_dict()

A dictionary for OSM geometry types.

get_valid_shp_layer_names()

Get valid layer names of OSM shapefiles.

Miscellaneous

validate_shp_layer_names(layer_names)

Validate the input of layer name(s) for reading shape files.

find_shp_layer_name(shp_filename)

Find the layer name of OSM shapefile given its filename.

append_fclass_to_filename(shp_filename, …)

Append a 'fclass' name to the original filename of shapefile.

remove_subregion_osm_file(path_to_osm_file)

Remove a downloaded OSM data file.

get_number_of_chunks(path_to_file[, …])

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

convert_dtype_dict()

Specify data-type dictionary for data types of PostgreSQL and pandas.read_csv().