Select to view content in your preferred language

Share image as map image layer in portal from python.

387
0
03-15-2019 01:06 AM
SAINSGIS
New Contributor

Hi,

  I am new in ArcGIS and in this forum.  Now I need to write a web function in Asp.Net to do web georeferencing.  I wanted to share my image file (e.g. *.png) to ArcGIS Portal as Map Image Layer so that I can use ArcGIS API for JavaScript to load the layer into Map View for user to capture the control points.

  I am using ArcGIS Server (Federated)/Portal 10.6.1, both running on Windows and ArcGIS Pro 2.3.1, ModelBuilder to run my python code.  My code is able to add image into aprx file, create sddraft file, sd file and using arcpy.UploadServiceDefinition_server() function to share my image to Portal without any problem.

 I have created the same folder in ArcGIS Server with the image file and ArcGIS Pro project file. (*.aprx) for testing purpose.  I have also set the read/write permission to the folder.  After I shared my ModelBuilder as web tool and run it from Portal.  It hits error at last statement.

  • esriJobMessageTypeInformative: 14/03/2019 15:32:20 : Failed to execute. Parameters are not valid. ERROR 000732: Server: Dataset https://<arcgis server path>:6443/arcgis does not exist or is not supported Failed to execute (UploadServiceDefinition).

I have tried to pass in AGS file (created from ArcGIS Pro) but it does not work as well.  I could not find any arcpy.mp function to create AGS in python.  I also cannot find any suitable ArcGIS Server REST API to share image as Map Image Layer.  I do not have ArcGIS Image Server license.  Therefore, I cannot use API that required ArcGIS Image Server.

Could anyone share with me what is the correct way to do share image as Map Image Layer?  Is there any better way to do web georeferencing?  

Thank You

0 Kudos
0 Replies