rasterio

Encountered a error while pip install rasterio

落花浮王杯 提交于 2021-02-19 01:48:08
问题 I am working on windows 10 and encountered an error while executing pip install rasterio in anaconda prompt. (base) C:\Users\skywalker>pip install rasterio Collecting rasterio Using cached https://files.pythonhosted.org/packages/57/84/be5689470a73f5f8988cf44b81cb3493ebb8abbbebb69768c8fc86fccdd5/rasterio-1.0.24.tar.gz Complete output from command python setup.py egg_info: INFO:root:Building on Windows requires extra options to setup.py to locate needed GDAL files. More information is available

Python3.7 rasterio library cant open jp2

不想你离开。 提交于 2021-01-27 17:09:38
问题 I want to open a jp2 image from sentinel2 but when I read the image band = rasterio.open(imagetest, driver= 'JP2OpenJPEG') I get the next error 'D:\DataStorage\00_sentinel_data\L1C_T29SQB_A013147_20171228T111919\IMG_DATA\T29SQB_20171228T111451_B02.jp2' not recognized as a supported file format. I have installed GDAL with OSGeo4W and I can see the driver when I use the gdalinfo --formats command JP2OpenJPEG -raster,vector- (rwv): JPEG-2000 driver based on OpenJPEG library The only thing that I

How to project RGB multiband GeoTIFF to specified area extent using python?

為{幸葍}努か 提交于 2020-01-15 12:15:14
问题 I want to plot and RGB image (because it is satellite image) from multiband GeoTIFF and project it to specified area extent. Recently, I was successfully able to do this with single band raster using "georaster". However, when I tried to do the same for multiband raster, after calling image = georaster.MultiBandRaster(file, bands='all', load_data=extent) to load the subset data the same way as with georaster.SingleBandRaster, I get the following error: Traceback (most recent call last): File

Installation of GDAL with Conda on Windows

╄→гoц情女王★ 提交于 2019-12-31 05:52:25
问题 I have Anaconda Python 3.6 on Windows 7. I frequently use GeoPandas and it worked fine. Yesterday I tried to install rasterio and georasters, and they seemed to install fine using the suggested method conda config --add channels conda-forge conda install rasterio Then installed georasters using conda install -c conda-forge georasters And got a successfull installation message. When trying to import them they do not work - there is an error message on import rasterio or import georasters .

Installation of GDAL with Conda on Windows

廉价感情. 提交于 2019-12-31 05:52:12
问题 I have Anaconda Python 3.6 on Windows 7. I frequently use GeoPandas and it worked fine. Yesterday I tried to install rasterio and georasters, and they seemed to install fine using the suggested method conda config --add channels conda-forge conda install rasterio Then installed georasters using conda install -c conda-forge georasters And got a successfull installation message. When trying to import them they do not work - there is an error message on import rasterio or import georasters .

Find lat/long coordinates from pixel point in .geotiff using python and gdal

折月煮酒 提交于 2019-12-11 14:32:03
问题 I have points defined by pixel coordinates in a .geotiff imagesat. I am trying to convert these pixel coordinates into longitude and latitude. At first a tried to adapt the given code from the inverse question i previously asked here def pixel_to_world(geo_matrix, x, y): ul_x = geo_matrix[0] ul_y = geo_matrix[3] x_dist = geo_matrix[1] y_dist = geo_matrix[5] _x = x * x_dist + ul_x _y = y * y_dist + ul_y return (_x, _y) def build_transform_inverse(dataset, EPSG): source = osr.SpatialReference

Something wrong with how I'm bundling rasterio into an executable

最后都变了- 提交于 2019-12-11 01:09:42
问题 Expected behavior and actual behavior. I expected to compile a script using rasterio into an executable using pyinstaller . The script runs fine from within my python environment. However I am not able to freeze it into an executable using PyInstaller . Steps to reproduce the problem. I have a script called workflow_3.py which contains the following: import rasterio That's it. I tried to compile then run this using pyinstaller as follows: (wps_env36) D:\11202750-002_RA2CE\Basis>pyinstaller

Installation of GDAL with Conda on Windows

僤鯓⒐⒋嵵緔 提交于 2019-12-02 08:07:36
I have Anaconda Python 3.6 on Windows 7. I frequently use GeoPandas and it worked fine. Yesterday I tried to install rasterio and georasters, and they seemed to install fine using the suggested method conda config --add channels conda-forge conda install rasterio Then installed georasters using conda install -c conda-forge georasters And got a successfull installation message. When trying to import them they do not work - there is an error message on import rasterio or import georasters . Digging into it, I found geopandas, fiona and GDAL were now also broken and after 1hr trying uninstalling/

Convert raster time series of multiple GeoTIFF images to NetCDF

守給你的承諾、 提交于 2019-11-29 05:16:37
I have a raster time series stored in multiple GeoTIFF files ( *.tif ) that I'd like to convert to a single NetCDF file. The data is uint16 . I could probably use gdal_translate to convert each image to netcdf using: gdal_translate -of netcdf -co FORMAT=NC4 20150520_0164.tif foo.nc and then some scripting with NCO to extract dates from filenames and then concatenate, but I was wondering whether I might do this more effectively in Python using xarray and it's new rasterio backend. I can read a file easily: import glob import xarray as xr f = glob.glob('*.tif') da = xr.open_rasterio(f[0]) da

Convert raster time series of multiple GeoTIFF images to NetCDF

∥☆過路亽.° 提交于 2019-11-27 16:56:26
问题 I have a raster time series stored in multiple GeoTIFF files ( *.tif ) that I'd like to convert to a single NetCDF file. The data is uint16 . I could probably use gdal_translate to convert each image to netcdf using: gdal_translate -of netcdf -co FORMAT=NC4 20150520_0164.tif foo.nc and then some scripting with NCO to extract dates from filenames and then concatenate, but I was wondering whether I might do this more effectively in Python using xarray and it's new rasterio backend. I can read a