6533f4a2123077c55d3a0c8bc04bb5e71c8b36de,label_maker/utils.py,,is_tif,#Any#,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
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
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: keras-team/keras
Commit Name: 4cde148de0c37981c50f3a8e4a59fa4e5f653e17
Time: 2018-02-04
Author: bohumir.zamecnik@gmail.com
File Name: examples/lstm_text_generation.py
Class Name:
Method Name:
Project Name: dmlc/gluon-nlp
Commit Name: f4275c0b80197e0f1bbd3a2a1a31cf07d85013b1
Time: 2019-01-09
Author: leonard@lausen.nl
File Name: scripts/word_embeddings/evaluate_pretrained.py
Class Name:
Method Name: