34 Commits

Author SHA1 Message Date
Sean Gillies
d7ea5bfbfe xfail some pixel value senstivie tests when gdal < 2 2017-06-11 17:14:29 +02:00
Sean Gillies
b8b5df23b9 Add deprecation warning for old style range tuples 2017-06-11 16:15:02 +02:00
Sean Gillies
3089c728da New impl for Window class
An offset and length representation of windows avoids unnecessary
additions and subtractions that can lead to loss of precision.

A consequence is that we can no longer assert equality between
instances of Window and range tuples because Window no longer
subclasses tuple.

Rasterio is now ready for floating point windows.
2017-06-10 18:42:49 +02:00
Matthew Perry
8df0d4fd44 pytest warnings 2017-05-23 05:22:10 -06:00
Sean Gillies
bc998464ba Resolves #392 2016-12-02 17:24:47 +01:00
Sean Gillies
9355513d39 Get env from main ctx
Migrate all tests over to invoking main_group with a named command.
2016-07-27 14:51:36 -06:00
Kevin Wurster
ef952def3b Merge master. 2016-06-14 21:09:27 -07:00
Kevin Wurster
a71f3f0f1f Explicitly construct Affine() transforms rather than instantiating from Affine.from_gdal() 2016-06-14 10:44:03 -07:00
Kevin Wurster
92b64f9c8a Raise an exception if 'affine' _and_ 'transform' are passed to rasterio.open(). Issue a warning if 'affine' is used. Raise an exception if 'transform' is not an instance of 'affine.Affine()'. 2016-06-13 16:50:42 -07:00
Amit Kapadia
70ae537355 test that rio merge copies the colormap 2016-06-06 14:08:50 -07:00
Erik Seglem
a31e3c8c16 Standardize on import numpy as np. 2016-06-01 22:47:33 -04:00
Sean Gillies
12f8fc7e3f New, lazier AWS sessions
New Env class and tests.
More logging, tests, safer environment
Remove usage (deprecated) of rasterio.drivers()
Also pep8 cleanups throughout the tests and a fix for unchecked
dtypes when opening a dataset in 'w' mode.
Now we can simply import warnings in __init__.py. In the
deprecations tests, we needed to see a single warning only one
time to avoid multiple drivers() warnings.
Add a global env.
Add rasterio.env.setenv()
2016-04-28 15:26:55 -06:00
Kevin Wurster
b9205b1fcb Remove references to read_band() but not the actual method. 2016-04-12 20:50:50 -04:00
Kevin Wurster
d60d40c3ca Remove references to write_band() but not the actual method. 2016-04-12 20:45:56 -04:00
Matthew Perry
12bd5f5e1f test for int resolution to merge worker 2016-04-07 13:22:39 -04:00
Sean Gillies
2f935021a4 Improved option help
Also caught that I was doubling up on the -f short option. I've
removed it from --force-overwrite, which is only a long option.
2016-01-12 11:36:11 -07:00
Sean Gillies
0a475dd850 Add test of passing bounds to rio-merge 2015-09-24 23:03:14 -06:00
Sean Gillies
30547d45d1 Fix computation of output image size and extents.
The results of rio-merge are much better!

Added a test of merging 4 pieces of the RGB.byte.tif file and
getting a file with the same checksums as the original.
2015-09-24 22:53:00 -06:00
Sean Gillies
cbddbce1e4 Final touches on merging
Adjust destination windows when the ceiling is too high.

More robust nodata value determination.

Lastly, protect against accidentally overwriting input files. The
standard unix mv command is a good model. We might add -i and -n
options in the future.
2015-09-24 15:00:53 -06:00
Sean Gillies
4b4c6027fd Fix painting order! 2015-09-23 17:41:08 -06:00
Sean Gillies
bcd28aba69 Tests added for merge tool
A follow on to #460. Would have insisted on tests in the PR, but
it's not super clear where to start for new developers. Also, the
tool was pretty well exercised by the existing CLI test. The new
tests are a straightforward port of the CLI tests.
2015-09-03 11:15:54 -06:00
Brendan Ward
5dce1d4116 Changed --res to single value option 2015-07-10 22:36:52 -07:00
Sean Gillies
e37d54082f Add -o/--output option to commands.
Plus a function to resolve the standard args and options to a
standard `output, [inputs]` pair.

Closes #333.
2015-05-01 14:31:31 -06:00
Brendan Ward
075918bfe2 Consolidated and documented rio flags 2015-04-22 23:16:11 -07:00
Brendan Ward
a9eb29a176 Added short flags for many rio options, removed unused imports, standardized input argument 2015-04-22 19:28:12 -07:00
Sean Gillies
a807d1bd51 Closes #282.
At the heart of this was a subtle indexing error due to calling
round() instead of math.floor(). Fixing that needed a cascade of
fixes to expectated values in various tests.

Finally, core logic in the merge command was rewritten for
correctness and clarity.
2015-03-11 15:11:52 -06:00
Sean Gillies
0cde25b9cd Merge branch 'master' into issue242
Conflicts:
	rasterio/rio/merge.py
2015-01-13 20:50:28 -07:00
Sean Gillies
f686ccad70 Fix expected value for float test. 2015-01-13 17:36:24 -07:00
Sean Gillies
09582c7b8f Watch out for undefined 'info'.
Also get merge.py coverage back to 100% (nodata and floats).
2015-01-13 17:18:59 -07:00
Sean Gillies
2b4f7284ba Working rio-merge with main features of gdal-merge.py
Closes #242
2015-01-12 15:21:34 -07:00
Sean Gillies
9cd3cc049f 100% test coverage. 2015-01-07 22:48:32 -07:00
Sean Gillies
fbc3347f73 Logic and tests for merge without nodata.
Closes #240
2015-01-07 22:26:38 -07:00
Brendan Ward
c03de30e58 Sort test input files 2014-12-31 07:17:15 -08:00
Brendan Ward
dc4d5106ce Fixed proper handling of verbosity and output shape for rio merge 2014-12-30 23:03:01 -08:00