Re: Copying Rasterio crs from input to output dataset
Sean Gillies
Hi Luke, Unfortunately, I cannot reproduce your results on my computer. $ python Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 26 2018, 19:50:54) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import rasterio >>> with rasterio.open('tests/data/RGB.byte.tif') as src: ... with rasterio.open('/tmp/foo.tif', 'w', **src.meta) as dst: ... dst.write(src.read()) ... >>> with rasterio.open('/tmp/foo.tif') as src: ... print(src.meta) ... print(src.profile) ... {'driver': 'GTiff', 'dtype': 'uint8', 'nodata': 0.0, 'width': 791, 'height': 718, 'count': 3, 'crs': CRS({'init': 'epsg:32618'}), 'transform': Affine(300.0379266750948, 0.0, 101985.0, 0.0, -300.041782729805, 2826915.0)} {'driver': 'GTiff', 'dtype': 'uint8', 'nodata': 0.0, 'width': 791, 'height': 718, 'count': 3, 'crs': CRS({'init': 'epsg:32618'}), 'transform': Affine(300.0379266750948, 0.0, 101985.0, 0.0, -300.041782729805, 2826915.0), 'tiled': False, 'interleave': 'pixel'} I wonder if you may have a problem with unresolved Proj data. To debug this, turn on Python's logging facility and set the level to DEBUG at the top of your code like so: import logging logging.basicConfig(level=logging.DEBUG)
On Thu, Jul 19, 2018 at 11:24 PM, Luke Pinner <lukepinnerau@...> wrote:
--
Sean Gillies
|
|