6533f4a2123077c55d3a0c8bc04bb5e71c8b36de,label_maker/utils.py,,is_tif,#,89
Before Change
def is_tif(imagery):
Determine if an imagery path has a valid tif extension
return op.splitext(imagery)[1].lower() in [".tif", ".tiff", ".vrt"]
After Change
def is_tif(imagery):
Determine if an imagery path leads to a valid tif
try:
with rasterio.open(imagery) as test_ds:
if test_ds.meta["driver"] != "GTiff":
// rasterio can open path, but it is not a tif
is_tif = False
else:
is_tif = True
except rasterio._err.CPLE_HttpResponseError:
// rasterio cannot opent path. this is the case for a
// tile service
is_tif = False
return is_tif
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: developmentseed/label-maker
Commit Name: 6533f4a2123077c55d3a0c8bc04bb5e71c8b36de
Time: 2018-05-08
Author: jreiberkyle@users.noreply.github.com
File Name: label_maker/utils.py
Class Name:
Method Name: is_tif
Project Name: matthewwithanm/django-imagekit
Commit Name: 14bac58373d87ab4d90879b1654b62bf89603bc4
Time: 2011-11-02
Author: matthew@exanimo.com
File Name: imagekit/models.py
Class Name:
Method Name: _get_suggested_extension
Project Name: Kaggle/docker-python
Commit Name: beefeb9877afbe03023b9729398d0bf80f61211a
Time: 2019-07-03
Author: ifigotin@google.com
File Name: patches/kaggle_gcp.py
Class Name:
Method Name: get_integrations