42 Commits

Author SHA1 Message Date
Sean C. Gillies
75e5ae29b6 Do the right thing for sources with .msk and no nodata
The right thing being to add an alpha band to the VRT.
2018-06-03 22:47:46 -07:00
Andrew Catellier
2b9eb086ae add tests for dataset rotation 2018-02-15 16:40:14 -07:00
Brendan Ward
870cdd62f7 Add tests for __geo_interface__ for bounds and raster_geometry_mask 2018-02-05 05:35:53 -08:00
Sean Gillies
cb620c5678
Merge pull request #1207 from mapbox/epsilon_naught
Refactor Window.from_slices
2017-12-19 00:27:42 -07:00
Brendan Ward
bd565709ed Bumped required GDAL to 1.11, dropped unneeded tests 2017-12-07 05:30:36 -08:00
Brendan Ward
a9559b583b Upgrade required GDAL to >= 1.10 2017-12-05 20:13:13 -08:00
Brendan Ward
bf8d4f3509 More consistent GDAL version handling in tests 2017-11-29 08:59:31 -08:00
Brendan Ward
9f7cc2abe4 starting refactor of window tests 2017-11-14 04:40:02 -08:00
Frédéric Bonifas
d913a39579 change the rasterize option merge_alg_add to merge_alg 2017-11-13 18:00:59 +01:00
Frédéric Bonifas
095f649532 test the merge_alg_add option of rasterize 2017-11-08 14:13:55 +01:00
Kevin Wurster
4145d73015 Generalize the 'path_4band_no_colorinterp' test fixture and add a 'path_3band_no_colorinterp'. 2017-11-01 21:30:53 -04:00
Kevin Wurster
b7d023b5eb Simplify a test. 2017-10-27 00:07:10 -04:00
Kevin Wurster
d79647c375 Fix GDAL version dependent color interpretation test behavior. 2017-10-27 00:04:20 -04:00
Kevin Wurster
c90a79222d Merge master. 2017-10-26 19:36:26 -04:00
Kevin Wurster
8e1af2b4e7 Raise an exception if using '--colorinterp like' and band count differs between template and target. 2017-10-26 19:30:59 -04:00
Brendan Ward
79062b42a1 Prevent segfaults in rasterize (#1176)
* Add better check for GeoJSON inputs to rasterize and associated tests
* Restructured OGRGeomBuilder to avoid segfault
2017-10-19 06:48:45 -07:00
Kevin Wurster
a6ce62cd22 Switch 'src.colorinterp' to a setter/getter. 2017-10-14 03:14:05 -04:00
Kevin Wurster
00dadd9d88 Turns out a file with completely undefined color interpretation is possible. 2017-09-03 00:44:23 -04:00
Kevin Wurster
5e9f0685a7 Allow setting color interpretation to 'undefined'. 2017-09-02 23:40:32 -04:00
Kevin Wurster
0f9605bd2a A function for creating a small image lacking color interpretation. 2017-08-30 23:49:52 -04:00
Kevin Wurster
a6e24b63f0 Add fixture for grabbing the RGBA.byte.tif test file. 2017-08-30 22:54:24 -04:00
Brendan Ward
4cc94aa446 Properly close destination after copy and change default param value 2017-08-02 21:56:03 -07:00
Sean Gillies
39f0646717 Back to np.empty when boundless=False
With a test and some test refactoring.
2017-05-10 17:14:12 +02:00
Ben Lewis
6d60417fb1 update tests concerning local._env 2017-03-15 12:07:23 +11:00
Sean Gillies
24a07e4f63 Removal of is_zip(), variable renaming, improved docstrings 2017-02-02 17:23:03 +01:00
Sean Gillies
3909ae704c MemoryFile() can take a file object parameter
And its open() method can take a path, allowing access to a
raster within a zipfile, such as a VRT.
2017-01-31 23:59:43 +01:00
James Hiebert
c2be0f6b8f Adds a public module for the CRS class 2016-06-03 17:17:44 -07:00
James Hiebert
a7e7cbef63 Replaces crs as a dict with a CRS class
Implements a number of changes:
* Creates a CRS class that simply inherits from UserDict
* Moves CRS related methods (to_string, from_string, is_geographic,
  is_projected, is_valid, and is_epsg_code) to be class methods
* Moves the CRS comparison method to be CRS.__eq__
* Modifies tests that compare CRS output to a raw dict, to compare to
  UserDict.data property
* Replaces all creation of CRS represtation using bare dicts with the
  use class instantiation
2016-06-03 17:15:48 -07:00
Kevin Wurster
a2438c3836 + path_rgb_byte_tif fixture that returns tests/data/RGB.byte.tif 2016-06-02 21:11:40 -04:00
Erik Seglem
a31e3c8c16 Standardize on import numpy as np. 2016-06-01 22:47:33 -04:00
Sean Gillies
541104fadf Make test cleanup less sensitive to skipped tests 2016-04-28 15:26:55 -06:00
Sean Gillies
5fea5210a0 Improved env implementation and tests. 2016-04-28 15:26:55 -06: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
d60d40c3ca Remove references to write_band() but not the actual method. 2016-04-12 20:45:56 -04:00
James McBride
66738062f6 Added some tests of tools.mask.
Similar-ish to the existing masking tests in test_rio_features, but
these target the python function version, and are not as exhaustive.
In adding tests, added a new basic_image_file fixture in conftest.
Also switched to use warnings, though I didn't add any filtering (I ran
into some unintended consequences in my attempted filtering).
2016-02-05 21:56:26 -08:00
Brendan Ward
15772d8d33 Refactor of features tests 2015-11-08 20:25:36 -08:00
Etienne B. Racine
92e86a0114 fix link to tests/README 2015-05-15 08:36:41 -04:00
Sean Gillies
011a16560c Add a shortcut for setting band masks.
Since we can't unset a nodata value, this is the next best thing:

  dataset.write_mask(True)

Sets the dataset's valid data mask uniformly to True (255).

Closes #328.
2015-04-18 21:58:50 -06:00
Sean Gillies
1ab2ec8825 Test for issue #293. 2015-03-19 00:14:10 -06:00
Brendan Ward
3823b075e9 Added rio-rasterize 2015-02-04 22:06:15 -08:00
Sean Gillies
6a3715a7b8 Oops, reduce moved to functools in Py3. 2014-09-02 12:36:47 -06:00
Sean Gillies
a86f9fe579 Final layout tweaks.
Remove test data from sdists. Check for it when running tests and
direct users to download location. No automated download... I don't
expect many users to be running the tests from an sdist.

Closes #133.
2014-09-02 09:57:44 -06:00