Skip to main content
Question

Creating an ESRI Feature Layer using Python

  • October 26, 2016
  • 2 replies
  • 106 views

geospatiallover
Participant
Forum|alt.badge.img+6

I wonder if anyone has used the Python Caller transformer to create an ESRI feature layer using ArcPY or ArcRest to publish the feature layer in AGOL, Portal or ArcGIS server. I'd be interested to work together with anyone who has a use case for this. With Portal or AGOL writer I could create a feature service but I want my service to be rendered with the appropriate layer properties so all the user need to do is add the feature layer on a web map in Portal or AGOL. An appropriate SD file created from an MXD or lyr file would be necessary to store the layer properties.

Per FME documentation: AGOL writer layer creation is not supported.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

ngoorman
Contributor
Forum|alt.badge.img+3
  • Contributor
  • October 27, 2016

Just to clarify, do you want to create a new feature service, or just add a layer onto an existing service? The FME AGOL writer can do the former, but not the latter.

Either way, after your data has been written to ArcGIS Online, it *should* be possible to alter the layer properties through the REST API:

http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Update_Definition_Feature_Layer/02r30000022p000000/

I don't have a working example, however. Would love to see a workspace that does this, if anyone has managed it.


geospatiallover
Participant
Forum|alt.badge.img+6

Just to clarify, do you want to create a new feature service, or just add a layer onto an existing service? The FME AGOL writer can do the former, but not the latter.

Either way, after your data has been written to ArcGIS Online, it *should* be possible to alter the layer properties through the REST API:

http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Update_Definition_Feature_Layer/02r30000022p000000/

I don't have a working example, however. Would love to see a workspace that does this, if anyone has managed it.

I found python code in Github that could do this: https://github.com/ecaldwell/portal-admin-examples. This code uses the ArcGIS Rest API. Next challenge is to implement this using our infrastructure. Code is a bit too complex for me but I'll try to make it work first.