POST
|
I have geoprocessing service which produces a MapImageLayer as the result. I execute the asynchronously using the JavaScript API method "submitJob" method. var gpTask = new Geoprocessor(gpTaskUrl);
gpTask.outSpatialReference = {
wkid: 102100
};
gpTask.submitJob(params).then(drawResultData, errBack); It GP task is executed successfully all the time, I see it when I check the server using the job ID. But the resulting map image layer is loaded only in some cases, otherwise I see an error. Specially when the layer is loaded successfully, if I zoom into a specific area there is an increase probability to see the same error. [esri.views.2d.layers.MapImageLayerView2D] e
{ name: "dynamiclayer:image-fetch-error",
message: "Unable to load image: https://arcgis.<domain>…at=png32&transparent=true&layers=show%3A0&f=image",
details: {…}} The failed request is: https://arcgis.<domain>/arcsrv/rest/services/<ResultMapServiceName>/MapServer/jobs/je13d9121d0ee4270894ebd01f66758a1/export?bbox=-14177540.562098123%2C1761435.9140478536%2C-4784958.526418162%2C6990951.641205082&bboxSR=102100&imageSR=102100&size=1920%2C1069&dpi=96&format=png32&transparent=true&layers=show%3A0&f=image This request is made internally as a result of the map loading process. I found another interesting thing here. If I go to the GP job using the browser and refresh it, then it starts working even in the web app. This is the way I check the job inside the server. https://arcgis.<domain>/arcsrv/rest/services/<GPServiceName>/GPServer/<GPTaskName>/jobs/je13d9121d0ee4270894ebd01f66758a1 I have already checked the timeout/clean up rules applicable in this GP scenario, it seems they have no impact in this case. I use JS API 4.6, appreciate any help here.
... View more
02-06-2018
12:39 PM
|
0
|
0
|
1814
|
POST
|
I had a support ticket for this with Esri. This is the summary of what we discovered at the end. 1. Resampling raster function does not offer an "output pixel size" parameter. It is usability issue, so Esri support team will add a usability bug for this. Whenever resampling function is going to have that parameter, resampling with filtered (and locked) rasters will work. BUG-000110653: Incorporate functionality to allow a user to specify output cell size with the resample raster function in the Python API. 2. Since copy_raster is not a raster function (not included in arcgis.raster.functions), filtered and locked rasters are not honored when copy_raster is executed. So copy_raster is not useful in this case. 3. There is no workaround for this at the moment using ArcGIS Python API. One can use ArcGIS Pro "resample" raster function for this. But please note that "average", "majority" and some other resampling types produce some erroneous results, "bilinear" and "nearest neighbor" work perfectly well.
... View more
01-08-2018
12:19 PM
|
0
|
0
|
722
|
POST
|
When I load an Image Service (from a mosaic dataset) from ArcGIS Server into ArcGIS Pro, view is very blurred. Even if I zoom in, I do not see the individual pixels clearly. But, after downloading that same image using the copy raster function I see a perfectly clear view. Resolution, pixel size, stretching and symbology are same in both cases. I have tried to lock viewing rasters to few non-overview (primary) rasters, but it makes no change. This badly affects the imagery users as they see low quality views unless they download and view data by themselves. Is this the general situation or is there something configurable to fix this? Appreciate any idea to improve the viewing quality.
... View more
01-05-2018
10:32 AM
|
0
|
2
|
2996
|
POST
|
Hi all, I ran into another Imagery Layer raster analysis issue, appreciate if you can provide any help. I am using ArcGIS Pro's "Resample" raster function to resample an imagery layer (time enabled). I run the resampling using Image Server raster analysis, result is saved as Imagery Layer (hosted). When I use "Bilinear" ResamplingType, it works, but it does not work with "Average" and produces a really bad result like the following one. When I use "Majority" as the ResamplingType, it throws the following error. {"messageCode": "RA_120001", "message": "Distributed Raster Analysis failed. ERROR 999999: Error executing function.\nFailed to open raster dataset\nFailed to execute (GenerateRasterFromRasterFunction).\n."} Failed to execute (GenerateRaster). Failed. Further, whenever the resampling works with bilinear, provided output pixel size is auto adjusted (like 1000m into 999.88523...m), there is no way to make this right other than providing the output cell size under "settings" which applies for the environment. But I suspect that it resamples the already resampled data to convert pixel into the right size (from 999.88523...m into 1000m). There is an explanation in the doc for this, but it does not provide any solution. "The cell size can be changed, but the extent of the raster dataset will remain the same. Resampling from a user-defined cell size can be much slower than the system default, since the system default resampling processes the minimum amount of data from the closest possible resolution." - Resample function—ArcGIS Pro | ArcGIS Desktop
... View more
01-03-2018
11:08 AM
|
0
|
0
|
777
|
POST
|
Now I'm going to run it as a raster function as shown in the ArcGIS REST API. {
"rasterFunction" : "Resample",
"rasterFunctionArguments" : {
"ResamplingType" : <ResamplingType>, //0=NearestNeighbor,1=Bilinear,2=Cubic,3=Majority,
4=BilinearInterpolationPlus,5=BilinearGaussBlur, 6=BilinearGaussBlurPlus
7=Average, 8=Minimum, 9=Maximum,10=VectorAverage(require two bands)
"InputCellsize" : <InputCellsize>, //point that defines cellsize in source spatial reference
},
"outputPixelType" : "<outputPixelType>",//optional
"variableName" : "Raster"
} But I already got another issue while running this same thing through ArcGIS Pro. Even if this is going to work to some extent, I still need to solve the other problem to get this solved meaningfully. Imagery Layer Resampling Issues
... View more
12-20-2017
11:55 AM
|
0
|
1
|
722
|
POST
|
Hi all, I ran into another Imagery Layer raster analysis issue, appreciate if you can provide any help. I am using ArcGIS Pro's "Resample" raster function to resample an imagery layer (time enabled). I run the resampling using Image Server raster analysis, result is saved as Imagery Layer (hosted). When I use "Bilinear" ResamplingType, it works, but it does not work with "Average" and produces a really bad result like the following one. When I use "Majority" as the ResamplingType, it throws the following error. {"messageCode": "RA_120001", "message": "Distributed Raster Analysis failed. ERROR 999999: Error executing function.\nFailed to open raster dataset\nFailed to execute (GenerateRasterFromRasterFunction).\n."} Failed to execute (GenerateRaster). Failed. Further, whenever the resampling works with bilinear, provided output pixel size is auto adjusted (like 1000m into 999.88523...m), there is no way to make this right other than providing the output cell size under "settings" which applies for the environment. But I suspect that it resamples the already resampled data to convert pixel into the right size (from 999.88523...m into 1000m). There is an explanation in the doc for this, but it does not provide any solution. The cell size can be changed, but the extent of the raster dataset will remain the same. Resampling from a user-defined cell size can be much slower than the system default, since the system default resampling processes the minimum amount of data from the closest possible resolution - Resample function—ArcGIS Pro | ArcGIS Desktop
... View more
12-20-2017
11:50 AM
|
0
|
0
|
1038
|
POST
|
I have a time-enabled MODIS NPP imagery layer for CONUS hosted in our ArcGIS Server. I need to query the tiles resides within the mosaic dataset using some attribute table properties including the time. Then I need to resample the selected tiles into different pixel size and save them as another Imagery layer or a single file. I used arcgis.raster.ImageryLayer.set_filter() function to filter out and lock the necessary tiles as follows. npp_layer.set_filter(where="((hor=8 OR hor=9) AND ver=5) AND Category=1", time=[datetime(2014,1,1),datetime(2014,12,31)], lock_rasters=True, clear_filters=False)
resampled_layer = copy_raster(npp_layer, output_cellsize=2000, resampling_method='NEAREST', output_name='resampled_npp') Then used above arcgis.raster.analytics.copy_raster() function to resample the selected tiles in the imagery layer and save them as new layer. But "set_filter" filtered and locked rasters are not identified by the "copy_raster" function, so the resampling is applied to all the tiles across all the years. It makes a spatially and temporally incorrect result. I see a arcgis.raster.functions.resample() function, but it does not have a "output_pixel_size" parameter, so it becomes useless in my case. I tried using "arcgis.raster.ImageryLayer.filter_by" and "arcgis.raster.ImageryLayer.mosaic_by" functions for filtering as well, but with no success. Following is my complete code : import arcgis
from arcgis.gis import GIS
from arcgis.raster import ImageryLayer
from arcgis.raster.functions import *
from arcgis.raster.analytics import *
from datetime import datetime
gis = GIS('https://arcgis.<domain>/portal', '<user_name>', 'password')
img_svc_url = 'https://arcsrv-prd-02.<domain>:6443/arcgis/rest/services/ANLN-ImageServices/annual_npp/ImageServer'
npp_layer = ImageryLayer(img_svc_url)
npp_layer.set_filter(where="((hor=8 OR hor=9) AND ver=5) AND Category=1", time=[datetime(2014,1,1),datetime(2014,12,31)], lock_rasters=True, clear_filters=False)
resampled_layer = copy_raster(npp_layer, output_cellsize=2000, resampling_method='NEAREST', output_name='resampled_npp')
print(new_ras_layer.properties)
mymap = gis.map("Los Angeles, US", zoomlevel=6)
mymap.add_layer(resampled_layer)
mymap This filtering and resampling work fine with ArcGIS Pro with Image Server Raster Analysis, but I can't figure it out how to do it with Python API. I am using ArcGIS Server 10.5, ArcGIS Python API 1.2.4, ArcMap 10.5 and ArcGIS Pro products. I am new to ArcGIS Python API, appreciate any help to solve this problem. Update: There are Imagery layer resampling issues even with ArcGIS Pro. I see that some resampling algorithms like "bilinear" and "nearest neighbor" work, but "average" and "majority" do not work.
... View more
12-12-2017
11:07 AM
|
0
|
2
|
1061
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|