How to copy a feature described by a list to a local feature class

04-12-2022 12:05 AM
New Contributor II

Hi everyone,

First of all I apologize for this duplicate post but I originally posted it in a less appropriate section.


I have constructed a list ("feat_to_add") that describes a feature that I want to add to a hosted feature layer in my Portal. There it is :

[{"geometry": {"paths": [[[2.9244314, 42.7770192], [2.9519563, 42.7748966], [2.951957, 42.7748306], [2.9518368, 42.7748318]]], "spatialReference": {"wkid": 4326, "latestWkid": 4326}}, "attributes": {"username": "DH283LK", "start_time": 1649155161000, "end_time": 1649155732000, "numimmat": "DH-283-LK", "activite": "Collecte", "commune": "Test", "duree": 9.650000000000192, "commentair": "Test"}}]

No problem using the function : layer.edit_features(adds=feat_to_add), my feature was correctly added to my hosted feature layer.

But in addition to updating my Portal, I would also like to copy this feature to a feature class of a local FGDB.

Can you please help me find the solution to copy this feature describe in a list to a local feature class.

Thank you.

0 Kudos
0 Replies