328 Commits

Author SHA1 Message Date
Vincent Sarago
ba5e90c487
mapbox -> rasterio (#2321) 2021-10-22 09:04:05 -06:00
Yann-Sebastien Tremblay-Johnston
344a34041b
Add Transformer classes (#2225)
* initial

* add TransformDirection enum, fix cython compiler issues

* make RPCTransformWarning more generic

* include GDALGCP* in gdal.pxi

* add GCPTransformer

* typo

* move xy and rowcol to TransformerBase

* change existing transform methods to use new *Transformer classes

* normalize transform direction, update docstrings

* update docstrings

* make subsubheadings of Coordinate Transform subheading

* Add new docs transform topic

* add to index

* update docstrings

* update docstring

* Add rasterio.rpc to docs

* update georeferencing.rst

* update transform.srst

* relax isinstance check for RPCTransformer

* catch invalid transform input to get_transformer

* replace None with identity transform so we test the correct ValueError

* update AffineTransformer

* add tests

* rename method to map singleton coordinate to array-like and validate all coordiantes have same dimensions

* update test

* add more tests

* update docstring of GCPTransformer init

* fix copy+paste error

* relax check on xy transformed values due to floating point precision

* remove unused imports

* fix tests and address comments

Co-authored-by: Sean Gillies <sean@mapbox.com>
2021-10-13 14:19:33 -06:00
Yann-Sebastien Tremblay-Johnston
b92c21f3c0
handle md domain prefixed by "xml" (#2228)
* handle md domain prefixed by "xml"

* add test and add note about xml prefix namespaces
2021-09-30 09:50:52 -06:00
Adam J. Stewart
adef906d01
Various fixes to documentation (#2256)
* Various fixes to documentation

* Remove in-line shell prompts

* Fix rasterize shapes type

* Convert todo's to comments

* Revert back to todo directive
2021-08-18 10:30:55 -06:00
Idan Miara
14834341f2
docs/topics/switch.rst - update the section abound bands (#2201) 2021-06-09 09:45:48 -06:00
Idan Miara
69305c72b5
update the docs for dropping Python < 3.6 support (#2196) 2021-06-05 15:21:08 -06: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
Kyle Barron
52a2500af9
Docs: Change rasterio.insp to rio insp (#2071)
* Change rasterio.insp to rio insp

* Update docs/topics/tags.rst

Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
2020-12-14 17:21:46 -07:00
Yann-Sebastien Tremblay-Johnston
1837a77261
Update windows install instructions (#2039)
* Update readme

* Note that running tests locally requires installing in editable mode

* Update corresponding section in installation notes

* clarify note about --no-use-pep517
2020-11-16 07:53:58 -07:00
Yann-Sebastien Tremblay-Johnston
d27877c4b3
fix subheadings beind rendered as separate pages, and fix rpc reproject example to actually use kwargs (#2038) 2020-11-14 11:17:05 -07:00
Yann-Sebastien Tremblay-Johnston
11ae663ff4
Warp add rpcs (#2031)
* [warp_add_rpcs] initial update to reproject to support rpcs

* catch kwargs in _calculate_default_transform

* fix allocation of crs to wrong dataset (was src, now dst) in _calculate_default_transform. Specifically where we went from GDALCreateGenImgProjTransformer -> GDALCreateGenImgProjTransformer2

* pass kwargs to calculate_default_transform (to be passed to transformer

* update docstrings

* update documentation

* add debug messages for kwargs used to set Transformer options

* Don't capitalize RPC_DEM transformer option value, as it might be a path

* includes existing changes from https://github.com/mapbox/rasterio/pull/2030, better support for computation of calculate_default_transform with just gcps or rpcs

* adds testse

* Remove an empty line

Mainly to trigger a new build on travis-ci.com

* add new test file (Largely derived from RGB.byte.tif)

* Fix incorrectly encoding RPC metadata as transform options

Was checking for transformer option RPC_DEM in the RPC metadata by mistake

Co-authored-by: Sebastien Tremblay-Johnston <sebastien.tremblayjohnston@mdacorporation.com>
Co-authored-by: Sean Gillies <sean@mapbox.com>
Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
2020-11-13 18:26:58 -07:00
James McBride
0e2d9e275e
Update pip installation instructions (#2027)
The --no-use-wheel option in pip installation has been deprecated in
favor of --no-binary.
2020-11-02 10:14:30 -07:00
Yann-Sebastien Tremblay-Johnston
10809b036b
WIP: Add coordinate transformation with RPCs (#1922)
* This is part of an effort to introduce the concept of rational polynomial coeffecients to be used for coordinate transformations using GDALCreateRPCTransformer.

- Added a new UserDict subclass named RPC to control.py. This structure contains the rationa polynomial coefficients, and can be instatiated from user input or read from dataset. GDAL stores RPCs as metadata which are all string encoded. The RPC object deserializes string values to float or list appropriately, and also provides a serialization method when passing to lower level GDAL methods.
- A new _transform.pyx method called _rpc_transform, similar to _base._transform except using GDALCreateRPCTransformer and GDALRPCTransform.
- A new RPCTransformWarning to errors.py, indicating when a RPC coordinate transformation has failed.
- New includes from gdal.h and gdal_alg.h for RPC related structs and functions
- New rpcs property to DatasetBase and subclassese with appropriate getter and setters (error when read only mode). Corresponding updates to _base.pxd and _io.pxd
- Tests

* trigger new travis build

* This is part of an effort to introduce the concept of rational polynomial coeffecients to be used for coordinate transformations using GDALCreateRPCTransformer.

- Added a new UserDict subclass named RPC to control.py. This structure contains the rationa polynomial coefficients, and can be instatiated from user input or read from dataset. GDAL stores RPCs as metadata which are all string encoded. The RPC object deserializes string values to float or list appropriately, and also provides a serialization method when passing to lower level GDAL methods.
- A new _transform.pyx method called _rpc_transform, similar to _base._transform except using GDALCreateRPCTransformer and GDALRPCTransform.
- A new RPCTransformWarning to errors.py, indicating when a RPC coordinate transformation has failed.
- New includes from gdal.h and gdal_alg.h for RPC related structs and functions
- New rpcs property to DatasetBase and subclassese with appropriate getter and setters (error when read only mode). Corresponding updates to _base.pxd and _io.pxd
- Tests

trigger new travis build

* Move RPC Class to it's own file

* fix typo

* make private

* re-implement RPC with attr

* make err_bias, err_rand attributes optional, default to empty string

* default to None, rather than empty string
2020-11-02 09:26:59 -07:00
Sean Gillies
f62b5f4a24 Update docs to show GDAL_CACHEMAX requires number of bytes 2020-10-27 15:21:26 -06:00
Mark Boer
14f837533b
docs: Concurrent read/write update (#2010)
* update the threadpool example

* add benchmark number, done a VM with 4 cores

* fixes threading typo and adds a little more background on what multhreading is trying to achieve
2020-10-22 15:03:09 -06:00
Guillaume Lostis
3568c9fd86
Fix stale links (#2021) 2020-10-20 09:57:56 -06:00
Sean Gillies
bb106e903a Merge branch 'maint-1.1' 2020-09-09 08:39:18 -06:00
Sean Gillies
a701f56bfd Replace num_cols, num_rows with width, height
Resolves #1978
2020-08-17 11:14:01 -06:00
Guillaume Lostis
6f9e6fe092 Resampling docs typo (#1902)
* Fix error in resampling example

* Fix typo in resampling doc

* Introduce sphinx autodoc links in resampling.rst
2020-04-14 13:52:42 -06:00
Guillaume Lostis
aabb4dd1ce
Resampling docs typo (#1902)
* Fix error in resampling example

* Fix typo in resampling doc

* Introduce sphinx autodoc links in resampling.rst
2020-04-14 13:50:43 -06:00
Sean Gillies
07b25aac52 Resolves #1830 2020-03-20 13:42:49 -06:00
Sean Gillies
dea2ed88f3 Resolves #1830 2020-03-20 13:41:48 -06:00
Sean Gillies
f1c681054e Resolves #1854 2020-03-13 10:31:47 -06:00
Sean Gillies
08dad6c5f2 Resolves #1854 2020-03-13 10:29:24 -06:00
Jonas
49c5ae5d3a replace broken resampling example with working one (#1804)
* replace broken resampling example with working one

* clarify scaling factor function
2020-03-13 10:27:44 -06:00
Pratik Yadav
69280e3b7e
alphabetic order of cli docs (#1865) 2020-02-11 16:09:57 -07:00
Sean Gillies
d4e13f4ba4
Activate your conda environments 2019-12-16 14:29:17 -07:00
Sean Gillies
226e45cec6
Update faq.rst 2019-12-16 14:00:30 -07:00
Jonas
78a0e66e48 replace broken resampling example with working one (#1804)
* replace broken resampling example with working one

* clarify scaling factor function
2019-10-11 13:15:21 -06:00
Nikolai Janakiev
b47e3f880b Fix GDAL data model link (#1795) 2019-10-02 08:37:57 -06:00
Guillaume Lostis
bed880553f Docs (#1771)
* Remove rasterio.vfs from doc

* Fix broken links in doc

* Fix typos in doc

* Update CLI doc

* Use rst links in doc
2019-09-09 14:15:27 -06:00
Sean Gillies
096cb4878f Merge branch 'master' of github.com:mapbox/rasterio 2019-08-06 18:43:19 -06:00
Sean Gillies
073339ce57 Merge branch 'maint-1.0' 2019-08-06 18:42:38 -06:00
Sean Gillies
0b4229c59d Resolve #1683 2019-07-29 16:36:56 -06:00
Raaj Tilak Sarma
953b9bdb08 typo fix (#1730)
change `resampling` to `Resampling`
2019-07-23 10:25:50 -06:00
Sean Gillies
a2ea156b76
Note block width and height restrictions 2019-05-22 11:41:44 -06:00
Sean Gillies
1aeef56e23 Merge branch 'maint-1.0' 2019-05-15 22:22:42 -06:00
Sean Gillies
2ff5710b7a Update resampling doc
Resolves #1596
2019-05-15 17:31:55 -06:00
Sean Gillies
eebf54b74f
Add Window import example 2019-05-06 13:41:47 -06:00
Sean Gillies
a84d5e1b2b Merge branch 'maint-1.0' 2019-03-29 17:14:02 -06:00
Sean Gillies
71315fc9b6 Add links to API docs from quickstart guide
Also fix the repr of some CRS objects.
2019-03-29 17:02:26 -06:00
Sean Gillies
73a7c84131 Go back to True at the end of the config topic 2019-03-04 10:27:44 -07:00
Sean Gillies
73390f2b33 Fix improper usage and add docs for the BIGTIFF option
Resolves #1647
2019-03-04 10:24:45 -07:00
Sean Gillies
9f128bc0da More details 2019-02-15 12:30:17 -07:00
Sean Gillies
ac715ee853 Better notes about pip and conda 2019-02-15 12:08:57 -07:00
Sean Gillies
318a71d7d9 Use RST code-block 2019-02-14 20:03:05 -07:00
Sean Gillies
4d57e7cf24 Add an FAQ 2019-02-14 19:44:51 -07:00
jaredairbusaerial
1f9ad120e4 band_one is not defined in the walkthrough (#1598)
band1 is defined earlier in the walkthrough but band_one is not. Calling band_one[row, col] results in an error. Changed band_one to band1.
2019-01-14 10:50:30 -07:00
Sean Gillies
0e5e7c96a5
Remove unneeded copy 2019-01-07 13:55:04 -07:00
Sean Gillies
51494a628b Merge branch 'maint-1.0' 2018-12-17 08:58:40 -07:00