This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import numpy | |
>>> from scipy.ndimage.morphology import grey_dilation | |
>>> a = numpy.zeros((7, 7)) | |
>>> a[3,3] = 1 | |
>>> a | |
array([[ 0., 0., 0., 0., 0., 0., 0.], | |
[ 0., 0., 0., 0., 0., 0., 0.], | |
[ 0., 0., 0., 0., 0., 0., 0.], | |
[ 0., 0., 0., 1., 0., 0., 0.], | |
[ 0., 0., 0., 0., 0., 0., 0.], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rasterio | |
with rasterio.open('input.tif') as src: | |
source = src.read_band(1) | |
def window_transform(transform, offset): | |
result = transform[:] | |
result[3] = transform[3] + offset[0]*transform[5] | |
result[0] = transform[0] + offset[1]*transform[1] | |
return result |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
#GPX GPX Yes Yes Yes (read support needs libexpat) | |
("GPX", "raw"), | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rasterio | |
import numpy as np | |
src = rasterio.open('/Users/sean/code/decloud/envs/1_16/output/0_q.tif') | |
# Fraction of elements with value > 100 at full resolution. | |
q = src.read_band(1) | |
ones = np.ones(q.shape) | |
print "Full, %d pixels" % (q.shape[0]*q.shape[1]) | |
print sum(ones[q>100])/(q.shape[0]*q.shape[1]) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@context": { | |
"@context": { | |
"Polygon": "http://example.com/vocab#Polygon", | |
"Feature": "http://example.com/vocab#Feature", | |
"datetime": "http://www.w3.org/2006/time#inXSDDateTime", | |
"MultiLineString": "http://example.com/vocab#MultiLineString", | |
"id": "http://example.com/vocab#id", | |
"features": { | |
"@id": "http://example.com/vocab#coordinates", |
OlderNewer