1) Adds a new hidden function _check_compressed to see if the provided path is pointing to a compressed file. This function is used within read_vector_files and also in _get_paths.
2) Added a check to see that if a compressed file is provided, that a vsi_prefix has also been provided.
3) _get_paths has been modified to deal with compressed file inputs, avoiding an error even though they are not directories. The parent directory and suffix are extracted and used accoridngly to format the path(s).
This may not be the best implementation, but I hope it is a small improvement in working with compressed files. Feedback/suggestions for modifications welcome!
Future work could include automatically matching vsi_prefixes depending on suffix type, although you may want the user to remain in control of this.
Attempts to fix #22.
1) Adds a new hidden function
_check_compressed
to see if the provided path is pointing to a compressed file. This function is used withinread_vector_files
and also in_get_paths
.2) Added a check to see that if a compressed file is provided, that a vsi_prefix has also been provided.
3)
_get_paths
has been modified to deal with compressed file inputs, avoiding an error even though they are not directories. The parent directory and suffix are extracted and used accoridngly to format the path(s).This may not be the best implementation, but I hope it is a small improvement in working with compressed files. Feedback/suggestions for modifications welcome!
Future work could include automatically matching vsi_prefixes depending on suffix type, although you may want the user to remain in control of this.