POST
|
Hello, I am trying to clone the python environment on ArcGIS Server (10.9), add custom libraries to it and finally specify the environment to a single gp service. I have referred to the following link to achieve this (https://enterprise.arcgis.com/en/server/latest/publish-services/windows/deploying-custom-python-pack... However, when I change the "condaEnvironmentPath" to the specified path (eg: "C:\\Program Files\\ArcGIS\\Server\\framework\\runtime\\ArcGIS\\bin\\Python\\envs\\deploy"), it automatically changes the initial part of the path to "${AGSSEREVER}". Please refer to the image below: Due to this, I feel the gp service is not picking up the right environment and hence when I run the gp service, I get an error stating the custom libraries/modules are not found. Please advise on how to proceed further and resolve this issue. Thanks in advance!
... View more
08-31-2022
09:38 PM
|
0
|
1
|
407
|
POST
|
Hello, I am trying to clone the python environment on ArcGIS Server (10.9), add custom libraries to it and finally specify the environment to a single gp service. I have referred to the following link to achieve this (https://enterprise.arcgis.com/en/server/latest/publish-services/windows/deploying-custom-python-packages.htm#) However, when I change the "condaEnvironmentPath" to the specified path (eg: "C:\\Program Files\\ArcGIS\\Server\\framework\\runtime\\ArcGIS\\bin\\Python\\envs\\deploy"), it automatically changes the initial part of the path to "${AGSSEREVER}". Please refer to the image below: Due to this, I feel the gp service is not picking up the right environment and hence when I run the gp service, I get an error stating the custom libraries/modules are not found. Please advise on how to proceed further and resolve this issue. Thanks in advance!
... View more
08-31-2022
01:24 AM
|
0
|
0
|
350
|
POST
|
Hello, I have created a script that runs as a GP tool on ArcGIS Pro. The script creates a new hubsite on ArcGIS Enterprise. I am using the following versions: ArcGIS Pro 3.0 ArcGIS Python API 2.0.1 ArcGIS Hub 2.1.0 (installed as per the given link: https://www.esri.com/arcgis-blog/products/arcgis-hub/announcements/introducing-arcgis-hub-python-api-for-sites/) ArcGIS Enterprise 10.9.1 and 11 (have tested tool on both the enterprise versions) However, when I try to run the following lines of code as part of my script import arcgishub
from arcgishub import hub
target_hub = hub.Hub(url=portal_url, username=username, password=password, verify_cert=False)
hub_site_item_title = "Test Site"
new_initiative = target_hub.sites.add(hub_site_item_title) I get the below error: Exception: Unable to create group.
You do not have permission to create groups with external members.
(Error Code: 400) But the same lines of code work with the older version of ArcGIS Python API (1.8.5) and ArcGIS Pro (2.8.2) on ArcGIS Enterprise 10.9.1 and 11 Please help! Thanks!
... View more
08-03-2022
05:03 AM
|
0
|
0
|
274
|
POST
|
Hello, I have updated the code and attached the recent zipped file. I am now able to chain the raster functions and display the image (attached below), though not entirely sure if the output is correct. I would like to know if there is a way to display (render) the positive and negative change (that is, display the increase/decrease post the Minus arithmetic operation). Would using a custom raster function be a good idea? Is it possible to do so? Thanks!
... View more
02-15-2022
07:04 AM
|
0
|
1
|
1091
|
POST
|
Hello, Yes, I will be using a UI to pick the years. The image service has a limited number of rasters and therefore I can pick the objectId for each corresponding year. The major issue that I am facing is with displaying the output of the raster function. I am still unsure if using a renderingRule is the way to go about it. I have used the snippet that you have provided and I get a black image as output. I have attached the image and code (zipped file) for your reference. As suggested, if I have to chain the raster functions as follows: arithmetic --> remap --> colormap. How do I use output of previous raster function in the following function and how do I finally display the result image? Thank you so much for helping me out!
... View more
02-14-2022
08:31 PM
|
0
|
2
|
1099
|
POST
|
Thank you for your response! I am still unable to understand how to display the output of the raster function. The output is dynamic and must be generated on the fly.
... View more
02-14-2022
08:40 AM
|
0
|
4
|
1123
|
POST
|
Hello, I have an image service ( mosaic of time dimensional imagery). I want to apply the Minus function (subtraction) to two slices from the image service and display the output. How do I do this? I would also like to do change detection using the same two slices, please suggest how to go about it? I have provided the code that I am currently using to do the above but the result is incorrect, please help! I am using ArcGIS JS API 4.22 require([
"esri/Map",
"esri/views/MapView",
"esri/layers/support/MosaicRule",
"esri/layers/ImageryLayer",
"esri/layers/support/RasterFunction",
"esri/layers/support/ImageParameters",
"esri/layers/MapImageLayer"
], (Map, MapView, MosaicRule, ImageryLayer, RasterFunction, ImageParameters, MapImageLayer) => {
const year1 = "Reclass_IntYear2015";
const mr1 = new MosaicRule({
where: "name='" + year1 + "'"
});
const year2 = "Reclass_IntYear2020";
const mr2 = new MosaicRule({
where: "name='" + year2 + "'"
});
const layer1 = new ImageryLayer({
url: imageServiceURL,
mosaicRule: mr1
});
const layer2 = new ImageryLayer({
url: imageServiceURL,
mosaicRule: mr2
});
const map = new Map({
basemap: "hybrid",
});
const view1 = new MapView({
container: "viewDiv",
map: map,
center: {
x: 87.976322,
y: 24.04582,
spatialReference: 4326
},
zoom: 10,
popup: {
actions: []
},
});
minusRF = new RasterFunction();
minusRF.functionName = "Arithmetic";
minusRF.outputPixelType = "F32";
minusRF.functionArguments = {
"Raster" : layer1,
"Raster2" : layer2,
"Operation" : "2",
"ExtentType" : 0,
"CellsizeType" : 1}
const changeDetectionLayer = new ImageryLayer({
url: imageServiceURL,
id: "resultLayer",
);
changeDetectionLayer.renderingRule = minusRF
map.add(changeDetectionLayer);
... View more
02-14-2022
05:39 AM
|
1
|
7
|
1153
|
POST
|
Hello, I am unable to clone the workforce project from one ArcGIS portal to another portal (or AGOL account). I have deleted all workers, dispatchers, assignments, assignment types, and assignment integrations yet I am unable to clone the project . I am using the feature collection item id to clone (as I have observed it is the same as the item id displayed for the workforce project). I get the following error. I have checked my credentials and they have been entered correctly. I have also tried to login and out of my accounts but that still does not resolve the issue. Exception: Invalid Token
(Error Code: 498) Please advise... Thanks in advance!
... View more
12-15-2021
11:27 PM
|
0
|
1
|
495
|
POST
|
Issue resolved. Issue Identified: I was unable to make a connection to my ArcGIS Portal using the GIS object from ArcGIS Python API. Solution: Refer to this link: https://support.esri.com/en/technical-article/000022882
... View more
10-26-2021
02:03 AM
|
0
|
0
|
492
|
POST
|
Hello, I am unable to use the GP service that I have published and I get the below error. I have tried Registering my data source with the server (though all the input parameters are strings) Cloning a separate environment with all the required packages to run this particular tool Please advise, thanks!
... View more
10-24-2021
09:13 PM
|
0
|
1
|
524
|
POST
|
Hello, I am unable to publish my custom python tool as a geoprocessing service to my ArcGIS Server from ArcGIS Pro. I am using the 'Share As Web Tool' option, I have also tried using the 'Geoprocessing Package' option, but it fails in both the cases. I have attached a screenshot of the logs generated on ArcGIS Pro below. I have restarted my services on the ArcGIS Server, updated ArcGIS Pro to the latest version, tried publishing the tool with and without a map and have also ensured that the file paths are short, but I am still unable to publish the tool. Please advise, thanks!
... View more
10-15-2021
04:53 AM
|
0
|
0
|
538
|
POST
|
Hello, I am unable to publish my custom python tool as a geoprocessing service to my ArcGIS Server from ArcGIS Pro. I am using the 'Share As Web Tool' option, I have also tried using the 'Geoprocessing Package' option, but it fails in both the cases. I have attached a screenshot of the logs generated on ArcGIS Pro below. I have restarted my services on the ArcGIS Server, updated ArcGIS Pro to the latest version, tried publishing the tool with and without a map and have also ensured that the file paths are short, but I am still unable to publish the tool. Please advise, thanks!
... View more
10-15-2021
04:52 AM
|
0
|
2
|
655
|
POST
|
Hello, I am trying to remove a set of layers from a web map and add them back later. Since the layers consist of a mix of feature services and image services, I feel the easiest way to do this would be by manipulation the json of the web map. When I use AGOL assisstant, I am able to achieve the above, however when I try to do the same using ArcGIS Python API, it does not work. I am using the code below to achieve the above, though post executing the update command I get 'True', the layers are not removed from the web map. I have also attached screenshot for reference web_map = source.content.get(itemid)
data = web_map.get_data()
rem_j = []
for i in data['operationalLayers']:
if i['url'].find('mygishub') == -1:
rem_j.append(i)
data['operationalLayers'].remove(i)
web_map.update(item_properties=data) I have also tried to achieve the same by using the WebMap object, but it still does not work. Have attached screenshot and code for reference. web_map = source.content.get(itemid)
web_map_obj = WebMap(web_map)
rem_j = []
for i in web_map_obj.layers:
if i['url'].find('mygishub') == -1:
rem_j.append(i)
web_map_obj.layers.remove(i)
web_map_obj.update() Note: I have not used the add_layer and remove_layer methods here. I am aware that the remove layer method accepts a layer object (i.e., webmap.layers[id]), this approach works for removing layers but when it comes to adding a mixture of feature services and image services as layers using their urls, I have to find the type of service and then create a FeatureLayer or ImageryLayer object accordingly for each url and finally add them to the webmap, which I feel is not very efficient as I have a large number of layers.
... View more
08-12-2021
04:31 AM
|
0
|
2
|
1568
|
Title | Kudos | Posted |
---|---|---|
1 | 02-14-2022 05:39 AM | |
1 | 07-23-2021 03:47 AM | |
1 | 07-23-2021 03:46 AM | |
1 | 07-30-2021 02:02 AM |
Online Status |
Offline
|
Date Last Visited |
09-01-2022
05:40 AM
|