Question

Overwrite One Field on AGOL Feature Hosted Layer

  • 28 March 2024
  • 3 replies
  • 29 views

Userlevel 2
Badge +10

Hi All,

 

I’m working on a workflow to collect tree data in the field using Survey123 & Field Maps. The tree surveyors complain about having to manually change the Tree IDs every time they come back from the field. I was thinking that FME could help with this matter by reading the Feature Hosted layers (point, lines and polygons) and use the counter to re-numbering everything.

I have the workflow pretty much ready but I want it to achive the following:

  • Read and Overwrite the same Feature Hosted layers by using Feature Holder? I want to avoid creating a new layer with the new IDs. is that achievable? 
  • I only want to overwrite one field (Tree ID) then the rest of the fields stay the same. I was thinking only exposing the Tree ID attribute in the reader?

3 replies

Userlevel 5
Badge +29

Tree ID sounds like its an auto generating field - is it an alias of ObjectID? You shouldn’t be changing that if that is the case. I’m unsure the exact naming criteria required for Tree ID, but would it just be better to have it as a field that is entered as part of the Survey/Form?

Userlevel 2
Badge +10

Thanks @hkingsbury, I have finally been able to create a Python script that does the job: it overwrites the tree_ID based on the sum count of the three geometries (point, line and polygon). The python works fine as the AGOL feature hosted layers have been updated with the new tree_ID but the PythonCaller stops with the following error:

I did some research but couldn’t find anything useful for the ‘FeatureProcessor’ issue. 

Attached the python script although think it’s nothing to do with the python itself.

Any idea for this error?

Userlevel 2
Badge +10

Solution for this issue in the following post: 

 

Reply