Converting ArcObjects to client geometries

558
2
03-15-2011 10:11 PM
madormapad
New Contributor
Hello,

Is there a simple way of converting ArcObjects geometries (ESRI.ArcGIS.Geometry) to client geometries (ESRI.ArcGIS.Client.Geometry)?

For example, converting ESRI.ArcGIS.Geometry.IPointCollection to ESRI.ArcGIS.Geometry.PointCollection.

I tried to create new points and copy the coordinates and spatial reference to the new PointCollection, but it takes forever.

I'm using ArcGIS Desktop 9.3.

Thank you.
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
I have not worked with ArcObjects but I found this blog post. I think you would need to do the reverse: http://weblogs.asp.net/albertpascual/archive/2009/04/06/serializing-json-geometry-objects-between-si...
0 Kudos
madormapad
New Contributor
Thank you very much for your answer 🙂

Strangely, using IPointCollection.QueryPoint instead of IPointCollection.get_Point (or IPointCollection.Point) solved the performance issue.
A convertion that took 12 seconds now takes about 0.25 seconds.
0 Kudos