diff --git a/.travis.yml b/.travis.yml index e9dbd6fc..8c32b17b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,7 +54,7 @@ before_install: - conda config --add channels conda-forge - conda config --set channel_priority strict # Create conda environment -- conda create -n test python=$PYTHON_VERSION rasterio scipy xarray netcdf4 dask pandoc +- conda create -n test python=$PYTHON_VERSION rasterio xarray scipy pyproj netcdf4 dask pandoc - source $HOME/miniconda/bin/activate test install: diff --git a/docs/examples/reproject.ipynb b/docs/examples/reproject.ipynb index ebe8f31f..cc5c269c 100644 --- a/docs/examples/reproject.ipynb +++ b/docs/examples/reproject.ipynb @@ -32,7 +32,7 @@ "metadata": {}, "outputs": [], "source": [ - "xds = xarray.open_dataset(\"PLANET_SCOPE_3D.nc\")" + "xds = xarray.open_dataset(\"../../test/test_data/input/PLANET_SCOPE_3D.nc\")" ] }, { @@ -42,13 +42,458 @@ "outputs": [ { "data": { + "text/html": [ + "
<xarray.Dataset>\n", + "Dimensions: (time: 2, x: 10, y: 10)\n", + "Coordinates:\n", + " spatial_ref int64 0\n", + " * x (x) float64 4.663e+05 4.663e+05 ... 4.663e+05 4.663e+05\n", + " * time (time) datetime64[ns] 2016-12-19T10:27:29.687763 2016-12-29T...\n", + " * y (y) float64 8.085e+06 8.085e+06 ... 8.085e+06 8.085e+06\n", + "Data variables:\n", + " blue (time, y, x) float64 6.611 5.581 0.3996 ... 3.491 5.056 3.368\n", + " green (time, y, x) float64 7.921 66.15 30.1 ... 21.76 27.29 18.41
array(0)
array([466267.5, 466270.5, 466273.5, 466276.5, 466279.5, 466282.5, 466285.5,\n", + " 466288.5, 466291.5, 466294.5])
array(['2016-12-19T10:27:29.687763000', '2016-12-29T12:52:42.347451000'],\n", + " dtype='datetime64[ns]')
array([8084698.5, 8084695.5, 8084692.5, 8084689.5, 8084686.5, 8084683.5,\n", + " 8084680.5, 8084677.5, 8084674.5, 8084671.5])
array([[[6.611017, 5.580979, 0.399607, 2.052803, 5.479985, 4.760219,\n", + " 5.077927, 5.574792, 0.726683, 5.170288],\n", + " [4.535516, 0.088263, 4.222302, 0.289199, 3.478147, 3.227945,\n", + " 2.736443, 2.821799, 1.04221 , 1.099616],\n", + " [0.071364, 4.393267, 0.496907, 2.311926, 1.19123 , 5.984189,\n", + " 5.266977, 1.146988, 3.219185, 0.982011],\n", + " [5.818552, 5.176065, 4.891903, 4.557147, 4.706706, 4.670835,\n", + " 2.344188, 0.493237, 2.707488, 4.15662 ],\n", + " [0.78458 , 3.838047, 0.803847, 1.588861, 5.002692, 2.565792,\n", + " 5.195116, 2.642173, 1.47148 , 6.854931],\n", + " [4.407593, 6.734126, 3.702884, 4.682068, 0.498895, 2.931409,\n", + " 5.713952, 6.388658, 6.618634, 3.267176],\n", + " [6.175152, 2.331721, 6.829246, 1.650656, 5.530157, 0.167316,\n", + " 6.406627, 4.559968, 0.083601, 1.231478],\n", + " [2.438085, 1.593681, 5.902827, 2.124327, 1.870033, 4.519462,\n", + " 4.845505, 6.214475, 2.237778, 4.178488],\n", + " [5.855639, 5.824333, 6.006212, 5.43411 , 3.393885, 6.183958,\n", + " 1.284061, 0.028555, 6.726706, 1.516993],\n", + " [0.844103, 5.61329 , 6.978045, 1.183779, 2.539376, 1.268038,\n", + " 1.27574 , 5.101129, 2.020225, 2.081746]],\n", + "\n", + " [[6.242907, 6.394763, 1.302492, 2.895077, 0.537664, 5.012127,\n", + " 4.380069, 1.624007, 5.56236 , 4.303491],\n", + " [6.745937, 3.653031, 5.116965, 1.835256, 3.514732, 6.523679,\n", + " 0.17986 , 2.444248, 5.169099, 0.584623],\n", + " [2.119518, 0.479052, 4.274714, 6.019049, 6.346329, 2.858441,\n", + " 3.976887, 4.218218, 4.320734, 3.941107],\n", + " [2.974649, 6.67996 , 3.16875 , 3.507162, 2.909711, 1.359386,\n", + " 4.023015, 0.258809, 2.007625, 5.744746],\n", + " [2.572982, 1.250802, 4.652006, 6.310958, 3.266477, 3.216613,\n", + " 3.47315 , 1.713415, 5.9575 , 2.729016],\n", + " [2.743341, 4.203021, 1.306215, 2.840115, 5.351451, 2.774677,\n", + " 2.621753, 5.288077, 0.722618, 4.086008],\n", + " [3.168672, 4.031863, 5.775087, 3.487762, 6.034522, 4.721887,\n", + " 5.093018, 0.386024, 2.278799, 1.536351],\n", + " [4.548959, 4.797754, 6.371152, 3.69425 , 6.855343, 1.987757,\n", + " 4.749654, 1.750539, 1.804795, 4.966536],\n", + " [1.78139 , 1.544275, 1.750026, 3.373274, 2.604254, 5.894015,\n", + " 3.217723, 5.637478, 2.900347, 2.097813],\n", + " [1.844174, 6.994962, 2.504717, 5.292132, 0.184411, 4.870834,\n", + " 1.888442, 3.491315, 5.055704, 3.368395]]])
array([[[ 7.920639, 66.150832, 30.096116, 30.437197, 57.794734, 11.538647,\n", + " 14.426782, 35.593171, 53.784858, 0.449093],\n", + " [23.804111, 67.910347, 18.694533, 30.41474 , 68.117674, 44.906057,\n", + " 62.311842, 37.485047, 57.134336, 7.52572 ],\n", + " [36.653481, 39.596833, 61.07603 , 56.883093, 29.635613, 64.114699,\n", + " 42.341689, 54.724789, 31.872344, 11.282554],\n", + " [32.502176, 28.090549, 58.398927, 41.224019, 34.804777, 32.184565,\n", + " 59.392327, 9.155824, 52.967172, 67.409236],\n", + " [18.79468 , 8.543429, 35.834698, 3.596245, 30.252802, 41.549499,\n", + " 23.060248, 7.267762, 27.374099, 0.684024],\n", + " [ 9.93227 , 44.509446, 22.01927 , 28.514121, 36.715233, 15.03939 ,\n", + " 2.43399 , 0.636075, 34.43023 , 37.024545],\n", + " [28.874823, 1.514255, 34.210822, 10.49793 , 54.025491, 64.294026,\n", + " 36.212813, 17.766628, 45.295952, 10.349576],\n", + " [58.961924, 47.334638, 64.844646, 37.634131, 7.815025, 35.139303,\n", + " 18.501505, 35.01185 , 27.761908, 13.240655],\n", + " [49.544668, 57.716538, 27.389778, 11.604377, 24.826367, 15.449456,\n", + " 26.482386, 42.855739, 10.4958 , 59.267182],\n", + " [37.094093, 43.294246, 33.240747, 16.85513 , 54.705119, 14.633291,\n", + " 35.138742, 50.101683, 57.495953, 52.795405]],\n", + "\n", + " [[26.137058, 16.448086, 4.503539, 33.351036, 20.32524 , 63.369743,\n", + " 11.531512, 38.629561, 59.821441, 11.547508],\n", + " [ 6.438471, 28.948907, 9.949052, 23.234921, 65.539507, 9.822554,\n", + " 55.754023, 51.590388, 57.047098, 4.929671],\n", + " [32.360472, 17.939979, 52.889505, 69.181176, 39.2923 , 56.442225,\n", + " 5.699603, 21.092554, 8.93472 , 23.810367],\n", + " [ 3.715695, 30.653733, 44.540496, 48.578544, 24.032477, 30.339109,\n", + " 37.376636, 58.787274, 49.308994, 59.510765],\n", + " [37.991912, 50.023013, 63.711135, 26.546118, 60.561058, 36.098302,\n", + " 10.725673, 40.51609 , 47.479255, 42.710909],\n", + " [15.32887 , 15.878984, 30.914778, 25.902812, 3.815428, 35.530366,\n", + " 48.426293, 44.280075, 4.468083, 18.00032 ],\n", + " [58.286993, 20.397714, 63.124 , 69.117495, 1.32436 , 29.024715,\n", + " 31.601531, 34.307982, 7.990292, 36.159696],\n", + " [34.674335, 62.344993, 5.714717, 2.161448, 66.714977, 52.443751,\n", + " 12.791859, 63.707491, 13.697063, 9.394474],\n", + " [16.766346, 26.260123, 40.68158 , 18.695085, 64.812126, 23.151592,\n", + " 50.597642, 61.308205, 31.517123, 23.469797],\n", + " [44.670989, 17.533084, 39.034907, 32.676726, 53.275139, 48.731172,\n", + " 12.958856, 21.760335, 27.292202, 18.409063]]])