Comments (2)
Nope, that had no effect. It will be difficult to address this since from_bounds()
is written in Python and calculate_default_transform()
is written in C++ (the math is in GDAL). The good news is that aligning each (like GDAL's "target aligned pixels") produces the same result.
>>> from rasterio import warp, transform, CRS
>>> crs = CRS.from_epsg(32718)
>>> width, height, left, right, top, bottom = (539, 618, 627175.0, 643345.0, 4852085.0, 4833545.0)
>>> res1 = transform.from_bounds(left, bottom, right, top, width, height)
>>> res2 = warp.calculate_default_transform(crs, crs, width, height, left=left, right=right, top=top, bottom=bottom)
>>> warp.aligned_target(*res2, 30)
(Affine(30.0, 0.0, 627150.0,
0.0, -30.0, 4852110.0), 540, 619)
>>> warp.aligned_target(res1, width, height, 30)
(Affine(30.0, 0.0, 627150.0,
0.0, -30.0, 4852110.0), 540, 619)
from rasterio.
@adehecq thanks for the report!
I wonder if changing the transform construction from this form https://github.com/rasterio/rasterio/blob/main/rasterio/_warp.pyx#L760 to this form https://github.com/rasterio/rasterio/blob/main/rasterio/transform.py#L188 would help?
from rasterio.
Related Issues (20)
- Small typo: Release 1.4a2 requires Python 3.8 instead of 3.9 HOT 1
- Test performance: Dependencies installed twice HOT 1
- `reproject` with `src_geoloc_array` introduces unexpected shift for group of pixels HOT 2
- 1.3.10 release HOT 3
- "pytest.PytestRemovedIn8Warning: Passing None has been deprecated" test failures HOT 1
- Run pyupgrade on code
- Writing a COG to a file-like object in "wb" mode fails in 1.4a2 HOT 4
- Disallow rotated rasters in merge() HOT 3
- Add correct python syntax highlighting to README HOT 2
- update_tags does not work for special tags like PIXEL_OR_AREA HOT 2
- Boundless mask reads are incorrect for complex data and GDAL 3.8
- rasterio.merge.merge() uses ~10 times more memory than specified by `mem_limit` HOT 1
- Unexpected sieve results when mask is entirely false
- Opener registration error for files in same parent directory HOT 9
- access Sentinel-1 IW SLC tiff measurement via S3 on creodias entrypoint
- memory doesn't free using features.geometry_mask function with fastapi HOT 2
- Typo in WarpedVRT's docstring
- Colormap extended to 255 HOT 3
- GDAL Error Reported in logs, but rasterio method never returns HOT 1
- rasterio.merge.merge ungracefully handles rasters with postive height or negative width HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rasterio.