Geoprocessing Service to Edit a Feature Service?

1217
3
Jump to solution
10-02-2013 08:56 AM
ionarawilson1
Occasional Contributor III
If I am editing a feature service, I need to create a local copy. I don't have a choice of where I can save it. It gets saved to a folder in the user directory. Is there a way for arcgis server to see that? My objective is to have a web app to edit features in a feature service. But the web app will run a geoprocessing service. However to test the gp, I cannot run the data with the feature service without first having a local copy. However the data that was copied to the local folder cannot be copied to the server (this is the message I get when I try to publish it) so I am not sure how to publish a geoprocessing service that will be editing a feature service. Is there any way this can be done? How do people run geoprocessing services in web apps when trying to edit a feature in a sde geodatabase? I can't find any information about it. Thank you!!!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
SchoppMatthieu
New Contributor III

If I am editing a feature service, I need to create a local copy. I don't have a choice of where I can save it. It gets saved to a folder in the user directory. Is there a way for arcgis server to see that?


A feature service is a particular ArcGIS Server service that exposes sde geodatabase editing functionalities through the web.
The feature class or table to be edited need to be "registered with the geodatabase". Here is some information about feature service data requirement.
Changes are saved to the database itself.

Your sentence makes no sense to me... 😉


My objective is to have a web app to edit features in a feature service. But the web app will run a geoprocessing service.


You can edit data through a geoprocessing service, for example : adding values to a table. Then you neither have to use a feature service nor to use database versionning.
If you need to update features geometry and attributes though a web mapping application however, then you should expose your data as a feature service. On the client side (web app) you can use the editor component to handle the editing tasks. Here is an example with the Flex api, you can find it for javascript too.


However to test the gp, I cannot run the data with the feature service without first having a local copy. However the data that was copied to the local folder cannot be copied to the server (this is the message I get when I try to publish it)


Again, you should choose between editing your data through a geoprocessing service or a feature service. It makes no sense to edit a feature service through a geoprocessing service. It's like filling a watering-can to fill another watering-can to water your garden.

ArcGIS Server says that it will copy your data to the server because the local folder where you save your data is not registered with the server. Here is more information about it.


so I am not sure how to publish a geoprocessing service that will be editing a feature service

:rolleyes:

You should read some documentation about feature services.
Once you have published your feature service, check the Flex or Javascript API to learn how to use the Editor Component client side (follow the link above)

I hope it helps.

View solution in original post

0 Kudos
3 Replies
SchoppMatthieu
New Contributor III

If I am editing a feature service, I need to create a local copy. I don't have a choice of where I can save it. It gets saved to a folder in the user directory. Is there a way for arcgis server to see that?


A feature service is a particular ArcGIS Server service that exposes sde geodatabase editing functionalities through the web.
The feature class or table to be edited need to be "registered with the geodatabase". Here is some information about feature service data requirement.
Changes are saved to the database itself.

Your sentence makes no sense to me... 😉


My objective is to have a web app to edit features in a feature service. But the web app will run a geoprocessing service.


You can edit data through a geoprocessing service, for example : adding values to a table. Then you neither have to use a feature service nor to use database versionning.
If you need to update features geometry and attributes though a web mapping application however, then you should expose your data as a feature service. On the client side (web app) you can use the editor component to handle the editing tasks. Here is an example with the Flex api, you can find it for javascript too.


However to test the gp, I cannot run the data with the feature service without first having a local copy. However the data that was copied to the local folder cannot be copied to the server (this is the message I get when I try to publish it)


Again, you should choose between editing your data through a geoprocessing service or a feature service. It makes no sense to edit a feature service through a geoprocessing service. It's like filling a watering-can to fill another watering-can to water your garden.

ArcGIS Server says that it will copy your data to the server because the local folder where you save your data is not registered with the server. Here is more information about it.


so I am not sure how to publish a geoprocessing service that will be editing a feature service

:rolleyes:

You should read some documentation about feature services.
Once you have published your feature service, check the Flex or Javascript API to learn how to use the Editor Component client side (follow the link above)

I hope it helps.
0 Kudos
ionarawilson1
Occasional Contributor III
Thank you so much for the thorough explanation Matt. The issue I have is that I need to create a web app where users will create a feature and then some values will be calculated, for example an id number that will called PlanID that will be created from the combination of fiscal year, county where feature is located and a unique number - if there are no other features in that county, the unique number will be 1, so the id number would be for example 2013-230-001. If there is another feature in that county in that year, the id would be 2013-230-002.  So I was thinking I could use a feature service for the user to digitize the features in the web app (I already have a web app in javascript with a editor and I can already create features and populate the date field for example). Then I thought I could use a geoprocessing service to calculate the PlanID, based on the year entered and the county where the feature is located, plus that unique value. I already have a python script for the calculation of the PlanID in ArcMap, but I need to change the script to create the geoprocessing service that will be running in the web app after the feature is digitized. Would this be the best approach - creating a feature service to create features in a web app and then run a geoprocessing service to calculate values based on the features created?

Thank you!
0 Kudos
SchoppMatthieu
New Contributor III
Hi, yes, that should work, I would probably do it that way too.  I guess that on the client side, the "editToolbar.deactivate();" could work as a trigger, to call the geoprocessing service.

You must be pretty close from the solution...
0 Kudos