gdal

Importing GDAL prints lots of error messages, but still works

时光毁灭记忆、已成空白 提交于 2019-12-23 09:01:20
问题 So, I should not be complaining, but it is annoying. On my setup (Windows Server 2012 R2) importing GDAL in Python in the terminal prints the following: >>> import gdal ERROR 1: Can't load requested DLL: C:\Program Files (x86)\GDAL\gdalplugins\gdal_ BAG.dll 193: %1 is not a valid Win32 application. ERROR 1: Can't load requested DLL: C:\Program Files (x86)\GDAL\gdalplugins\gdal_ BAG.dll 193: %1 is not a valid Win32 application. ERROR 1: Can't load requested DLL: C:\Program Files (x86)\GDAL

Importing GDAL with cx_Freeze, Python3.4

六月ゝ 毕业季﹏ 提交于 2019-12-23 05:41:58
问题 I'm trying to create an executable for some code in Python3.4, for distribution to Windows. This program requires GDAL for some mapping functions, but it comes up in the Missing Modules during the cx_Freeze build: Missing modules: ? _gdal imported from osgeo, osgeo.gdal ? _gdal_array imported from osgeo.gdal_array ? _gdalconst imported from osgeo.gdalconst ? _ogr imported from osgeo.ogr ? _osr imported from osgeo.osr The cx_Freeze .exe still builds, but when I try to run it, I naturally get:

Gdal for windows 7(x32)

被刻印的时光 ゝ 提交于 2019-12-23 04:34:06
问题 How do I connect to the gdal eclipse. I tried all the ways it does not work. How do I connect to the gdal eclipse. I tried all the ways it does not work. All the time issue java.lang.UnsatisfiedLinkError: D: \ Document \ JAVA \ Gdal \ gdalLibrary \ gdaljni.dll: Can't find dependent libraries 回答1: I also have this problem and just found a solution. I am working with WIN8, and downloaded release-1600-gdal-1-8-0-mapserver-5-6-6.zip. As in the readme txt, I run the SDKShell.bat to set the

create gdal static library for xcode 9 (libgdal.a)

给你一囗甜甜゛ 提交于 2019-12-22 13:06:43
问题 I need to create a gdal static library (libgdal.a) to use it in iOS. I tried this script Incorporating GDAL/OGR into an iOS project - A quick guide but it just work for iOS 6. And I also tried https://gist.github.com/lachlanhurst/745e1e1d196c3e697450 but I got a lot of warnings and errors and this script didn't generate the libgdal.a. Any suggestions? 来源: https://stackoverflow.com/questions/52124407/create-gdal-static-library-for-xcode-9-libgdal-a

Link conda HDF4 to conda GDAL (Anaconda Python)

纵然是瞬间 提交于 2019-12-22 10:27:09
问题 I have python installed through the Anaconda distribution. It works for most regular things. I need to be able to open a MODIS HDF4-EOS file, however. I have tried conda install -c https://conda.binstar.org/mutirri hdf4 conda install gdal python -c "from osgeo import gdal; ds=gdal.Open("MOD021KM.A2014005.0910.006.2014005194151.hdf"); print type(ds)" But I get ERROR 4: `MOD021KM.A2014005.0910.006.2014005194151.hdf' not recognised as a supported file format. < type 'NoneType' > hey... It seemed

python: perform gdalwarp in memory with gdal bindings

[亡魂溺海] 提交于 2019-12-22 06:01:08
问题 I currently have a processing chain in R which downloads MODIS data and then calls gdalwarp from the system to reproject a specific subdataset (e.g. NDVI) into WGS1984. The resulting GeoTiffs are then collected into an HDF5 file for further processing. Now I'm moving the processing chain to python , and I was wondering if there's a way to skip the step of writing GeoTiffs to disk with the functionalities of the gdal module. To be clear, the question is: Can i perform gdalwarp with using

How do I open geotiff images with gdal in python?

◇◆丶佛笑我妖孽 提交于 2019-12-22 01:37:25
问题 I am trying to run the following code: from osgeo import gdal import sys # this allows GDAL to throw Python Exceptions src_ds = gdal.Open( "fused.tif" ) src_ds.show() But I receive the following error: Traceback (most recent call last): File ".../gdalopen1.py", line 5, in module src_ds.show() AttributeError: 'Dataset' object has no attribute 'show' Why does this happen? 回答1: You have already opened the dataset, as Spacedman answered. GDAL is not a visualization library (at its core). You can

Issue when imoporting GDAL : ImportError, Library not loaded, Image not found

 ̄綄美尐妖づ 提交于 2019-12-21 17:05:09
问题 Since yesterday I struggle to import some libraries such as GDAL (or iris) and I allways get the same type of outputs. >>> import gdal Traceback (most recent call last): File "<stdin>", line 1, in <module> File "gdal.py", line 28, in <module> _gdal = swig_import_helper() File "gdal.py", line 24, in swig_import_helper _mod = imp.load_module('_gdal', fp, pathname, description) ImportError: dlopen(./_gdal.so, 2): Library not loaded: @rpath/libicui18n.56.dylib Referenced from: /Users/zoran

GeoDjango - GDAL library giving error

只谈情不闲聊 提交于 2019-12-21 07:03:16
问题 I am trying to get GeoDjango running on ubuntu and have hit a problem with GDAL. I have downloaded and installed GDAL without problem. I had to add the following line to my project settings: GDAL_LIBRARY_PATH = '/usr/local/lib/libgdal.so.1.15.1' When I check in the shell all is good: In [1]: from django.contrib.gis import gdal In [2]: gdal.HAS_GDAL Out[2]: True However when I try and run ogrinfo as in the official tutorial I get the following error: $ ogrinfo world/data/TM_WORLD_BORDERS-0.3

How to set the GDAL_DATA environment variable to point to the directory containing EPSG csv files?

空扰寡人 提交于 2019-12-20 10:24:14
问题 I want to wrap(re-project) one variable in this netcdf file. D:\ gdalwarp -t_srs EPSG:4326 NETCDF:"C:\fie.nc":var "C:\Desktop\SM.img" But I get this error: ERROR 4: Unable to open EPSG support file gcs.csv. Try setting the GDAL_DATA environment variable to point to the directory containing EPSG csv files. ERROR 1: Translating source or target SRS failed: EPSG:4326 I am using GDAL 1.9.0, released 2011/12/29. I will be grateful for any help. 回答1: You can edit the environment variables