bopen / qgis-elevation-plugin

QGIS plugin to download global terrain digital elevation models, SRTM 30m DEM and SRTM 90m DEM.
GNU General Public License v2.0
5 stars 2 forks source link

Can't run the plugin on mac #4

Closed mkmushegh closed 7 years ago

mkmushegh commented 8 years ago

Hi, Thank you guys for your great idea to make this plugin. I have difficulty to run it on my mac (QGIS 2.14.2) Here is my error message:

Traceback (most recent call last): File "/Users/musheghmkrtchyan/.qgis2/python/plugins/qgis-elevation-plugin-master/qgis_elevation_plugin.py", line 245, in run elevation.datasource.clip(bounds=self.bounds, output=self.dest_path) File "/Users/musheghmkrtchyan/.qgis2/python/plugins/qgis-elevation-plugin-master/elevation/elevation/datasource.py", line 142, in clip datasource_root = seed(cache_dir, product, bounds, _kwargs) File "/Users/musheghmkrtchyan/.qgis2/python/plugins/qgis-elevation-plugin-master/elevation/elevation/datasource.py", line 137, in seed util.check_call_make(datasource_root, targets=['all']) File "/Users/musheghmkrtchyan/.qgis2/python/plugins/qgis-elevation-plugin-master/elevation/elevation/util.py", line 49, in wrapper return wrapped(path, args, *_kwargs) File "/Users/musheghmkrtchyan/.qgis2/python/plugins/qgis-elevation-plugin-master/elevation/elevation/util.py", line 80, in check_call_make subprocess.check_call(cmd, shell=True) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call raise CalledProcessError(retcode, cmd) CalledProcessError: Command 'make -C /Users/musheghmkrtchyan/Library/Caches/elevation/SRTM1 all ' returned non-zero exit status 2

alexamici commented 8 years ago

The error message only says that the:

make -C /Users/musheghmkrtchyan/Library/Caches/elevation/SRTM1 all

command failed but not why. You should run the above command from the command line (inside a Terminal window) and report back the full error message.

mkmushegh commented 8 years ago

Hello, Thank you for your reply. Here is what's happening when I'm running that line of code inside the Terminal:

gdalbuildvrt -q -overwrite SRTM1.vrt Usage: gdalbuildvrt [-tileindex field_name] [-resolution {highest|lowest|average|user}] [-te xmin ymin xmax ymax] [-tr xres yres] [-tap] [-separate] [-b band] [-sd subdataset] [-allow_projection_difference] [-q] [-addalpha] [-hidenodata] [-srcnodata "value [value...]"] [-vrtnodata "value [value...]"] [-a_srs srs_def] [-input_file_list my_liste.txt] [-overwrite] output.vrt [gdalfile]*

eg. % gdalbuildvrt doq_index.vrt doq/*.tif % gdalbuildvrt -input_file_list my_liste.txt doq_index.vrt

NOTES: o With -separate, each files goes into a separate band in the VRT band. Otherwise, the files are considered as tiles of a larger mosaic. o -b option selects a band to add into vrt. Multiple bands can be listed. By default all bands are queried. o The default tile index field is 'location' unless otherwise specified by -tileindex. o In case the resolution of all input files is not the same, the -resolution flag enable the user to control the way the output resolution is computed. Average is the default. o Input files may be any valid GDAL dataset or a GDAL raster tile index. o For a GDAL raster tile index, all entries will be added to the VRT. o If one GDAL dataset is made of several subdatasets and has 0 raster bands, its datasets will be added to the VRT rather than the dataset itself. Single subdataset could be selected by its number using the -sd option. o By default, only datasets of same projection and band characteristics may be added to the VRT.

FAILURE: No input filenames specified. make: *\ [SRTM1.vrt] Error 1 Musheghs-MacBook-Pro:min_max_filter musheghmkrtchyan$

alexamici commented 8 years ago

I just noticed that the command line built by the plugin can't possibly succeed so il must be a bug in the plugin itself.

One more question: does it crashes like this all the times, or does it work sometime?

mkmushegh commented 8 years ago

It gives the same error every time. Thank you.

alexamici commented 8 years ago

It looks like the problem is more complex, USGS the data provider the SRTM 30m DEM has disabled the direct download from their servers that Elevation was using. I updated the main Elevation package to default with the SRTM3 90m DEM that appears to be still accessible.

Please refer to: https://github.com/bopen/elevation/issues/18 for more info.

mkmushegh commented 8 years ago

With the new update it worked just fine. Thank you very much