I read in GDAL documentation that starting 2.4 it is possible to open a raster in HDFS. I downloaded and compiled the latest source code available version and the generated libraries show it is 2.4 (libgdal.so.20.4.2). I compiled with option "-with-hdfs=yes" and "--with-java=yes".
I am trying to open a raster using:
Dataset raster = gdal.Open("/vsihdfs/hdfs://node:8020/user/hdfs /spatial_raster/input_raster/kahoolawe.tif", gdalconst.GA_ReadOnly);
but I am getting the following error: "ERROR 4: No such file or directory"
could anyone please tell me if hdfs virtual system not supported yet?, or maybe I configured it wrong when compiling?
Appreciate your help, thanks!
Important are environment variables JAVA_HOME and HADOOP_HOME.
Export CLASSPATH=$($HADOOP_HOME/bin/hadoop classpath --glob)
I hope this can help you :
https://github.com/OSGeo/gdal/issues/1333
https://github.com/OSGeo/gdal/pull/714
Related
I am trying to use matploitlib_cpp on Windows 11 with Numpy 1.24.2 and Python 3.11, but I keep running in to the following error.
Original error was: No module named 'numpy.core._multiarray_umath'
I know this has been posted at a million different places on the internet and I have tried following all the guides that says reinstalling numpy and whatever, it does not work for me. What I can see in my path ..\Python3.11\Lib\site-packages\numpy\core is that I have a file named _multiarray_umath.cp311-win_amd64.pyd but no file named _multiarray_umath. I also tried to use a virtual environement from Anaconda but I am not sure how to build matploitlib_cpp against such virtual enviornment.
I got it working by using the release binaries instead of debug binaries.
No matter how I import my audio file (through uploading it on google colab, importing it through google drive), I keep getting the same error. Could it be a path issue, and if so, how could I go about fixing it? When I run an "iPython.display", it displays the audio and I'm able to play it, but I'm not sure why torchaudio cannot load it.
Thanks in advance :)
waveform, sample_rate = torchaudio.load("Default-20220816-113844.mp3")
waveform = waveform.to(device)
if sample_rate != bundle.sample_rate:
waveform = torchaudio.functional.resample(waveform, sample_rate, bundle.sample_rate)
Assuming ("Default-20220816-113844.mp3") is not being found because of the path
On Colab to find the path click on the "..." (that appears on the right hand side of objects in the file browser when you hover over them) and choose COPY PATH to copy the complete path, the value will be copied without quotation marks.
At the time of the question is posted, Google Colab has pytorch==1.12 and torchaudio==0.12 pre-installed, so I assume you are getting the error with these versions.
Starting from TorchAudio 0.12, mp3 decoding requires FFmpeg.
When "sox_io" backend is used, first it tries to load audio using libsox, and when it fails, it further tries to load it with FFmpeg.
In Google Colab, you can run the following command to install the supported version.
!add-apt-repository -y ppa:savoury1/ffmpeg4
!apt-get -qq install -y ffmpeg
See also: https://pytorch.org/audio/0.12.1/tutorials/streaming_api_tutorial.html
I am struggling to find out how to install spatialite for geodjango on windows but I don't know what I am doing wrong. I follow the instructions as per the django page https://docs.djangoproject.com/en/4.0/ref/contrib/gis/install/spatialite/ but the tutorial doesn't say what to do after getting the binarys of spatialite
I have tried to put them everywhere but every time I get the same error:
Exception Value:
Unable to load the SpatiaLite library extension as specified in your SPATIALITE_LIBRARY_PATH setting
I tried to put the mod_spatialite.dll file everywhere and try to set to SPATIALITE_LIBRARY_PATH but it seems I can't get the solution
Any suggestions would be appriciated
Thanks
Extracting the binary into Python installation folder eg: C:\Users\huy\AppData\Local\Programs\Python\Python39.
Then add SPATIALITE_LIBRARY_PATH = "mod_spatialite". This works for me.
I'm trying to use ECW files in my application. I've built GDAL Library whit this command:
./configure --with-ecw:/usr/local/hexagon
after completion of build process, when I Entered:
gdalinfo --formats | grep ECW
I got:
ECW -raster- (rw+): ERDAS Compressed Wavelets (SDK 5.5)
JP2ECW -raster,vector- (rw+v): ERDAS JPEG2000 (SDK 5.5)
also when I've used
gdalinfo map.ecw
it returns all metadata of ECW files.
but when I compile my C++ program, it returns:
Error: GDAL Dataset returned null from read
ERROR 4: `map.ecw' not recognized as a supported file format.
Dose anyone know why I can't use ECW files in C++ program?
By the way, I use
Cmake
,GDAL 3.3.0
,Erdas-ECW SDK 5.5 hexagon
for building the program.
I found the answer. This problem occurs if the gdal_bin binary package is installed before creating GDAL.
Just make sure gdal_bin is deleted before installing the version you created.
I try installing QT5 using vcpkg on Windows 10. Unfortunately, when executing ./vcpkg.exe install qt5:x64-windows, I get a long list of errors, must useful information being:
-- Downloading http://download.qt.io/official_releases/qt/5.15/5.15.0/submodules/qtdeclarative-everywhere-src-5.15.0.tar.xz... Failed. Status: 18;"Transferred a partial file"
Failed to download file.
If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment
variables to "https://user:password#your-proxy-ip-address:port/".
Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues
Error: Building package qt5-declarative:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: qt5-declarative:x64-windows
Vcpkg version: 2020.06.15-nohash
As I am using the current version and was successful downloading and installing opencv as well as eigen3, I don't think proxy is being an issue.
I was able to download the file itself and hoped, I could manually paste it at the required position in the code (is this possible?) or use a different mirror. I would be glad if someone could give me guydance, as I am new to vcpkg.
Thanks in advance
Edit: As suggested by #drescherjm, I pasted the file in the vcpkg\downloads folder. Now I am looking at the File does not have expected hash error. How do I solve that issue?