Coordinates to Polygon

1020
5
10-31-2016 03:03 AM
MuhammadFayaz
Occasional Contributor

I want to get coordinates from user as input and then convert it to a polygon and display it on the map. After that I want to save this polygon to our database with save button.

I am successful to get user input and display it as graphics on map. how do i save this graphic as feature to our database?

Can i convert to json and then send it to a geoprocessor to append it to database layer? 

Please share if anyone have already done something similar.

Thank you!

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus

Muhammed,

   What do you mean by append it to database layer? Are you talking about an FeatureServer service on ArcGIS Server? If so then this is simple. If is is not a ArcGIS Server service then this becomes very difficult.

0 Kudos
MuhammadFayaz
Occasional Contributor

Dear Robert, 

What if i have a geoprocessing service that convert json to polygon and save it Geodatabase. Is there a way to send this polygon graphics as json to the geoprocessing service.

Otherwise, if we save it feature service, even that will solve my problem.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Muhammed,

  That is feasible. I can't say that I have seen any example/sample code for this though.

MuhammadFayaz
Occasional Contributor

Dear Robert,

What do you thing is the good and easy way to work on, Saving it through geoprocessing service or saving it directly to the feature layer?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Muhammed,

     I think saving directly to a FeatureServer Service is the easiest route but if you do not have ArcGIS Server and an Enterprise Geodatabase with SDE then you will have to go the Geoprocessing route.