GRASS r.watershed実行時のエラーにつきまして

686 views
Skip to first unread message

ironma...@gmail.com

unread,
May 10, 2020, 11:36:09 PM5/10/20
to QGIS初心者質問グループ
初めまして。菊地と申します。

QGIS Desktop 3.10.3 with GRASS 7.8.2を使用しています。
GRASSのプロセッシングツールボックス"r.watershed"を用いて、「排水先セルの数」,「排水方向」,「流域ラベル」及び「河川セグメント」を出力しようとしたところ、ログに「警告: マップセットの平行ロックはウィンドウズではサポートされていません。」のエラーメッセージが表示され、いずれも出力されませんでした。
「外部流域(exterior basin)の最小サイズ」は「10000」に設定していました。
このようなエラーが発生した要因と解決法について、どなたかご存知でしたらご教示頂けないでしょうか?

PCのWindowsのバージョン、及びソースデータ(ラスターデータ)は以下のとおりです。

・Windowsのバージョン:Windows 10 Pro
・ソースデータ:「GIS実習オープン教材」の「ラスターデータの分析」(https://gis-oer.github.io/gitbook/book/materials/15/15.html)の実習用データセットに含まれている"aso_2kei.tif"

また、ログ全文を以下に掲載いたします。

QGIS version: 3.10.3-A Coruna
QGIS code revision: 0e1f846438
Qt version: 5.11.2
GDAL version: 3.0.4
GEOS version: 3.8.0-CAPI-1.13.1 
PROJ version: Rel. 6.3.1, February 10th, 2020
プロセシングアルゴリズム...
アルゴリズム 'r.watershed' を開始しています...
入力パラメータ:
{ '-4' : False, '-a' : False, '-b' : False, '-m' : False, '-s' : False, 'GRASS_RASTER_FORMAT_META' : '', 'GRASS_RASTER_FORMAT_OPT' : '', 'GRASS_REGION_CELLSIZE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None, 'accumulation' : 'G:/BUFFALO_みまもり合図/JIRCAS/GIS/GIS実習オープン教材/aso/15/flow_accumulation.tif', 'basin' : 'G:/BUFFALO_みまもり合図/JIRCAS/GIS/GIS実習オープン教材/aso/15/watershed.tif', 'blocking' : None, 'convergence' : 5, 'depression' : None, 'disturbed_land' : None, 'drainage' : 'G:/BUFFALO_みまもり合図/JIRCAS/GIS/GIS実習オープン教材/aso/15/flow_direction.tif', 'elevation' : 'G:/BUFFALO_みまもり合図/JIRCAS/GIS/GIS実習オープン教材/aso/aso_2kei.tif', 'flow' : None, 'half_basin' : 'TEMPORARY_OUTPUT', 'length_slope' : 'TEMPORARY_OUTPUT', 'max_slope_length' : None, 'memory' : 300, 'slope_steepness' : 'TEMPORARY_OUTPUT', 'spi' : 'TEMPORARY_OUTPUT', 'stream' : 'G:/BUFFALO_みまもり合図/JIRCAS/GIS/GIS実習オープン教材/aso/15/river.tif', 'tci' : 'TEMPORARY_OUTPUT', 'threshold' : 10000 }

g.proj -c proj4="+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
r.external input="G:\BUFFALO_みまもり合図\JIRCAS\GIS\GIS実習オープン教材\aso\aso_2kei.tif" band=1 output="rast_5eb8be2c254e74" --overwrite -o
g.region n=10055.676521650157 s=-42936.90270436218 e=34820.919690261355 w=-24900.432767294173 res=27.92022087777257
r.watershed elevation=rast_5eb8be2c254e74 threshold=10000 convergence=5 memory=300 accumulation=accumulation705eb10611524301a1ce585d1c4971ca drainage=drainage705eb10611524301a1ce585d1c4971ca basin=basin705eb10611524301a1ce585d1c4971ca stream=stream705eb10611524301a1ce585d1c4971ca half_basin=half_basin705eb10611524301a1ce585d1c4971ca length_slope=length_slope705eb10611524301a1ce585d1c4971ca slope_steepness=slope_steepness705eb10611524301a1ce585d1c4971ca tci=tci705eb10611524301a1ce585d1c4971ca spi=spi705eb10611524301a1ce585d1c4971ca --overwrite
g.region raster=accumulation705eb10611524301a1ce585d1c4971ca
r.out.gdal -t -m input="accumulation705eb10611524301a1ce585d1c4971ca" output="G:\BUFFALO_みまもり合図\JIRCAS\GIS\GIS実習オープン教材\aso\15\flow_accumulation.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=drainage705eb10611524301a1ce585d1c4971ca
r.out.gdal -t -m input="drainage705eb10611524301a1ce585d1c4971ca" output="G:\BUFFALO_みまもり合図\JIRCAS\GIS\GIS実習オープン教材\aso\15\flow_direction.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=basin705eb10611524301a1ce585d1c4971ca
r.out.gdal -t -m input="basin705eb10611524301a1ce585d1c4971ca" output="G:\BUFFALO_みまもり合図\JIRCAS\GIS\GIS実習オープン教材\aso\15\watershed.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=stream705eb10611524301a1ce585d1c4971ca
r.out.gdal -t -m input="stream705eb10611524301a1ce585d1c4971ca" output="G:\BUFFALO_みまもり合図\JIRCAS\GIS\GIS実習オープン教材\aso\15\river.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=half_basin705eb10611524301a1ce585d1c4971ca
r.out.gdal -t -m input="half_basin705eb10611524301a1ce585d1c4971ca" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_94db59c962bd4bb8a0cbaf1e8748821b\db79ac52f86a40bababc73f2c82b132c\half_basin.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=length_slope705eb10611524301a1ce585d1c4971ca
r.out.gdal -t -m input="length_slope705eb10611524301a1ce585d1c4971ca" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_94db59c962bd4bb8a0cbaf1e8748821b\67913ba58db6423b960a895d8703cb45\length_slope.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=slope_steepness705eb10611524301a1ce585d1c4971ca
r.out.gdal -t -m input="slope_steepness705eb10611524301a1ce585d1c4971ca" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_94db59c962bd4bb8a0cbaf1e8748821b\856a552c3fee4309a28421a4b11c7f06\slope_steepness.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=tci705eb10611524301a1ce585d1c4971ca
r.out.gdal -t -m input="tci705eb10611524301a1ce585d1c4971ca" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_94db59c962bd4bb8a0cbaf1e8748821b\55d95eae980041788263dabd47d68f2b\tci.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=spi705eb10611524301a1ce585d1c4971ca
r.out.gdal -t -m input="spi705eb10611524301a1ce585d1c4971ca" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_94db59c962bd4bb8a0cbaf1e8748821b\812376a261834f90997cbfa340d6bbba\spi.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
Starting GRASS GIS...
警告: マップセットの平行ロックはウィンドウズではサポートされていません。
一時ファイルを削除しています...
Executing <C:\Users\Kikuchi\AppData\Local\Temp\processing_94db59c962bd4bb8a0cbaf1e8748821b\grassdata\grass_batch_job.cmd> ...
C:\Users\Kikuchi\Documents>chcp 932 1>NUL
C:\Users\Kikuchi\Documents>g.proj -c proj4="+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
C:\Users\Kikuchi\Documents>r.external input="G:\BUFFALO_縺ソ縺セ繧ゅj蜷亥峙\JIRCAS\GIS\GIS螳溽ソ偵が繝シ繝励Φ謨呎攝\aso\aso_2kei.tif" band=1 output="rast_5eb8be2c254e74" --overwrite -o
C:\Users\Kikuchi\Documents>g.region n=10055.676521650157 s=-42936.90270436218 e=34820.919690261355 w=-24900.432767294173 res=27.92022087777257
C:\Users\Kikuchi\Documents>r.watershed elevation=rast_5eb8be2c254e74 threshold=10000 convergence=5 memory=300 accumulation=accumulation705eb10611524301a1ce585d1c4971ca drainage=drainage705eb10611524301a1ce585d1c4971ca basin=basin705eb10611524301a1ce585d1c4971ca stream=stream705eb10611524301a1ce585d1c4971ca half_basin=half_basin705eb10611524301a1ce585d1c4971ca length_slope=length_slope705eb10611524301a1ce585d1c4971ca slope_steepness=slope_steepness705eb10611524301a1ce585d1c4971ca tci=tci705eb10611524301a1ce585d1c4971ca spi=spi705eb10611524301a1ce585d1c4971ca --overwrite
C:\Users\Kikuchi\Documents>g.region raster=accumulation705eb10611524301a1ce585d1c4971ca
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="accumulation705eb10611524301a1ce585d1c4971ca" output="G:\BUFFALO_縺ソ縺セ繧ゅj蜷亥峙\JIRCAS\GIS\GIS螳溽ソ偵が繝シ繝励Φ謨呎攝\aso\15\flow_accumulation.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=drainage705eb10611524301a1ce585d1c4971ca
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="drainage705eb10611524301a1ce585d1c4971ca" output="G:\BUFFALO_縺ソ縺セ繧ゅj蜷亥峙\JIRCAS\GIS\GIS螳溽ソ偵が繝シ繝励Φ謨呎攝\aso\15\flow_direction.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=basin705eb10611524301a1ce585d1c4971ca
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="basin705eb10611524301a1ce585d1c4971ca" output="G:\BUFFALO_縺ソ縺セ繧ゅj蜷亥峙\JIRCAS\GIS\GIS螳溽ソ偵が繝シ繝励Φ謨呎攝\aso\15\watershed.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=stream705eb10611524301a1ce585d1c4971ca
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="stream705eb10611524301a1ce585d1c4971ca" output="G:\BUFFALO_縺ソ縺セ繧ゅj蜷亥峙\JIRCAS\GIS\GIS螳溽ソ偵が繝シ繝励Φ謨呎攝\aso\15\river.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=half_basin705eb10611524301a1ce585d1c4971ca
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="half_basin705eb10611524301a1ce585d1c4971ca" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_94db59c962bd4bb8a0cbaf1e8748821b\db79ac52f86a40bababc73f2c82b132c\half_basin.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=length_slope705eb10611524301a1ce585d1c4971ca
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="length_slope705eb10611524301a1ce585d1c4971ca" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_94db59c962bd4bb8a0cbaf1e8748821b\67913ba58db6423b960a895d8703cb45\length_slope.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=slope_steepness705eb10611524301a1ce585d1c4971ca
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="slope_steepness705eb10611524301a1ce585d1c4971ca" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_94db59c962bd4bb8a0cbaf1e8748821b\856a552c3fee4309a28421a4b11c7f06\slope_steepness.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=tci705eb10611524301a1ce585d1c4971ca
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="tci705eb10611524301a1ce585d1c4971ca" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_94db59c962bd4bb8a0cbaf1e8748821b\55d95eae980041788263dabd47d68f2b\tci.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=spi705eb10611524301a1ce585d1c4971ca
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="spi705eb10611524301a1ce585d1c4971ca" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_94db59c962bd4bb8a0cbaf1e8748821b\812376a261834f90997cbfa340d6bbba\spi.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>exit
Execution of <C:\Users\Kikuchi\AppData\Local\Temp\processing_94db59c962bd4bb8a0cbaf1e8748821b\grassdata\grass_batch_job.cmd> finished.
Cleaning up temporary files...
処理は1.92秒で完了しました
結果:
{'accumulation': <QgsProcessingOutputLayerDefinition {'sink':G:/BUFFALO_みまもり合図/JIRCAS/GIS/GIS実習オープン教材/aso/15/flow_accumulation.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'basin': <QgsProcessingOutputLayerDefinition {'sink':G:/BUFFALO_みまもり合図/JIRCAS/GIS/GIS実習オープン教材/aso/15/watershed.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'drainage': <QgsProcessingOutputLayerDefinition {'sink':G:/BUFFALO_みまもり合図/JIRCAS/GIS/GIS実習オープン教材/aso/15/flow_direction.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'half_basin': <QgsProcessingOutputLayerDefinition {'sink':TEMPORARY_OUTPUT, 'createOptions': {'fileEncoding': 'System'}}>,
'length_slope': <QgsProcessingOutputLayerDefinition {'sink':TEMPORARY_OUTPUT, 'createOptions': {'fileEncoding': 'System'}}>,
'slope_steepness': <QgsProcessingOutputLayerDefinition {'sink':TEMPORARY_OUTPUT, 'createOptions': {'fileEncoding': 'System'}}>,
'spi': <QgsProcessingOutputLayerDefinition {'sink':TEMPORARY_OUTPUT, 'createOptions': {'fileEncoding': 'System'}}>,
'stream': <QgsProcessingOutputLayerDefinition {'sink':G:/BUFFALO_みまもり合図/JIRCAS/GIS/GIS実習オープン教材/aso/15/river.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'tci': <QgsProcessingOutputLayerDefinition {'sink':TEMPORARY_OUTPUT, 'createOptions': {'fileEncoding': 'System'}}>}

出力レイヤの読み込み
次のレイヤは正しく生成されませんでした。<ul><li>C:\Users\Kikuchi\AppData\Local\Temp/processing_94db59c962bd4bb8a0cbaf1e8748821b/55d95eae980041788263dabd47d68f2b/tci.tif</li><li>C:\Users\Kikuchi\AppData\Local\Temp/processing_94db59c962bd4bb8a0cbaf1e8748821b/67913ba58db6423b960a895d8703cb45/length_slope.tif</li><li>C:\Users\Kikuchi\AppData\Local\Temp/processing_94db59c962bd4bb8a0cbaf1e8748821b/812376a261834f90997cbfa340d6bbba/spi.tif</li><li>C:\Users\Kikuchi\AppData\Local\Temp/processing_94db59c962bd4bb8a0cbaf1e8748821b/856a552c3fee4309a28421a4b11c7f06/slope_steepness.tif</li><li>C:\Users\Kikuchi\AppData\Local\Temp/processing_94db59c962bd4bb8a0cbaf1e8748821b/db79ac52f86a40bababc73f2c82b132c/half_basin.tif</li><li>G:/BUFFALO_みまもり合図/JIRCAS/GIS/GIS実習オープン教材/aso/15/flow_accumulation.tif</li><li>G:/BUFFALO_みまもり合図/JIRCAS/GIS/GIS実習オープン教材/aso/15/flow_direction.tif</li><li>G:/BUFFALO_みまもり合図/JIRCAS/GIS/GIS実習オープン教材/aso/15/river.tif</li><li>G:/BUFFALO_みまもり合図/JIRCAS/GIS/GIS実習オープン教材/aso/15/watershed.tif</li></ul>QGISメインウィンドウの"ログメッセージパネル"をチェックすると、アルゴリズムの実行に関する詳細情報が表示されます。

福岡

unread,
May 11, 2020, 1:19:09 AM5/11/20
to QGIS初心者質問グループ
こんにちは
GRASSに関してはビギナーレベルですが、ググったり試したりしましたので報告いたします。

まず、「警告: マップセットの平行ロックはウィンドウズではサポートされていません。」についてです。
ググってみたところ、次のような情報が引っかかりました。

QGIS: Getting Concurrent mapset locking error using V.transform

V.transformに関する投稿ですが、同様のメッセージが出ているようです。
内容をGoogle翻訳大先生の力を借りて読むと「WindowsのQGISから実行されるすべてのGRASSアルゴリズムは、その警告を返す」とのことで、エラーでは無いとのことです。

次にログで気になったところですが、次のように日本語が文字化けしているところがあります。

input="G:\BUFFALO_縺ソ縺セ繧ゅj蜷亥峙\JIRCAS\GIS\GIS螳溽ソ偵が繝シ繝励Φ謨呎攝\aso\aso_2kei.tif"

これを見て、もしかすると2バイト文字が悪さをしている可能性があると思いました。
そこで手持ちのDEMファイルで試してみたところ、日本語がパスに含まれている場合に処理に失敗し、英数文字だけだった場合に処理が成功しました。

日本語を使ったフォルダがパスにあるのが原因だと思いました。 

ironma...@gmail.com

unread,
May 11, 2020, 8:34:21 PM5/11/20
to QGIS初心者質問グループ
ご検討頂き、大変ありがとうございます。

パスに日本語が含まれないようにフォルダ名を修正した上で再度実行しましたが、やはりログで「次のレイヤは正しく生成されませんでした。」と表示され、出力ファイルが生成されませんでした。

今回のログを、以下に載せます。

QGIS version: 3.10.3-A Coruna
QGIS code revision: 0e1f846438
Qt version: 5.11.2
GDAL version: 3.0.4
GEOS version: 3.8.0-CAPI-1.13.1 
PROJ version: Rel. 6.3.1, February 10th, 2020
プロセシングアルゴリズム...
アルゴリズム 'r.watershed' を開始しています...
入力パラメータ:
{ '-4' : False, '-a' : False, '-b' : False, '-m' : False, '-s' : False, 'GRASS_RASTER_FORMAT_META' : '', 'GRASS_RASTER_FORMAT_OPT' : '', 'GRASS_REGION_CELLSIZE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None, 'accumulation' : 'G:/gis_data/aso/15/accumulation.tif', 'basin' : 'G:/gis_data/aso/15/watershed.tif', 'blocking' : None, 'convergence' : 5, 'depression' : None, 'disturbed_land' : None, 'drainage' : 'G:/gis_data/aso/15/direction.tif', 'elevation' : 'G:/gis_data/aso/aso_2kei.tif', 'flow' : None, 'half_basin' : 'TEMPORARY_OUTPUT', 'length_slope' : 'TEMPORARY_OUTPUT', 'max_slope_length' : None, 'memory' : 300, 'slope_steepness' : 'TEMPORARY_OUTPUT', 'spi' : 'TEMPORARY_OUTPUT', 'stream' : 'G:/gis_data/aso/15/river.tif', 'tci' : 'TEMPORARY_OUTPUT', 'threshold' : 10000 }

g.proj -c proj4="+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
r.external input="G:\gis_data\aso\aso_2kei.tif" band=1 output="rast_5eb9ed313f1423" --overwrite -o
g.region n=10055.676521650157 s=-42936.90270436218 e=34820.919690261355 w=-24900.432767294173 res=27.92022087777257
r.watershed elevation=rast_5eb9ed313f1423 threshold=10000 convergence=5 memory=300 accumulation=accumulationdf62eac7766d4152b8fed58dbadfa8cf drainage=drainagedf62eac7766d4152b8fed58dbadfa8cf basin=basindf62eac7766d4152b8fed58dbadfa8cf stream=streamdf62eac7766d4152b8fed58dbadfa8cf half_basin=half_basindf62eac7766d4152b8fed58dbadfa8cf length_slope=length_slopedf62eac7766d4152b8fed58dbadfa8cf slope_steepness=slope_steepnessdf62eac7766d4152b8fed58dbadfa8cf tci=tcidf62eac7766d4152b8fed58dbadfa8cf spi=spidf62eac7766d4152b8fed58dbadfa8cf --overwrite
g.region raster=accumulationdf62eac7766d4152b8fed58dbadfa8cf
r.out.gdal -t -m input="accumulationdf62eac7766d4152b8fed58dbadfa8cf" output="G:\gis_data\aso\15\accumulation.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=drainagedf62eac7766d4152b8fed58dbadfa8cf
r.out.gdal -t -m input="drainagedf62eac7766d4152b8fed58dbadfa8cf" output="G:\gis_data\aso\15\direction.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=basindf62eac7766d4152b8fed58dbadfa8cf
r.out.gdal -t -m input="basindf62eac7766d4152b8fed58dbadfa8cf" output="G:\gis_data\aso\15\watershed.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=streamdf62eac7766d4152b8fed58dbadfa8cf
r.out.gdal -t -m input="streamdf62eac7766d4152b8fed58dbadfa8cf" output="G:\gis_data\aso\15\river.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=half_basindf62eac7766d4152b8fed58dbadfa8cf
r.out.gdal -t -m input="half_basindf62eac7766d4152b8fed58dbadfa8cf" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_67abfa1df51044ccafac3a3197664bd5\99f5296bef5244428dc2f571ad9029b0\half_basin.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=length_slopedf62eac7766d4152b8fed58dbadfa8cf
r.out.gdal -t -m input="length_slopedf62eac7766d4152b8fed58dbadfa8cf" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_67abfa1df51044ccafac3a3197664bd5\b8aa0c2332d0436eb6609575184232a9\length_slope.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=slope_steepnessdf62eac7766d4152b8fed58dbadfa8cf
r.out.gdal -t -m input="slope_steepnessdf62eac7766d4152b8fed58dbadfa8cf" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_67abfa1df51044ccafac3a3197664bd5\78e08b148a724c7caff6d4c35e5ca266\slope_steepness.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=tcidf62eac7766d4152b8fed58dbadfa8cf
r.out.gdal -t -m input="tcidf62eac7766d4152b8fed58dbadfa8cf" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_67abfa1df51044ccafac3a3197664bd5\3880e846f3854c5ab4daaf830cd4bb40\tci.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=spidf62eac7766d4152b8fed58dbadfa8cf
r.out.gdal -t -m input="spidf62eac7766d4152b8fed58dbadfa8cf" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_67abfa1df51044ccafac3a3197664bd5\d2f5cfd2c7434d05bcb79c7274dab9af\spi.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
Starting GRASS GIS...
警告: マップセットの平行ロックはウィンドウズではサポートされていません。
一時ファイルを削除しています...
Executing <C:\Users\Kikuchi\AppData\Local\Temp\processing_67abfa1df51044ccafac3a3197664bd5\grassdata\grass_batch_job.cmd> ...
C:\Users\Kikuchi\Documents>chcp 932 1>NUL
C:\Users\Kikuchi\Documents>g.proj -c proj4="+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
C:\Users\Kikuchi\Documents>r.external input="G:\gis_data\aso\aso_2kei.tif" band=1 output="rast_5eb9ed313f1423" --overwrite -o
C:\Users\Kikuchi\Documents>g.region n=10055.676521650157 s=-42936.90270436218 e=34820.919690261355 w=-24900.432767294173 res=27.92022087777257
C:\Users\Kikuchi\Documents>r.watershed elevation=rast_5eb9ed313f1423 threshold=10000 convergence=5 memory=300 accumulation=accumulationdf62eac7766d4152b8fed58dbadfa8cf drainage=drainagedf62eac7766d4152b8fed58dbadfa8cf basin=basindf62eac7766d4152b8fed58dbadfa8cf stream=streamdf62eac7766d4152b8fed58dbadfa8cf half_basin=half_basindf62eac7766d4152b8fed58dbadfa8cf length_slope=length_slopedf62eac7766d4152b8fed58dbadfa8cf slope_steepness=slope_steepnessdf62eac7766d4152b8fed58dbadfa8cf tci=tcidf62eac7766d4152b8fed58dbadfa8cf spi=spidf62eac7766d4152b8fed58dbadfa8cf --overwrite
C:\Users\Kikuchi\Documents>g.region raster=accumulationdf62eac7766d4152b8fed58dbadfa8cf
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="accumulationdf62eac7766d4152b8fed58dbadfa8cf" output="G:\gis_data\aso\15\accumulation.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=drainagedf62eac7766d4152b8fed58dbadfa8cf
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="drainagedf62eac7766d4152b8fed58dbadfa8cf" output="G:\gis_data\aso\15\direction.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=basindf62eac7766d4152b8fed58dbadfa8cf
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="basindf62eac7766d4152b8fed58dbadfa8cf" output="G:\gis_data\aso\15\watershed.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=streamdf62eac7766d4152b8fed58dbadfa8cf
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="streamdf62eac7766d4152b8fed58dbadfa8cf" output="G:\gis_data\aso\15\river.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=half_basindf62eac7766d4152b8fed58dbadfa8cf
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="half_basindf62eac7766d4152b8fed58dbadfa8cf" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_67abfa1df51044ccafac3a3197664bd5\99f5296bef5244428dc2f571ad9029b0\half_basin.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=length_slopedf62eac7766d4152b8fed58dbadfa8cf
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="length_slopedf62eac7766d4152b8fed58dbadfa8cf" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_67abfa1df51044ccafac3a3197664bd5\b8aa0c2332d0436eb6609575184232a9\length_slope.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=slope_steepnessdf62eac7766d4152b8fed58dbadfa8cf
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="slope_steepnessdf62eac7766d4152b8fed58dbadfa8cf" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_67abfa1df51044ccafac3a3197664bd5\78e08b148a724c7caff6d4c35e5ca266\slope_steepness.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=tcidf62eac7766d4152b8fed58dbadfa8cf
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="tcidf62eac7766d4152b8fed58dbadfa8cf" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_67abfa1df51044ccafac3a3197664bd5\3880e846f3854c5ab4daaf830cd4bb40\tci.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>g.region raster=spidf62eac7766d4152b8fed58dbadfa8cf
C:\Users\Kikuchi\Documents>r.out.gdal -t -m input="spidf62eac7766d4152b8fed58dbadfa8cf" output="C:\Users\Kikuchi\AppData\Local\Temp\processing_67abfa1df51044ccafac3a3197664bd5\d2f5cfd2c7434d05bcb79c7274dab9af\spi.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
C:\Users\Kikuchi\Documents>exit
Execution of <C:\Users\Kikuchi\AppData\Local\Temp\processing_67abfa1df51044ccafac3a3197664bd5\grassdata\grass_batch_job.cmd> finished.
Cleaning up temporary files...
処理は1.88秒で完了しました
結果:
{'accumulation': <QgsProcessingOutputLayerDefinition {'sink':G:/gis_data/aso/15/accumulation.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'basin': <QgsProcessingOutputLayerDefinition {'sink':G:/gis_data/aso/15/watershed.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'drainage': <QgsProcessingOutputLayerDefinition {'sink':G:/gis_data/aso/15/direction.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'half_basin': <QgsProcessingOutputLayerDefinition {'sink':TEMPORARY_OUTPUT, 'createOptions': {'fileEncoding': 'System'}}>,
'length_slope': <QgsProcessingOutputLayerDefinition {'sink':TEMPORARY_OUTPUT, 'createOptions': {'fileEncoding': 'System'}}>,
'slope_steepness': <QgsProcessingOutputLayerDefinition {'sink':TEMPORARY_OUTPUT, 'createOptions': {'fileEncoding': 'System'}}>,
'spi': <QgsProcessingOutputLayerDefinition {'sink':TEMPORARY_OUTPUT, 'createOptions': {'fileEncoding': 'System'}}>,
'stream': <QgsProcessingOutputLayerDefinition {'sink':G:/gis_data/aso/15/river.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'tci': <QgsProcessingOutputLayerDefinition {'sink':TEMPORARY_OUTPUT, 'createOptions': {'fileEncoding': 'System'}}>}

出力レイヤの読み込み
次のレイヤは正しく生成されませんでした。<ul><li>G:/gis_data/aso/15/accumulation.tif</li><li>G:/gis_data/aso/15/direction.tif</li><li>G:/gis_data/aso/15/river.tif</li><li>G:/gis_data/aso/15/watershed.tif</li></ul>QGISメインウィンドウの"ログメッセージパネル"をチェックすると、アルゴリズムの実行に関する詳細情報が表示されます。

福岡

unread,
May 11, 2020, 10:10:20 PM5/11/20
to QGIS初心者質問グループ
菊地 様

こんにちは
データセットをダウンロードして「aso_2kei.tif」で試したみました。

次のようなエラーメッセージをログに残しますが、結果として出力は正常のようでした。
ERROR 6: SetColorTable() only supported for Byte or UInt16 bands in TIFF format.

ログを見比べたところ、私が面倒くさがってアウトプットを一時ファイルにしたところ以外は、設定に差は無いように感じます。
何が原因なんでしょう?参考になるかわかりませんが、ログのテキストファイルを添付します。

動作環境
Windows10 Pro 64bit
プロセッサ:Core i7-4790
搭載メモリ:16GB

QGIS3.10.5 with GRASS7(スタンドアロン版:64bit)
ログファイル.txt

福岡

unread,
May 12, 2020, 4:28:28 AM5/12/20
to QGIS初心者質問グループ
菊地 様

お役に立たなくて申し訳ありません。m(__)m
当たればラッキー程度のアイディアですが、他に投稿が寄せられていないようですので投稿いたします。

1 最もシンプルに処理してみる
(1)aso_2kei.tifをデスクトップにコピーし、QGISへ読み込む
(2)r.watershedを立ち上げる
(3)デフォルト以外の設定は「外部流域(exterior basin)の最小サイズ」を「10000」
(4)出力ファイルは、のチェックは最初の4つだけにして、その他はチェックを外す
(5)出力ファイルはパスやファイル名を設定せず、「一時ファイルへの保存」のままにしておく

目的はパスやファイルに関しての問題回避です。
これで正常に出力された場合、出力先フォルダに処理を阻害する何らかのファイルがあることなどが原因として考えられます。

2 最新バージョンへのアップデート
 スタンドアロンしか使っていませんが、アップデートは思ったよりも簡単にできます。
 最新の安定版インストール用ファイルをダウンロードします。これをダブルクリックすると、旧版のアンインストールから最新版のインストールをしてくれます。

目的は旧版にバグがあった場合に、これを解消することです。
私の環境(QGIS3.10.5 with GRASS7)では処理ができましたので、可能性は低いと思いますが念のため記載しておきます。

ironma...@gmail.com

unread,
May 12, 2020, 9:05:31 PM5/12/20
to QGIS初心者質問グループ
福岡様


様々にご検討頂きまして、大変ありがとうございます。

ご教示頂いたアイデアのうち、「2 最新バージョンへのアップデート」について、別のPCにインストールされている最新版(QGIS Desktop 3.10.5 with GRASS 7.8.2)で試してみたところ、同じようにエラーメッセージが出たものの、正常に出力されました。したがって、エラーが発生した要因の1つとして、旧版にバグがあった可能性が考えられます。

エラーが発生したPCでも、最新バージョンにアップデートして正常に処理ができるかどうか、確認してみます。(その前に、「1 最もシンプルに処理してみる」も試してみたいと思います。)

どうもありがとうございました。

Reply all
Reply to author
Forward
0 new messages