Select to view content in your preferred language

Is it possible to save polygon graphic to polyline feature layer?

747
3
11-16-2010 05:27 AM
XiujuZhou
Emerging Contributor
In my application of ArcGIS API 2 for silverlight which use services of ArcGIS server 10, I have polygon layer as ArcGISDynamicMapServiceLayer, polygon feature layer and polyline feature layer. Users select a graphic from polygon layer and need to save it to polygon feature layer or polyline feature layer. I have implemented of saving to polygon feature layer. but don't know how to save to polyline layer. Please help!!! Thanks!
0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
You can't save a polygon geometry in an ArcGIS server polyline feature class.

So, the only way is you to transform the polygon to the polyline at the client side.
I don't know if there is a sample somewhere, but I guess this is doable (using Paths and Rings properties of the geometry).
0 Kudos
XiujuZhou
Emerging Contributor
Thank you DBroux. your suggesion is great. I am not sure how to implement it.

You can't save a polygon geometry in an ArcGIS server polyline feature class.

So, the only way is you to transform the polygon to the polyline at the client side.
I don't know if there is a sample somewhere, but I guess this is doable (using Paths and Rings properties of the geometry).
0 Kudos
JenniferNery
Esri Regular Contributor
I don't know the use case why you would transform a polygon to a polyline geometry.

But like Dominique had suggested, you can get the PointCollection per ring of the polygon, and create a path for the polyline with the same PointCollection. The number of Rings in your polygon (source geometry) must match the number of Paths in your polyline (target geometry), the content of each ring must match the content of each path.
0 Kudos