Hi everyone,
Did anyone try to add features using the /rest/services/.../{layerid}/addFeatures endpoint and using WKT json input for the geometry?
I find the documentation quite ambiguous when it shows:
I tried in the add features web form the following input:
[{
"wkt": "GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",POINT[\"WGS_1984\",-79.419591,43.647131]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]",
"attributes": {
"ProductId": 10175
}
}]
As you can see in the attached image, the endpoint ended with success adding a new item with objectid 3636.
But this is the result of the features query after the "creation". It seems to create an empty/invalid geometry storing only the attributes but no geometry information.:
{ "objectIdFieldName": "OBJECTID", "globalIdFieldName": "", "geometryType": "esriGeometryPoint", "spatialReference": { "wkid": 4326, "latestWkid": 4326 }, "fields": [ { "name": "ProductId", "alias": "ProductId", "type": "esriFieldTypeInteger" } ], "features": [ { "attributes": { "ProductId": 10175 } } ] }
My doubts are:
If I use the normal json geometry for a Point, it works:
[{
"geometry": {
"x": 12.474212758000021,
"y": 45.662661214000025
},
"attributes": {
"ProductId": 10175
}
}]
Any help would be appreciated!
Thanks!