BBBikeReader¶
- class pydriosm.reader.BBBikeReader(data_dir=None, max_tmpfile_size=None)[source]¶
Read BBBike exports of OpenStreetMap data.
- Parameters:
data_dir (str | None) – (a path or a name of) a directory where a data file is; if
None(default), a folderosm_bbbikeunder the current working directorymax_tmpfile_size (int | None) – defaults to
None, see alsogdal_configurations
- Variables:
downloader (BBBikeDownloader) – instance of the class
BBBikeDownloadername (str) – name of the data resource
url (str) – url of the homepage to the BBBike free download server
Examples:
>>> from pydriosm.reader import BBBikeReader >>> bbr = BBBikeReader() >>> bbr.NAME 'BBBike'
Attributes
Default download directory.
Valid file formats.
Full name of the data source.
Name of the data source.
Name or pathname of a data directory.
Pathnames of all data files.
Methods
cdd(*sub_dir[, mkdir])Change directory to default data directory and its subdirectories or a specific file.
get_file_path(subregion_name, osm_file_format)Get the local path to an OSM data file of a geographic (sub)region.
get_pbf_layer_names(subregion_name[, data_dir])Get indices and names of all layers in the PBF data file of a given (sub)region.
get_shp_pathname(subregion_name[, ...])Get path(s) to shapefile(s) for a geographic (sub)region (by searching a local data directory).
make_shp_pkl_pathname(shp_zip_filename, ...)Make a pathname of a pickle file for saving shapefile data.
read_csv_xz(subregion_name[, data_dir, ...])Read a compressed CSV (.csv.xz) data file of a geographic (sub)region.
read_geojson_xz(subregion_name[, data_dir, ...])Read a .geojson.xz data file of a geographic (sub)region.
read_pbf(subregion_name[, data_dir, ...])Read a PBF (.osm.pbf) data file of a geographic (sub)region.
read_shp(subregion_name[, layer_names, ...])Read a shapefile of a geographic (sub)region.
read_var_osm(meth, subregion_name, ...[, ...])Read data file of various formats (other than PBF and shapefile) for a geographic (sub)region.
remove_extracts(path_to_extract_dir, verbose)Remove data extracts.
Validate the data type of the input variable.
validate_file_path(path_to_file[, ...])Validate the pathname of an OSM data file.
validate_shp_layer_names(layer_names_, ...)Validate the input of layer name(s) for reading shapefiles.