GeofabrikDownloader.validate_file_format
- GeofabrikDownloader.validate_file_format(osm_file_format, **kwargs)
Validate an input file format of OSM data.
The validation is done by matching the input to a filename extension available on Geofabrik free download server.
- Parameters
osm_file_format (str) – file format/extension of the OSM data on the free download server
kwargs – [optional] parameters of pyhelpers.text.find_similar_str()
- Returns
formal file format
- Return type
str
Examples:
>>> from pydriosm.downloader import GeofabrikDownloader >>> gfd = GeofabrikDownloader() >>> input_file_format = ".pbf" >>> valid_file_format = gfd.validate_file_format(osm_file_format=input_file_format) >>> valid_file_format '.osm.pbf' >>> input_file_format = "shp" >>> valid_file_format = gfd.validate_file_format(osm_file_format=input_file_format) >>> valid_file_format '.shp.zip'