Hello R-ArcGIS community,
I am new to ArcGIS R-Bridge, but have moderate experience in R and ArcGIS. I am looking for a way to use R to write to a feature service. The R arcgisbindings package allows one to read a feature via arc.open but it doesn't seem to allow writing back (arc.write) to the feature service. Is there a way to accomplish this? I am looking to QA/QC the data in R as I find it more simple. Any help would be great. Thanks for your time.
Solved! Go to Solution.
Hey Andrew,
I have been working through a few similar challenges with bridge. My solution right now is to use R to execute python commands. With Arc Py and the ArcGIS python libraries we can do pretty much anything. I have attached a super simple R script and Python script. That demonstrates a second approach - which is to tell R to run a python script once you have a Feature Class written to a temp data base. The python script can overwrite or append the data to a Feature Service. Make sense?
Hey Andrew,
We do not have a direct way to write to a portal, yet. The workaround would be:
1. Write feature as a feature class in a gdb using arc.write
2. Use the Share ribbon in ArcGIS Pro to share that feature class as a feature service.
I know this is not an automated approach, however. If you host data frequently you can perform the above step once and put the Share step in a scheduler in Pro.
Hi Andy - thanks for the question. Yes you can easily overwrite an existing web layer using either of the two workflows outlined here:
https://pro.arcgis.com/en/pro-app/latest/help/sharing/overview/overwrite-a-web-layer.htm
thanks!
-Nick Giner
Hey Andrew,
I have been working through a few similar challenges with bridge. My solution right now is to use R to execute python commands. With Arc Py and the ArcGIS python libraries we can do pretty much anything. I have attached a super simple R script and Python script. That demonstrates a second approach - which is to tell R to run a python script once you have a Feature Class written to a temp data base. The python script can overwrite or append the data to a Feature Service. Make sense?
Hi Benjamin,
Thanks for providing me with your solution. Yes, it does make sense. I have been working with some python scripts in R so I think it shouldn't take too much.
Cheers,
Andy
@BenjaminDorsey, @AndrewPadilla
Finally, I have a positive response to this! We've recently developed and announced a new R metapackage {arcgis} with several subpackages that can read AND write feature services, amongst many other capabilities. The goal of the project is to provide an R interface to ArcGIS location services.
Wonderful news! I look forward to trying it out!