Hi All,
It seems that I found the issue. Unfortunately, It must be a bug in Runtime 10.2.4. After having enabled logging in LocalServer Utility, It turned out that ArcGIS Runtime sent a wrong-encoded request to the REST endpoint. There are many extra " and \ signs, which make the request invalid.
Here is the wrong request made by Runtime:
submitJob?input_rasters=["{\"format\":\"tif\",\"url\":\"http://localhost/lot1.tif\"}","{\"format\":\"tif\",\"url\":\"http://localhost/lot2.tif\"}","{\"format\":\"tif\",\"url\":\"http://localhost/lot3.tif\"}","{\"format\":\"tif\",\"url\":\"http://localhost/lot4.tif\"}"]&returnZ=false&returnM=false&f=json
|The good request is below (tested in REST API endpoint):
submitJob?input_rasters=[{ "url" : "http://localhost/lot1.tif", "format" : "tif" },{ "url" : "http://localhost/lot2.tif", "format" : "tif" },{ "url" : "http://localhost/lot3.tif", "format" : "tif" }]&returnZ=false&returnM=false&f=json
Moreover, I would like to point out a few things:
1) Rest API, apparently, supports local path to the GPRasterDataLayer parameter in the following format
{ "url" : "C:/Tools/ChangeDetection/zm1wgs.tif", "format" : "tif" }.
However, ArcGIS Runtime SDK 10.2.4 does NOT. When using "file:///
" prefix, Runtime creates this json:
{ "url" : "file:/C:/Tools/ChangeDetection/zm1wgs.tif", "format" : "tif" }
which is in fact incorrect path.
2) "Mosaic To New Raster' tool is not supported when creating GPK from ArcGIS Desktop 10.3.1 (with MPK patch installed). Runtime shows the error: ERROR 000816: The tool is not valid. This must be a bug as well. When creating the same GPK from ArcGIS 10.2.2, the tool works as expected.
3) The input GPRasterDataLayer geoprocessing parameters can be defined as below. It works just fine
GPRasterDataLayer rasterAfter = new GPRasterDataLayer("rasterAfter");
rasterAfter.setRasterDataUrl("http://localhost/zm1wgs.tif");
rasterAfter.setFormat("tif");
I hope, you find these comments useful,
Regards,
Adam
Użyj zaawansowanego edytora