3303 Commits

Author SHA1 Message Date
Steven Pestana
48af488f9b
Improve warp.reproject and enums.Resampling docs (#2166)
* Add inline descriptions from gdalwarp

Add short descriptions of each resampling method from gdalwarp.

If this isn't wanted, alternatively it might be a good idea to add a link to gdalwarp's resampling methods https://gdal.org/programs/gdalwarp.html#cmdoption-gdalwarp-r

* Add enums.Resampling reference to warp.resampling

Add enums.Resampling reference to warp.resampling parameters to try and clarify documentation.

* Remove redundant list

Removing the list of resampling methods, redundant if linking directly to enums.Resampling's list

Also add "int" back in for type

* Moving resampling method details to main docstring

* Update formatting to match docstring styleguide

Update formatting to match docstring styleguide https://numpydoc.readthedocs.io/en/latest/format.html#class-docstring

* Try to fix formatting with Notes section

* Update rasterio/enums.py

Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
2021-04-30 10:33:39 -06:00
Tomáš Hrnčiar
b17b2e330e
Require setuptools, rasterio/rio/main.py and tests/test_cli_main.py import pkg_resources (#2168) 2021-04-28 11:21:16 -06:00
Yann-Sebastien Tremblay-Johnston
d7be6a8210
don't check ERR_RAND and ERR_BIAS in test_rpcs (#2158) 2021-04-20 10:07:54 -06:00
Mike Taves
3c630f8a30
Python3 classes does not need to inherit from object (#2150) 2021-04-12 12:47:35 -06:00
Sean Gillies
c7b2dfd1d8 Remove junk from change log 2021-04-07 07:47:06 -06:00
Sean Gillies
471cfb588a Merge branch 'master' of github.com:mapbox/rasterio 2021-04-07 07:46:21 -06:00
Sean Gillies
fb725d8307 Merge branch 'maint-1.2' 2021-04-07 07:46:02 -06:00
Sean Gillies
c9b8144e44 Set date in change log 1.2.2 2021-04-06 20:15:05 -06:00
Sean Gillies
523818cf50 Fix change log 2021-04-06 18:35:59 -06:00
Sean Gillies
3e1765c5b3 Add a --nodata option to rio-clip
Resolves #2084
2021-04-06 18:32:58 -06:00
Sean Gillies
9b0e181264 Hide WarpedVRT boundless keyword arguments
Resolves #2084
2021-04-06 17:28:35 -06:00
Sean Gillies
55bce583d3 Allow src_crs to override the src crs
Resolves #2036
2021-04-06 16:47:32 -06:00
Sean Gillies
5b10c8d154 Raise exception when bounds and transform are not consistent
Resolves #2138
2021-04-06 16:07:57 -06:00
Sean Gillies
0813068912
Fix mask error in min and max merge algorithms (#2145)
* Fix mask error in min and max merge algorithms

Resolves #2135

* Note changes in #2145
2021-04-06 16:06:57 -06:00
Alan D. Snow
fde17af9e1
DEP: use oldest-supported-numpy in pyproject.toml (#2143) 2021-04-02 09:29:05 -06:00
Yann-Sebastien Tremblay-Johnston
8cb216ca83
wrap imports with add_dll_directory if win and python >= 3.8 (#2129)
add newline to EOF

instead of env var, fallback to glob for gdal*.dll in PATH

update changelog

remove backtick

Co-authored-by: Sean Gillies <sean@mapbox.com>
2021-03-31 13:10:22 -06:00
Sean Gillies
3b43de6943 Update version and changes 2021-03-31 13:01:43 -06:00
Sean Gillies
a715da9a07 Backport changes from #2089 2021-03-31 13:01:06 -06:00
Sean Gillies
c4c9c97f13 Pin cython and numpy versions 2021-03-31 13:00:33 -06:00
Sean Gillies
2ee5ad6e07
use set_gdal_config rather than setting GDAL_DATA (#2139) 2021-03-31 12:03:34 -06:00
Alan D. Snow
5b76d05fb3
ENH: Add version to CRS.to_wkt() (#2122)
* ENH: Add version to CRS.to_wkt()

* Update tests/test__crs.py for PROJ 8

Co-authored-by: Even Rouault <even.rouault@spatialys.com>

* Update tests/test__crs.py for PROJ 8

Co-authored-by: Even Rouault <even.rouault@spatialys.com>

* Update tests/test__crs.py for PROJ 8

Co-authored-by: Even Rouault <even.rouault@spatialys.com>

* Update tests/test__crs.py for PROJ 8

Co-authored-by: Even Rouault <even.rouault@spatialys.com>

* morph_to_esri_dialiect docstring update.

Co-authored-by: Sean Gillies <sean.gillies@gmail.com>

* DOC: update CHANGES with blurb about WKT2 support

Co-authored-by: Even Rouault <even.rouault@spatialys.com>
Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
2021-03-17 22:40:46 -06:00
Denis Rykov
eed1194dfb
Don't create AWSSession for presigned URLs (#2133) 2021-03-11 10:26:51 -07:00
Sean Gillies
f3ff6575f4 Merge branch 'maint-1.2' 2021-03-03 08:24:29 -07:00
Sean Gillies
054155a924 Update change log for 1.2.1 1.2.1 2021-03-03 08:22:33 -07:00
Denis Rykov
b962f10be7
Add unsigned Azure requests support (#2120)
* Add unsigned Azure requests support

* Take into account AZURE_STORAGE_ACCOUNT env variable
2021-02-22 11:16:16 -07:00
Sean Gillies
0a52d52b0c Pin cython and numpy versions in pyproject.toml 2021-02-18 12:29:47 -07:00
Alan D. Snow
99511e4069
Use compile_time_env in place of shims (#2016)
* Use compile_time_env in place of shims

* Update setup.py to require cython

* remove sdist_fill

* update MANIFEST

* Remove support for GDAL < 2.3

* Remove rasterfill.cpp
2021-02-18 12:11:25 -07:00
Sean Gillies
1f3eea9881 Note changes in #2115 2021-02-15 08:57:01 -07:00
Sean Gillies
fb55ddc4e5 Document rectilinear requirement for rio-clip
And a test, plus a new clip test module
2021-02-15 08:54:45 -07:00
Denis Rykov
f542eec977
Raise an exception while clipping rotated raster with rio clip (#2115) 2021-02-15 08:35:27 -07:00
Sean Gillies
9f5d6450eb Fix change log 2021-02-15 08:34:15 -07:00
Sean Gillies
3847cc2410
Rewrite of from_bounds and geometry_window (#2116)
* Rewrite of from_bounds and geometry_window

Resolves #2112

* Remove unused parameters from call to geometry_window
2021-02-15 08:31:24 -07:00
Ryan Grout
067a322ed7
Transform.xy performance improvement (#2111)
* Master is 1.3dev

* Lift transform translation out of loop.

Avoids unnecessary recomputations.

* minor code cleanup

* Update rasterio/__init__.py

Co-authored-by: Sean Gillies <sean@mapbox.com>
Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
2021-02-12 12:27:15 -07:00
Martijn Visser
4eaaf5d97e
Add a Resampling.sum method (#2089)
* Add a Resampling.sum method

For weighted sum.
Added in GDAL 3.1 per https://github.com/OSGeo/gdal/pull/2366

I copied the approach used in #2056 to add and test this.

* resampling method sum not supported for read/write

* Resampling.sum fill in expected nonzero
2021-02-12 09:31:13 -07:00
Sean Gillies
30476fd1b2
Cast nodata before filling (#2110)
* Cast nodata before filling

Resolves #2041

* Use ma.asanyarray when required

And silence a new warning
2021-02-10 19:50:49 -07:00
Sean Gillies
af3f032594 Master is 1.3dev 2021-02-10 16:13:54 -07:00
Sean Gillies
1b6ec8f6d9
Plum the new rowcol precision default all the way up thru rio-merge (#2109)
* Plum the new rowcol precision default all the way up thru rio-merge

Follow up to #2106

* Address eps sign more generally

* Update change log

* Revert previous change, which broke with op=float
2021-02-10 15:55:28 -07:00
Ryan Grout
a9f2cd40f9
Check operator before getattr (#2107)
Only check pixel_precision once instead of twice.
2021-02-10 15:34:10 -07:00
Ryan Grout
5aeaa3591b
Use the right dtype when checking nodataval (#2100)
* Use the right dtype when checking nodataval

Use the dtype of the first dataset if dtype is None. If dtype is not
None, then dt == dtype.

* Use np.issubdtype to check dtypes.

* Add test for out of range nodata.

* Only query float dtype when nodataval is not NaN.

* Modify warning phrasing.

At this point the nodataval could either be set by the input files or by
the user. Use a more general phrasing to just convey the fact that the
nodata value is out of range of the dtype.
2021-02-10 15:30:43 -07:00
Ryan Grout
ceb0e45bc1
Use machine epsilon in transform.rowcol (#2106)
* Use machine epsilon.

* Use window rounding methods.

* Update test checksums

* Update test expected value
2021-02-09 18:33:58 -07:00
Ryan Grout
f407e9adaa
Avoid extra array allocations in copyto functions (#2101)
* Use inplace min/max to avoid array allocation.

In microbenchmark tests, the inplace seems to be slightly faster.

* Allocate a single array for a mask and use in-place operations

This is far more efficient that the multiple new arrays allocated by the
original function.

* Fix accidentally renamed function.

* Allow first operation to allocate and return new array

It looks cleaner to me and turns out to be just a little bit faster than
calling empty_like.

* Always use incoming input mask.

* Allocate mask array explicitly again.

* Factor out copy methods. Resolve method once.

* Format error message with list.

* Use much faster nan check

We can use a much faster scalar nan check.
2021-02-08 14:56:28 -07:00
Sean Gillies
8a32ef0146
Explain "can't find proj.db" for rasterio 1.2.0
Resolves #2103
2021-02-04 10:55:03 -07:00
Sean Gillies
9256354a9a
Remove auto bug label 2021-02-04 09:59:55 -07:00
Sean Gillies
48411bc108
Add space after period in creation_options help 2021-02-02 15:30:46 -07:00
Ben
bfe9d4769a
#2097 fixed error string spacing (#2098) 2021-01-28 19:51:58 -07:00
Sean Gillies
fb63ba2834 Update authors
git shortlog -se | perl -ane '$,=" "; {print "@F[1..$#F-1]\n"}'
2021-01-24 18:23:10 -07:00
Sean Gillies
beb964f69d Handle string values for tiled kwarg
Resolves #2085
1.2.0
2021-01-24 14:51:29 -07:00
Sean Gillies
7f7bbec0a2 Allow GDAL to do the right thing w.r.t GCPs and warping
Resolves #2086
2021-01-24 14:23:08 -07:00
Sean Gillies
6dbf74b643 Close error handling environment *after* dataset closes
Resolves #2088
2021-01-24 13:23:39 -07:00
Sean Gillies
7cc5768524 Note fix of #2092
Thanks @vincentsarago!
2021-01-22 16:56:47 -07:00